|
@@ -3,8 +3,8 @@
|
|
|
|
|
|
<view class="top">
|
|
|
<view class="customerMes">
|
|
|
- <image v-if="headImg" :src="headImg" mode="" style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
|
|
|
- <image v-else src="../../static/img/icon_me.png" mode="" style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
|
|
|
+ <image @click="updateUserInfo" v-if="headImg" :src="headImg" mode="" style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
|
|
|
+ <image @click="updateUserInfo" v-else src="../../static/img/icon_me.png" mode="" style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
|
|
|
<view class="mes">
|
|
|
<view class="nick">
|
|
|
<view class="nickName" v-if="nickName">{{nickName}}</view>
|
|
@@ -234,6 +234,8 @@
|
|
|
this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
|
//const wxOpenData = uni.getStorageSync("wxOpenData");
|
|
|
const wxOpenData = this.$store.state.wxOpenData;
|
|
|
+ this.wxOpenData=wxOpenData
|
|
|
+ //console.log()
|
|
|
if (wxOpenData) {
|
|
|
this.headImg = wxOpenData.loginInfo.customerInfo.headImgurl;
|
|
|
this.nickName = wxOpenData.loginInfo.customerInfo.wxNickName;
|
|
@@ -254,6 +256,32 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ updateUserInfo(){
|
|
|
+ var that=this;
|
|
|
+ uni.getUserProfile({
|
|
|
+ lang:'zh_CN',
|
|
|
+ desc:'登录',
|
|
|
+ success:(res)=>{
|
|
|
+ console.log(res);
|
|
|
+ that.headImg=res.userInfo.avatarUrl;
|
|
|
+ that.nickName=res.userInfo.nickName;
|
|
|
+ that.$http('miniApp2/sys/updateUserInfo', {
|
|
|
+ nickName:res.userInfo.nickName,
|
|
|
+ unionId:that.ext.unionId,
|
|
|
+ headImg: res.userInfo.avatarUrl,
|
|
|
+ openId: that.wxOpenData.openid
|
|
|
+ }, 'POST').then(res => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fail:(res)=>{
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
decryptPhoneNumber: function(e) {
|
|
|
console.log(e);
|
|
|
this.code = e.detail.code
|