|
|
@ -27,7 +27,9 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 头像 --> |
|
|
|
<!-- 头像 --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text class="t-setting" v-if="isLogin" @click="changean('center')">设置头像昵称</text> |
|
|
|
<view class="t-setting" v-if="isLogin" @click="changean('center')"> |
|
|
|
|
|
|
|
<image class="set-img" src="https://www.lbgjtoa.com/upload/appImg/icon-set.svg" mode="aspectFit"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
@ -66,7 +68,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<!-- 普通弹窗 --> |
|
|
|
<!-- 普通弹窗 --> |
|
|
|
<uni-popup ref="popup" background-color="#fff" > |
|
|
|
<!-- <uni-popup ref="popup" background-color="#fff" > |
|
|
|
<view class="w100 fx-box"> |
|
|
|
<view class="w100 fx-box"> |
|
|
|
<view class="f-32 color-01 fw-700 flex-c-c"> |
|
|
|
<view class="f-32 color-01 fw-700 flex-c-c"> |
|
|
|
设置头像和昵称 |
|
|
|
设置头像和昵称 |
|
|
@ -96,7 +98,7 @@ |
|
|
|
<view style="background: #0081f5;width: 300rpx;color: #fff;" class="padd-12 bor-r-10 flex-c-c m-t-40">设置</view> |
|
|
|
<view style="background: #0081f5;width: 300rpx;color: #fff;" class="padd-12 bor-r-10 flex-c-c m-t-40">设置</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
</uni-popup> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 兴趣定制 --> |
|
|
|
<!-- 兴趣定制 --> |
|
|
|
|
|
|
|
|
|
|
@ -177,11 +179,14 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.type = type |
|
|
|
uni.navigateTo({ |
|
|
|
this_.url = this.headimgurl |
|
|
|
url:'/pages/personcenter/EditProfile/EditProfile' |
|
|
|
this_.username = this.nickname |
|
|
|
}) |
|
|
|
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
|
|
|
// this.type = type |
|
|
|
this.$refs.popup.open(type) |
|
|
|
// this_.url = this.headimgurl |
|
|
|
|
|
|
|
// this_.username = this.nickname |
|
|
|
|
|
|
|
// // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
|
|
|
|
|
|
|
// this.$refs.popup.open(type) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onChooseAvatar(e) { |
|
|
|
onChooseAvatar(e) { |
|
|
@ -269,12 +274,12 @@ export default { |
|
|
|
wx.getUserInfo({ |
|
|
|
wx.getUserInfo({ |
|
|
|
provider: 'weixin', |
|
|
|
provider: 'weixin', |
|
|
|
success: (res) => { |
|
|
|
success: (res) => { |
|
|
|
uni.setStorageSync('nickname', '已登陆'); |
|
|
|
uni.setStorageSync('nickname', '微信用户'); |
|
|
|
uni.setStorageSync('headimgurl', res.userInfo.avatarUrl); |
|
|
|
uni.setStorageSync('headimgurl', 'https://www.lbgjtoa.com/upload/appImg/icon-person-01.png'); |
|
|
|
uni.setStorageSync('oauthTime', new Date().getTime()); |
|
|
|
uni.setStorageSync('oauthTime', new Date().getTime()); |
|
|
|
this_.nickname = '已登陆'; |
|
|
|
this_.nickname = '微信用户'; |
|
|
|
this_.$forceUpdate(); |
|
|
|
this_.$forceUpdate(); |
|
|
|
this_.headimgurl = res.userInfo.avatarUrl; |
|
|
|
this_.headimgurl = 'https://www.lbgjtoa.com/upload/appImg/icon-person-01.png'; |
|
|
|
}, |
|
|
|
}, |
|
|
|
fail: function (error) { |
|
|
|
fail: function (error) { |
|
|
|
console.log('login failed ' + error); |
|
|
|
console.log('login failed ' + error); |
|
|
@ -396,6 +401,7 @@ export default { |
|
|
|
that.deleteUserApp(); |
|
|
|
that.deleteUserApp(); |
|
|
|
(this.scenicGZType = 'NO'), (this.lineGZType = 'NO'), (this.foodGZType = 'NO'), (this.methodGZType = 'NO'), uni.removeStorageSync('nickname'); |
|
|
|
(this.scenicGZType = 'NO'), (this.lineGZType = 'NO'), (this.foodGZType = 'NO'), (this.methodGZType = 'NO'), uni.removeStorageSync('nickname'); |
|
|
|
uni.removeStorageSync('headimgurl'); |
|
|
|
uni.removeStorageSync('headimgurl'); |
|
|
|
|
|
|
|
uni.removeStorageSync('nickname'); |
|
|
|
uni.removeStorageSync('oauthTime'); |
|
|
|
uni.removeStorageSync('oauthTime'); |
|
|
|
uni.removeStorageSync('openid'); |
|
|
|
uni.removeStorageSync('openid'); |
|
|
|
uni.removeStorageSync('unionid'); |
|
|
|
uni.removeStorageSync('unionid'); |
|
|
@ -531,4 +537,12 @@ export default { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.t-setting{ |
|
|
|
|
|
|
|
width: 50rpx; |
|
|
|
|
|
|
|
height: 50rpx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.set-img{ |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
height: 100% } |
|
|
|
</style> |
|
|
|
</style> |
|
|
|