This commit is contained in:
nyoung 2024-08-24 11:48:37 +08:00
parent e1bf906d5f
commit 77bbeb4454
2 changed files with 2 additions and 4 deletions

View File

@ -316,9 +316,7 @@
getInfo().then((res) => { getInfo().then((res) => {
let userJson = {} let userJson = {}
userJson.userId = res.data.user.id userJson.userId = res.data.user.id
let userInfo = res.data.user.info uni.setStorageSync('userInfo', res.data.user)
userInfo.id = res.data.user.id
uni.setStorageSync('userInfo', userInfo)
uni.setStorageSync('userId', res.data.user.id) uni.setStorageSync('userId', res.data.user.id)
uni.setStorageSync('role', res.data.roles) uni.setStorageSync('role', res.data.roles)
this.goselect() this.goselect()

View File

@ -22,7 +22,7 @@
<view style="display: flex; align-items: center;"> <view style="display: flex; align-items: center;">
<text>{{ userinfo.nickname || '用户昵称'}}</text> <text>{{ userinfo.nickname || '用户昵称'}}</text>
</view> </view>
<text style="font-size: 14px;font-weight: normal;color: #88b4fb">{{userinfo.phonenumber || '未填写手机号码'}}</text> <text style="font-size: 14px;font-weight: normal;color: #88b4fb">{{userinfo.mobile || '未填写手机号码'}}</text>
</view> </view>
</view> </view>