Kaynağa Gözat

修改头像获取方式

zhanghui 2 yıl önce
ebeveyn
işleme
c2d63fe955
1 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. 4 3
      pages/my/index.vue

+ 4 - 3
pages/my/index.vue

@@ -150,10 +150,10 @@ export default {
 			this.group1[0].rightText = '未实名认证,去认证'
 		}
 
-		if (this.userInfo.selfPhoto){
-			this.getImgUrlByOssId(this.userInfo.selfPhoto)
-		}
+
 		this.getUserInfo()
+
+
 	},
 
 	methods: {
@@ -163,6 +163,7 @@ export default {
 				console.log('++++++++++++获取用户信息++++++++++++++++++',res)
 				uni.setStorageSync('userInfo',res.data.data)
 				this.userInfo = res.data.data
+				this.getImgUrlByOssId(this.userInfo.selfPhoto)
 			})
 		},