Commit 625cd287 by 梁建民

js

parent 06b473ba
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</button> </button>
</block> </block>
<block wx:elif="{{authInfo.status === 3}}"> <block wx:elif="{{authInfo.status === 3}}">
<button class="btn" data-type="3" data-id="{{authInfo.id}}" data-url='/pages/tab/home/home' bind:tap="toUrl"> <button class="btn" data-type="3" data-id="{{authInfo.id}}" data-url='/pages/tab/me/me' bind:tap="toUrl">
返回会员中心 返回会员中心
</button> </button>
</block> </block>
......
...@@ -10,6 +10,7 @@ Page({ ...@@ -10,6 +10,7 @@ Page({
*/ */
data: { data: {
isShow: false, isShow: false,
headPic: '',
userInfo: { userInfo: {
avatar: '', avatar: '',
mobile: '' mobile: ''
...@@ -60,9 +61,23 @@ Page({ ...@@ -60,9 +61,23 @@ Page({
token: wx.getStorageSync('access_token') token: wx.getStorageSync('access_token')
}, (res) => { }, (res) => {
if (res.errcode === 0) { if (res.errcode === 0) {
// 未企业认证的时候优先读取微信头像
if (res.data.avatar == '') {
this.setData({
headPic: res.data.wechat_oauth.oauth_head
});
} else {
this.setData({
headPic: res.data.avatar
});
}
this.setData({ this.setData({
userInfo: res.data userInfo: res.data
}); });
} }
}, true); }, true);
}, },
...@@ -101,7 +116,7 @@ Page({ ...@@ -101,7 +116,7 @@ Page({
//认证管理 //认证管理
if (e.currentTarget.dataset.type == 'certification') { if (e.currentTarget.dataset.type == 'certification') {
if (this.data.userInfo.auth_status == null) { if (this.data.userInfo.auth_status == null) {
wx.navigateTo({ wx.navigateTo({
......
<view class="mine"> <view class="mine">
<view class="head row verCenter"> <view class="head row verCenter">
<view class="pic"> <view class="pic">
<cover-image class="im" src="{{userInfo.avatar ? userInfo.avatar:'/res/images/imgs/heads.png'}}"></cover-image> <cover-image class="im" src="{{headPic ? headPic:'/res/images/imgs/heads.png'}}"></cover-image>
</view> </view>
<view class="text"> <view class="text">
<text class="t1">{{userInfo.company_name}}</text> <text class="t1">{{userInfo.company_name}}</text>
<view class="row verCenter"> <view class="row verCenter">
<text class="t2" selectable="false" space="false" decode="false">普通会员</text> <text class="t2" selectable="false" space="false" decode="false">普通会员</text>
<view> <view>
<text class="t3">红包:</text> <text class="t3">红包</text>
<text class="t4">13,123</text> <text class="t4">{{userInfo.integral || 0}}</text>
</view> </view>
</view> </view>
</view> </view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment