|
@@ -132,9 +132,12 @@ export default {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: "操作成功"
|
|
title: "操作成功"
|
|
|
})
|
|
})
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '/pages/index/tabbar',
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // setTimeout(res=>{
|
|
|
|
|
+ // uni.switchTab({
|
|
|
|
|
+ // url: '/pages/index/index',
|
|
|
|
|
+ // },2000)
|
|
|
|
|
+ // })
|
|
|
|
|
+
|
|
|
}).catch(() =>{
|
|
}).catch(() =>{
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: "操作失败"
|
|
title: "操作失败"
|
|
@@ -147,13 +150,17 @@ export default {
|
|
|
console.log('++++++++++++获取用户信息++++++++++++++++++',res)
|
|
console.log('++++++++++++获取用户信息++++++++++++++++++',res)
|
|
|
uni.setStorageSync('userInfo',res.data.data)
|
|
uni.setStorageSync('userInfo',res.data.data)
|
|
|
this.userInfo = res.data.data
|
|
this.userInfo = res.data.data
|
|
|
|
|
+ if (this.userInfo.selfPhoto){
|
|
|
|
|
+ this.getImgUrlByOssId(this.userInfo.selfPhoto)
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
getImgUrlByOssId(Id){
|
|
getImgUrlByOssId(Id){
|
|
|
- this.$api.getImgUrlByOssId(Id).then(res=>{
|
|
|
|
|
|
|
+ this.$api.getImage(Id).then(res=>{
|
|
|
this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
|
|
this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
|
|
|
|
|
+ this.$set(this.userInfo)
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
//头像上传
|
|
//头像上传
|