XSLu08042 2 dagen geleden
bovenliggende
commit
f999a2d5d8
1 gewijzigde bestanden met toevoegingen van 7 en 4 verwijderingen
  1. 7 4
      pages/user/index.vue

+ 7 - 4
pages/user/index.vue

@@ -151,7 +151,7 @@
 					<!-- 退出登录按钮 -->
 					<!-- <view class="log-out">退出登录</view> -->
 				</view>
-				<view style="padding-bottom: 20rpx; padding:20rpx" v-if="user.nickname!=''">
+				<view style="padding-bottom: 20rpx; padding:20rpx" v-if="isLogin">
 					<view @tap="loginOUt" class="log-out x-c" >退出登录</view>
 				</view>
 				<!-- <view class="banner">
@@ -193,7 +193,7 @@
 				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
 				// 消息数量
 				msgNum: 0,
-			 
+				isLogin: false
 				 
 			};
 		},
@@ -204,8 +204,11 @@
 			console.log("onshow")
 			var that=this;
 			this.utils.isLogin().then(res => {
-				that.getUserInfo();
-				that.getOrderCount();
+				this.isLogin = res
+				if(res) {
+					that.getUserInfo();
+					that.getOrderCount();
+				}
 			})
 			
 		},