个人信息接口初次对接完毕
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
<u-avatar :src="avatar" size="100rpx" shape="circle"></u-avatar>
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;margin-bottom: 4rpx;">
|
||||
<u--image v-if="show==false" :src="normal" width="84rpx" height="30rpx">
|
||||
<u--image v-if="member=='2'" :src="normal" width="84rpx" height="30rpx">
|
||||
</u--image>
|
||||
<u--image v-else :src="VIP" width="84rpx" height="30rpx">
|
||||
<u--image v-if="member=='3'" :src="VIP" width="84rpx" height="30rpx">
|
||||
</u--image>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;">
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
member: false,
|
||||
showEdit: true,
|
||||
avatar: '',
|
||||
nickname: '',
|
||||
@@ -41,8 +41,7 @@
|
||||
if (this.center != false) {
|
||||
this.showEdit = false
|
||||
}
|
||||
this.avatar = uni.getStorageSync('avatar')
|
||||
this.nickname = uni.getStorageSync('nickname')
|
||||
this.getUser()
|
||||
},
|
||||
methods: {
|
||||
//修改头像
|
||||
@@ -51,6 +50,16 @@
|
||||
url: '../../packageMy/changeAvatar/changeAvatar'
|
||||
})
|
||||
},
|
||||
//获取普通会员和VIP会员
|
||||
getUser() {
|
||||
this.$apiServe.getUser().then(res => {
|
||||
console.log('个人信息==', res.data.data);
|
||||
var data = res.data.data
|
||||
this.avatar = data.avatar
|
||||
this.nickname = data.nickname
|
||||
this.member = data.member
|
||||
}).finally(_ => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user