|
@ -2,13 +2,16 @@ |
|
|
<view class="container"> |
|
|
<view class="container"> |
|
|
<view class="list-cell b-b m-t" @click="upImg" :hover-stay-time="50" style="display: flex;align-items: center;"> |
|
|
<view class="list-cell b-b m-t" @click="upImg" :hover-stay-time="50" style="display: flex;align-items: center;"> |
|
|
<text class="cell-tit">我的头像</text> |
|
|
<text class="cell-tit">我的头像</text> |
|
|
<view class="" style="display: flex;align-items: center;justify-content: center;height: 80upx;line-height: 80upx;"> |
|
|
<view class="" |
|
|
<image v-if="userInfos && userInfos.icon" :src="userInfos.icon" style="border-radius: 50%;width: 100upx;height: 100upx;"></image> |
|
|
style="display: flex;align-items: center;justify-content: center;height: 80upx;line-height: 80upx;"> |
|
|
|
|
|
<image v-if="userInfos && userInfos.icon" :src="userInfos.icon" |
|
|
|
|
|
style="border-radius: 50%;width: 100upx;height: 100upx;"></image> |
|
|
<text class="cell-more yticon icon-you"></text> |
|
|
<text class="cell-more yticon icon-you"></text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="list-cell b-b m-t" @click="inputShowModal('nickname')" hover-class="cell-hover" :hover-stay-time="50"> |
|
|
<view class="list-cell b-b m-t" @click="inputShowModal('nickname')" hover-class="cell-hover" |
|
|
|
|
|
:hover-stay-time="50"> |
|
|
<text class="cell-tit" v-if="userInfos && userInfos.nickname">修改昵称:{{userInfos.nickname|| ''}}</text> |
|
|
<text class="cell-tit" v-if="userInfos && userInfos.nickname">修改昵称:{{userInfos.nickname|| ''}}</text> |
|
|
<text class="cell-more yticon icon-you"></text> |
|
|
<text class="cell-more yticon icon-you"></text> |
|
|
</view> |
|
|
</view> |
|
@ -37,7 +40,10 @@ |
|
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue'; |
|
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue'; |
|
|
import Api from '@/common/api'; |
|
|
import Api from '@/common/api'; |
|
|
import neilModal from '@/components/neil-modal.vue'; |
|
|
import neilModal from '@/components/neil-modal.vue'; |
|
|
import { mapState, mapMutations } from 'vuex'; |
|
|
import { |
|
|
|
|
|
mapState, |
|
|
|
|
|
mapMutations |
|
|
|
|
|
} from 'vuex'; |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
neilModal |
|
|
neilModal |
|
@ -49,8 +55,17 @@ export default { |
|
|
inputContent: '', |
|
|
inputContent: '', |
|
|
genderShow: false, |
|
|
genderShow: false, |
|
|
gender: undefined, |
|
|
gender: undefined, |
|
|
genders: [{ name: '保密', value: 0 }, { name: '男', value: 1 }, { name: '女', value: 2 }], |
|
|
genders: [{ |
|
|
|
|
|
name: '保密', |
|
|
|
|
|
value: 0 |
|
|
|
|
|
}, { |
|
|
|
|
|
name: '男', |
|
|
|
|
|
value: 1 |
|
|
|
|
|
}, { |
|
|
|
|
|
name: '女', |
|
|
|
|
|
value: 2 |
|
|
|
|
|
}], |
|
|
|
|
|
current: 0, |
|
|
userInfos: {}, |
|
|
userInfos: {}, |
|
|
sourceTypeIndex: 0, |
|
|
sourceTypeIndex: 0, |
|
|
sourceType: ['拍照', '相册', '拍照或相册'], |
|
|
sourceType: ['拍照', '相册', '拍照或相册'], |
|
@ -106,7 +121,9 @@ export default { |
|
|
that.$api.msg('输入不能为空'); |
|
|
that.$api.msg('输入不能为空'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
let obj = { id:1}; |
|
|
let obj = { |
|
|
|
|
|
id: 1 |
|
|
|
|
|
}; |
|
|
obj[that.feild] = that.inputContent; |
|
|
obj[that.feild] = that.inputContent; |
|
|
Api.apiCall('post', Api.member.updateMember, obj); |
|
|
Api.apiCall('post', Api.member.updateMember, obj); |
|
|
that.$api.msg('修改成功'); |
|
|
that.$api.msg('修改成功'); |
|
@ -142,6 +159,7 @@ page { |
|
|
page { |
|
|
page { |
|
|
background: $page-color-base; |
|
|
background: $page-color-base; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.list-cell { |
|
|
.list-cell { |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: baseline; |
|
|
align-items: baseline; |
|
@ -150,39 +168,48 @@ page { |
|
|
position: relative; |
|
|
position: relative; |
|
|
background: #fff; |
|
|
background: #fff; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
|
|
|
|
|
|
&.log-out-btn { |
|
|
&.log-out-btn { |
|
|
margin-top: 40upx; |
|
|
margin-top: 40upx; |
|
|
|
|
|
|
|
|
.cell-tit { |
|
|
.cell-tit { |
|
|
color: $uni-color-primary; |
|
|
color: $uni-color-primary; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
margin-right: 0; |
|
|
margin-right: 0; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&.cell-hover { |
|
|
&.cell-hover { |
|
|
background: #fafafa; |
|
|
background: #fafafa; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&.b-b:after { |
|
|
&.b-b:after { |
|
|
left: 30upx; |
|
|
left: 30upx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&.m-t { |
|
|
&.m-t { |
|
|
margin-top: 16upx; |
|
|
margin-top: 16upx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.cell-more { |
|
|
.cell-more { |
|
|
align-self: baseline; |
|
|
align-self: baseline; |
|
|
font-size: $font-lg; |
|
|
font-size: $font-lg; |
|
|
color: $font-color-light; |
|
|
color: $font-color-light; |
|
|
margin-left: 10upx; |
|
|
margin-left: 10upx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.cell-tit { |
|
|
.cell-tit { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
font-size: $font-base + 2upx; |
|
|
font-size: $font-base + 2upx; |
|
|
color: $font-color-dark; |
|
|
color: $font-color-dark; |
|
|
margin-right: 10upx; |
|
|
margin-right: 10upx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.cell-tip { |
|
|
.cell-tip { |
|
|
font-size: $font-base; |
|
|
font-size: $font-base; |
|
|
color: $font-color-light; |
|
|
color: $font-color-light; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
switch { |
|
|
switch { |
|
|
transform: translateX(16upx) scale(0.84); |
|
|
transform: translateX(16upx) scale(0.84); |
|
|
} |
|
|
} |
|
|