|
@@ -3,7 +3,7 @@
|
|
|
<u-navbar :placeholder="true" bgColor="rgba(255,255,255,0.0)" :leftIconSize="0"></u-navbar>
|
|
<u-navbar :placeholder="true" bgColor="rgba(255,255,255,0.0)" :leftIconSize="0"></u-navbar>
|
|
|
|
|
|
|
|
<view class="bg_box">
|
|
<view class="bg_box">
|
|
|
- <view class="top_box" @click="modifyShow = true">
|
|
|
|
|
|
|
+ <view class="top_box" @click="handleTopBoxClick">
|
|
|
<view class="img_box" style="display: flex">
|
|
<view class="img_box" style="display: flex">
|
|
|
<image
|
|
<image
|
|
|
class="img"
|
|
class="img"
|
|
@@ -15,11 +15,11 @@
|
|
|
></image>
|
|
></image>
|
|
|
|
|
|
|
|
<view class="">
|
|
<view class="">
|
|
|
- <view v-if="mainBodyUserInfo.nickname == '微信用户'" class="name">{{ mainBodyUserInfo.nickname }}{{ mainBodyUserInfo.id }}</view>
|
|
|
|
|
|
|
+ <view v-if="mainBodyUserInfo.nickname == '微信用户'" class="name">{{ mainBodyUserInfo.nickname || '欢迎登录' }}{{ mainBodyUserInfo.id || '' }}</view>
|
|
|
<view v-else class="name">{{ mainBodyUserInfo.nickname }}</view>
|
|
<view v-else class="name">{{ mainBodyUserInfo.nickname }}</view>
|
|
|
<view class="" style="display: flex; align-items: center">
|
|
<view class="" style="display: flex; align-items: center">
|
|
|
- <view style="margin-left: 32rpx; font-size: 28rpx; color: rgba(68, 68, 68, 0.6)">总积分:{{ mainBodyUserInfo.score }}</view>
|
|
|
|
|
- <view style="margin-left: 32rpx; font-size: 28rpx; color: rgba(68, 68, 68, 0.6)">id:{{ mainBodyUserInfo.id }}</view>
|
|
|
|
|
|
|
+ <view style="margin-left: 32rpx; font-size: 28rpx; color: rgba(68, 68, 68, 0.6)">总积分:{{ mainBodyUserInfo.score || '0' }}</view>
|
|
|
|
|
+ <view style="margin-left: 32rpx; font-size: 28rpx; color: rgba(68, 68, 68, 0.6)">id:{{ mainBodyUserInfo.id || '' }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -153,7 +153,7 @@ export default {
|
|
|
// console.log(this.user);
|
|
// console.log(this.user);
|
|
|
if (this.user === 'undefined' || this.user === '' || this.user === [] || this.user === null) {
|
|
if (this.user === 'undefined' || this.user === '' || this.user === [] || this.user === null) {
|
|
|
/* 跳转到登录页 */
|
|
/* 跳转到登录页 */
|
|
|
- this.$common.toLogin();
|
|
|
|
|
|
|
+ //this.$common.toLogin();
|
|
|
} else {
|
|
} else {
|
|
|
/* 刷新 */
|
|
/* 刷新 */
|
|
|
this.$api.refreshUser(
|
|
this.$api.refreshUser(
|
|
@@ -186,6 +186,17 @@ export default {
|
|
|
// console.log(res,78787878)
|
|
// console.log(res,78787878)
|
|
|
// })
|
|
// })
|
|
|
// },
|
|
// },
|
|
|
|
|
+ handleTopBoxClick() {
|
|
|
|
|
+ // 检查登录状态
|
|
|
|
|
+ this.user = this.$common.userInfo();
|
|
|
|
|
+ if (!this.user || typeof this.user === 'undefined' || this.user === '' || this.user === null) {
|
|
|
|
|
+ // 未登录,跳转到登录页面
|
|
|
|
|
+ this.$common.toLogin();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 已登录,显示修改资料弹窗
|
|
|
|
|
+ this.modifyShow = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
myList(i) {
|
|
myList(i) {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: this.items[i].path
|
|
url: this.items[i].path
|