diff --git a/pages/pages_zhentou/homePage/homePage.vue b/pages/pages_zhentou/homePage/homePage.vue index c53ee23..88096ba 100644 --- a/pages/pages_zhentou/homePage/homePage.vue +++ b/pages/pages_zhentou/homePage/homePage.vue @@ -54,9 +54,7 @@ } } //商品信息 - if (this.bgSrc == '') { - this.queryGoodsInfo(); - } + this.queryGoodsInfo(); }, methods: { //商品信息 diff --git a/pages/pages_zhentou/myPage/myPage.vue b/pages/pages_zhentou/myPage/myPage.vue index 2eff983..0797347 100644 --- a/pages/pages_zhentou/myPage/myPage.vue +++ b/pages/pages_zhentou/myPage/myPage.vue @@ -4,12 +4,14 @@ 头像 昵称 - + + @@ -46,10 +48,12 @@ export default { data() { return { + nickName: '',//默认值 avatarUrl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0', userInfo: { username: '', - avatar: '' + avatar: '', + phone: '' } } }, @@ -63,6 +67,7 @@ } }, methods: { + //获取昵称 formSubmit(e) { console.log(e.detail) if(e.detail.value) { @@ -71,7 +76,10 @@ }, //获取头像 chooseavatar(e) { - console.log(e); + if(!this.userInfo.phone) { + this.avatarUrl = e.detail.value; + return; + } uni.uploadFile({ url: getApp().globalData.baseUrl + '/blade-resource/oss/endpoint/put-file', filePath: e.detail.avatarUrl,