Merge pull request 'dengjie : 解决单独修改昵称,头像保存问题' (#87) from dengjie into dev

Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/87
This commit is contained in:
odjbin
2023-02-04 16:10:33 +00:00

View File

@@ -3,7 +3,6 @@
<view class="change_avatar">
<u-avatar :src="avatar" size="140rpx" shape="circle" @click="changeAvatar()"></u-avatar>
</view>
<view>
<u--form labelPosition="left" :model="model">
<u-form-item label="修改昵称" prop="userInfo.name" borderBottom>
@@ -42,6 +41,7 @@
this.$apiServe.getUser().then(res => {
var data = res.data.data
this.avatar = uni.getStorageSync('img_url') + data.avatar
this.avatarUrl = '/' + data.avatar
this.model.userInfo.name = data.nickname
}).finally(_ => {})
},
@@ -74,7 +74,6 @@
const result = this.updatePromise(res.tempFilePaths[0]) //上传图片
result.then(value => {
this.avatarUrl = '/' + value
console.log(this.avatarUrl);
})
}
}