Showing
2 changed files
with
12 additions
and
10 deletions
... | ... | @@ -6,15 +6,16 @@ |
6 | 6 | <!-- #ifdef MP || APP-PLUS --> |
7 | 7 | <!-- 登录 --> |
8 | 8 | <view class="u-flex u-p-l-30 u-p-r-20 u-p-t-75 u-p-b-30"> |
9 | - <block v-if="userInfo.isToken"> | |
9 | + <block v-if="userInfo.isToken || userInfo.isThirdLogin"> | |
10 | 10 | <view @click="openPersonalInfo" class="u-m-r-20"> |
11 | 11 | <image class="avatar" mode="aspectFill" :src="userInfo.avatar == '' ? '/static/default.png' : userInfo.avatar"></image> |
12 | 12 | </view> |
13 | 13 | <view class="u-flex-1"> |
14 | - <view @click="openPersonalInfo" class="nickName u-flex"> | |
15 | - <view class="name u-m-r-10" v-if="userInfo.realName || userInfo.nickName"> | |
14 | + <view class="nickName u-flex"> | |
15 | + <view @click="openPersonalInfo" class="name u-m-r-10" v-if="userInfo.realName || userInfo.nickName"> | |
16 | 16 | <text style="#FFFFFF;font-size: 18px;">{{ userInfo.realName || userInfo.nickName }}</text> |
17 | 17 | </view> |
18 | + <view v-if="userInfo.isThirdLogin" @click="clickAccountFunc" class="detail"><text class="text">绑定账号</text></view> | |
18 | 19 | </view> |
19 | 20 | <view @click="openPersonalInfo" style="color:#FFFFFF;font-size: 14px;" v-if="userInfo.phoneNumber">{{ userInfo.phoneNumber | phone }}</view> |
20 | 21 | </view> |
... | ... | @@ -23,10 +24,7 @@ |
23 | 24 | <view class="u-m-r-20" @click="openLoginFunc"> |
24 | 25 | <view class="avatar u-flex"><image class="avatar" mode="aspectFill" src="../../static/default.png"></image></view> |
25 | 26 | </view> |
26 | - <view class="u-flex-1"> | |
27 | - <view @click="openLoginFunc" class="u-font-lg click-login login-btn ">请点击登录</view> | |
28 | - <view v-if="!userInfo.isToken" @click="clickAccountFunc" class="detail"><text class="text">绑定账号</text></view> | |
29 | - </view> | |
27 | + <view class="u-flex-1"><view @click="openLoginFunc" class="u-font-lg click-login login-btn ">请点击登录</view></view> | |
30 | 28 | </block> |
31 | 29 | <view v-if="userInfo.isToken" @click="openPersonalInfo"><u-icon name="arrow-right" color="white" size="13"></u-icon></view> |
32 | 30 | </view> |
... | ... | @@ -166,6 +164,7 @@ export default { |
166 | 164 | const params = JSON.parse(decodeURIComponent(e.obj)); |
167 | 165 | this.thirdObj = params; |
168 | 166 | } |
167 | + console.log('UserInfo', this.userInfo); | |
169 | 168 | }, |
170 | 169 | computed: { |
171 | 170 | ...mapState(['userInfo']) |
... | ... | @@ -247,7 +246,8 @@ export default { |
247 | 246 | }; |
248 | 247 | let userInfo = { |
249 | 248 | ...resObj, |
250 | - token: true //token用于判断是否登录 | |
249 | + token: true, //token用于判断是否登录 | |
250 | + isThirdLogin: false | |
251 | 251 | }; |
252 | 252 | if (userInfo.token) { |
253 | 253 | this.setUserInfo(userInfo); |
... | ... | @@ -308,7 +308,8 @@ export default { |
308 | 308 | }; |
309 | 309 | let userInfo = { |
310 | 310 | ...resObj, |
311 | - token: true //token用于判断是否登录 | |
311 | + token: true, //token用于判断是否登录 | |
312 | + isThirdLogin: false | |
312 | 313 | }; |
313 | 314 | if (userInfo.token) { |
314 | 315 | this.setUserInfo(userInfo); | ... | ... |