xhj 3 vuotta sitten
vanhempi
commit
2cb4f0e5cf

+ 5 - 1
app.css

@@ -378,4 +378,8 @@ image {
 .savebottom{
     bottom: constant(safe-area-inset-bottom);  
     bottom: env(safe-area-inset-bottom); 
-}
+}
+
+.wei-login{font-size: 24rpx;color: #333;text-align: center;padding: 0 30rpx 60rpx;margin-top: 160rpx;}
+.wei-login image{width: 495rpx;height: 424rpx;margin: 0 auto 20rpx;}
+.cart-login{border: 1px solid var(--mina);font-size: 30rpx;color: var(--mina);font-weight: bold;height: 80rpx;line-height: 80rpx;border-radius: 40rpx;width: 260rpx;margin: 65rpx auto 0;}

+ 84 - 60
pages/cell/cell.vue

@@ -30,75 +30,87 @@
 			</view>
 		</view>
 		
-		<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+106) + 'rpx;'"></view>
-		
-		<view class="ddflex state-box">
-			<view class="state-item">
-				<view class="ddflex">
-					<view class="icon"></view>
-					<view class="state-label">租赁中</view>
-				</view>
-				<view class="ddflex state-data">
-					<view>{{count.leaseCount?count.leaseCount:0}}</view>
-					<view>{{getP(1)}}%</view>
-				</view>
-			</view>
-			<view class="state-item">
-				<view class="ddflex">
-					<view class="icon" style="background: #0FCB27;"></view>
-					<view class="state-label">空闲</view>
+		<block v-if="isLogin">
+			<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+106) + 'rpx;'"></view>
+			
+			<view class="ddflex state-box">
+				<view class="state-item">
+					<view class="ddflex">
+						<view class="icon"></view>
+						<view class="state-label">租赁中</view>
+					</view>
+					<view class="ddflex state-data">
+						<view>{{count.leaseCount?count.leaseCount:0}}</view>
+						<view>{{getP(1)}}%</view>
+					</view>
 				</view>
-				<view class="ddflex fflex state-data">
-					<view>{{count.noLeaseCount?count.noLeaseCount:0}}</view>
-					<view>{{getP(2)}}%</view>
+				<view class="state-item">
+					<view class="ddflex">
+						<view class="icon" style="background: #0FCB27;"></view>
+						<view class="state-label">空闲</view>
+					</view>
+					<view class="ddflex fflex state-data">
+						<view>{{count.noLeaseCount?count.noLeaseCount:0}}</view>
+						<view>{{getP(2)}}%</view>
+					</view>
 				</view>
 			</view>
-		</view>
-		
-		<!-- 电池 -->
-		<view>
-			<view class="cell-box" v-for="item,index in groupList">
-				<view class="ddflex">
-					<view style="margin-right: 35rpx;">
-						<cell :width="99" :height="197" :soc="item.leaseStatus==1?50:100" :showsoc="false"></cell>
-					</view>
-					<view class="cell-info fflex">
-						<view class="ddflex">
-							<view class="cell-title">{{item.model}}</view>
-							<view class="cell-state" :style="item.leaseStatus==1?'':'background-color: #0FCB27;'">{{item.leaseStatus==1?'已租':'空闲'}}</view>
-						</view>
-						<view class="cell-info  ddflex">
-							<view>电池Id:</view>
-							<view>{{item.batteryId?item.batteryId:'暂无电池'}}</view>
-						</view>
-						<view class="cell-info  ddflex">
-							<view>设备编号:</view>
-							<view>{{item.number}}</view>
-						</view>
-						<view class="cell-info ddflex">
-							<view>门店:</view>
-							<view>{{item.storeName}}</view>
+			
+			<!-- 电池 -->
+			<view>
+				<view class="cell-box" v-for="item,index in groupList">
+					<view class="ddflex">
+						<view style="margin-right: 35rpx;">
+							<cell :width="99" :height="197" :soc="item.leaseStatus==1?50:100" :showsoc="false"></cell>
 						</view>
-						<view class="cell-info ddflex">
-							<view>到期时间:</view>
-							<view>{{item.blockDate}}</view>
+						<view class="cell-info fflex">
+							<view class="ddflex">
+								<view class="cell-title">{{item.model}}</view>
+								<view class="cell-state" :style="item.leaseStatus==1?'':'background-color: #0FCB27;'">{{item.leaseStatus==1?'已租':'空闲'}}</view>
+							</view>
+							<view class="cell-info  ddflex">
+								<view>电池Id:</view>
+								<view>{{item.batteryId?item.batteryId:'暂无电池'}}</view>
+							</view>
+							<view class="cell-info  ddflex">
+								<view>设备编号:</view>
+								<view>{{item.number}}</view>
+							</view>
+							<view class="cell-info ddflex">
+								<view>门店:</view>
+								<view>{{item.storeName}}</view>
+							</view>
+							<view class="cell-info ddflex">
+								<view>到期时间:</view>
+								<view>{{item.blockDate}}</view>
+							</view>
 						</view>
 					</view>
+					<view class="cell-option ddflex">
+						<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/map/map?id='+item.batteryId)">定位</view>
+						<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/BMS/BMS?id='+item.batteryId)">BMS</view>
+						<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/cellDetail/cellDetail?id='+item.batteryId)">详情</view>
+					</view>
 				</view>
-				<view class="cell-option ddflex">
-					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/map/map?id='+item.batteryId)">定位</view>
-					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/BMS/BMS?id='+item.batteryId)">BMS</view>
-					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/cellDetail/cellDetail?id='+item.batteryId)">详情</view>
+			</view>
+			
+			<view v-if="groupList.length==0">
+				<view class="nodata">
+					<image :src="picUrlss+'empty.png'"></image>
+					<text>暂无电池~</text>
 				</view>
 			</view>
-		</view>
+		</block>
 		
-		<view v-if="groupList.length==0">
-			<view class="nodata">
-				<image :src="picUrlss+'empty.png'"></image>
-				<text>暂无电池~</text>
+		<view v-else>
+			<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight) + 'rpx;'"></view>
+			<view class="wei-login" v-if="!isLogin">
+				<image :src="picUrlss + 'wei_login.png'"></image>
+				<view>暂未登录</view>
+				<navigator url="/pages/authorize/authorize" hover-class="none" class="cart-login">立即登录</navigator>
 			</view>
 		</view>
+		
 
 		<left-pop v-if="showPop" :showPop="showPop" :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒" width="460rpx"
 			@closePop="closePop()" @popSubmit="popSubmit()">
@@ -140,6 +152,8 @@
 				systems: {},
 				isTop:0,
 				
+				isLogin:false,
+				
 				userInfo:{},
 				
 				showPop: false,
@@ -164,7 +178,8 @@
 		},
 		onLoad(options) {
 			// 判断当前登录用户身份
-			if(req.isLogins(true)){
+			if(req.isLogins(false)){
+				this.isLogin = true
 				this.userInfo = req.getStorage('userInfo')
 				
 				if(!this.userInfo.storeId){
@@ -177,9 +192,11 @@
 					this.getTopNum()
 				}
 			}else{
-				this.getMachineList()
+				this.isLogin = false
+				// this.getMachineList()
 			}
 			uni.$on('reSetLogin',(data)=>{
+				this.isLogin = true
 				console.log('reSetLogin')
 				this.actMerchant = null
 				// 判断当前登录用户身份
@@ -195,11 +212,18 @@
 						this.getMachineList()
 					}
 				}else{
-					this.getMachineList()
+					this.isLogin = false
+					// this.getMachineList()
 				}
 			})
 		},
 		onShow() {
+			if(req.isLogins(false)){
+				this.isLogin = true
+			}else{
+				this.isLogin = false
+				// this.getMachineList()
+			}
 		},
 		onReachBottom() {
 			this.getMachineList(true)

+ 1 - 5
pages/index/index.css

@@ -156,8 +156,4 @@ page {
 	opacity: 1;
 	background-color: #E6E6E6;
 	margin: 30rpx auto;
-}
-
-.wei-login{font-size: 24rpx;color: #333;text-align: center;padding: 0 30rpx 60rpx;margin-top: 160rpx;}
-.wei-login image{width: 495rpx;height: 424rpx;margin: 0 auto 20rpx;}
-.cart-login{border: 1px solid var(--mina);font-size: 30rpx;color: var(--mina);font-weight: bold;height: 80rpx;line-height: 80rpx;border-radius: 40rpx;width: 260rpx;margin: 65rpx auto 0;}
+}

+ 13 - 5
pages/index/index.vue

@@ -577,15 +577,18 @@
 
 		async onShow() {
 			if(req.isLogins(false)){
+				console.log('req.isLogins', true)
 				this.isLogin = true
-				this.getUserInfo()
+				await this.getUserInfo()
 				await this.getEchartData()
 				await this.getStatisticData()
-				await this.getStoreData()
+				if(!this.userInfo.storeId)
+					await this.getStoreData()
 				
 				this.init()
 				
 			}else{
+				console.log('req.isLogins', false)
 				this.isLogin = false
 			}
 		},
@@ -594,7 +597,9 @@
 
 		onHide() {},
 		onReachBottom() {},
-
+		onShareAppMessage() {
+			
+		},
 		methods: {
 			jumpUrl(url){
 				if(req.isLogins(true)){
@@ -728,8 +733,11 @@
 			},
 			// 获取当前用户
 			getUserInfo(){
-				req.getRequest('/admin/v2/userInfo',{},res=>{
-					this.userInfo = res
+				return new Promise((r, j) => {
+					req.getRequest('/admin/v2/userInfo',{},res=>{
+						this.userInfo = res
+						r(res)
+					})
 				})
 			}
 		},

+ 52 - 29
pages/machine/machine.vue

@@ -17,37 +17,47 @@
 				</view>
 			</view>
 		</view>
-		
-		<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+134) + 'rpx;'"></view>
-		
-		<!-- 机柜 -->
-		<view class="machine-item" v-for="item,index in groupList" @click="jumpUrl('/machineAndCell/machineInfo/machineInfo?id='+item.devId)">
-			<view class="ddflex" style="justify-content: space-between;">
-				<view class="machine-title fflex tover">{{item.devName}}</view>
-				<!-- <view class="state">在线</view> -->
-			</view>
-			<view class="machine-number">机柜编号:{{item.devId}}</view>
-			<view class="machine-info ddflex">
-				<view class="ddflex">
-					<view class="margin-r40">温度:{{item.cabTemp?item.cabTemp:0}}℃</view>
-					<view class="margin-r40">仓门数:{{item.doorCount?item.doorCount:0}}</view>
-					<view class="margin-r40">电池数:{{item.batNum?item.batNum:0}}</view>
+			
+		<block v-if="isLogin">
+			<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+134) + 'rpx;'"></view>
+			<!-- 机柜 -->
+			<view class="machine-item" v-for="item,index in groupList" @click="jumpUrl('/machineAndCell/machineInfo/machineInfo?id='+item.devId)">
+				<view class="ddflex" style="justify-content: space-between;">
+					<view class="machine-title fflex tover">{{item.devName}}</view>
+					<!-- <view class="state">在线</view> -->
 				</view>
-				<view class="fflex tover" style="color: #2A82E4;text-align: right;">
-					{{item.storeName?item.storeName:''}}
+				<view class="machine-number">机柜编号:{{item.devId}}</view>
+				<view class="machine-info ddflex">
+					<view class="ddflex">
+						<view class="margin-r40">温度:{{item.cabTemp?item.cabTemp:0}}℃</view>
+						<view class="margin-r40">仓门数:{{item.doorCount?item.doorCount:0}}</view>
+						<view class="margin-r40">电池数:{{item.batNum?item.batNum:0}}</view>
+					</view>
+					<view class="fflex tover" style="color: #2A82E4;text-align: right;">
+						{{item.storeName?item.storeName:''}}
+					</view>
+				</view>
+				<view class="address-box ddflex">
+					<image class="address-icon" src="../../static/pages/images/address-icon.png"></image>
+					<view class="fflex tover">{{item.address}}</view>
+					<image @click.stop="toLocation(item)" class="daohang" src="../../static/pages/images/daohang.png"></image>
 				</view>
 			</view>
-			<view class="address-box ddflex">
-				<image class="address-icon" src="../../static/pages/images/address-icon.png"></image>
-				<view class="fflex tover">{{item.address}}</view>
-				<image @click.stop="toLocation(item)" class="daohang" src="../../static/pages/images/daohang.png"></image>
+			
+			<view v-if="groupList.length==0">
+				<view class="nodata">
+					<image :src="picUrlss+'empty.png'"></image>
+					<text>暂无设备~</text>
+				</view>
 			</view>
-		</view>
+		</block>
 		
-		<view v-if="groupList.length==0">
-			<view class="nodata">
-				<image :src="picUrlss+'empty.png'"></image>
-				<text>暂无设备~</text>
+		<view v-else>
+			<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight) + 'rpx;'"></view>
+			<view class="wei-login" v-if="!isLogin">
+				<image :src="picUrlss + 'wei_login.png'"></image>
+				<view>暂未登录</view>
+				<navigator url="/pages/authorize/authorize" hover-class="none" class="cart-login">立即登录</navigator>
 			</view>
 		</view>
 		
@@ -69,6 +79,7 @@
 		
 		<foot channel="machine" :isUpdate="isUpdate"></foot>
 	</view>
+	
 </template>
 
 <script>
@@ -90,6 +101,8 @@
 				isTop:0,
 				isUpdate: false,
 				
+				isLogin:false,
+				
 				userInfo:{},
 				
 				showPop: false,
@@ -110,7 +123,8 @@
 		},
 		onLoad(options) {
 			// 判断当前登录用户身份
-			if(req.isLogins(true)){
+			if(req.isLogins(false)){
+				this.isLogin = true
 				this.userInfo = req.getStorage('userInfo')
 				
 				if(!this.userInfo.storeId){
@@ -122,9 +136,11 @@
 					this.getMachineList()
 				}
 			}else{
-				this.getMachineList()
+				this.isLogin = false
+				// this.getMachineList()
 			}
 			uni.$on('reSetLogin',(data)=>{
+				this.isLogin = true
 				console.log('reSetLogin')
 				this.actMerchant = null
 				// 判断当前登录用户身份
@@ -140,7 +156,8 @@
 						this.getMachineList()
 					}
 				}else{
-					this.getMachineList()
+					this.isLogin = false
+					// this.getMachineList()
 				}
 			})
 		},
@@ -148,6 +165,12 @@
 			this.setData({
 				isUpdate: !this.isUpdate
 			}); 
+			if(req.isLogins(false)){
+				this.isLogin = true
+			}else{
+				this.isLogin = false
+				// this.getMachineList()
+			}
 		},
 		onReachBottom() {
 			this.getMachineList(true)

+ 2 - 2
pages/operationData/operationData.vue

@@ -385,7 +385,7 @@
 						}
 					}],
 					series: [{
-						name: '订单',
+						name: '营业额度',
 						type: 'bar',
 						label: {
 							normal: {
@@ -455,7 +455,7 @@
 						}
 					}],
 					series: [{
-						name: '订单',
+						name: '收益额度',
 						type: 'bar',
 						label: {
 							normal: {

+ 2 - 2
pages/operationDataPersonal/operationDataPersonal.vue

@@ -115,7 +115,7 @@
 						}
 					}],
 					series: [{
-						name: '订单',
+						name: '营业额度',
 						type: 'bar',
 						label: {
 							normal: {
@@ -185,7 +185,7 @@
 						}
 					}],
 					series: [{
-						name: '订单',
+						name: '收益额度',
 						type: 'bar',
 						label: {
 							normal: {

+ 84 - 54
pages/order/order.vue

@@ -33,62 +33,74 @@
 			</view>
 		</view>
 		
-		<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+106+105) + 'rpx;'"></view>
 		
-		<!-- 订单 -->
-		<view>
-			<view class="order-item" v-for="item,index in groupList" @click="jumpUrl('/pages/orderDetail/orderDetail?id='+item.id)">
-				<view class="ddflex order-item-header">
-					<view class="order-time">{{item.leaseTime}}</view>
-					<block>
-						<view v-if="item.status==2"  class="order-state" style="color: #0FCB27;">已完成</view>
-						<view v-else class="order-state">未完成</view>
-					</block>
-				</view>
-				<view class="order-item-body">
-					<view class="order-item-content ddflex">
-						<view class="order-item-content-label">订单编号</view>
-						<view class="order-item-content-data fflex tover">{{item.orderNo}}</view>
-					</view>
-					<view class="order-item-content ddflex">
-						<view class="order-item-content-label">门店名称</view>
-						<view class="order-item-content-data fflex tover">{{item.leaseStoreName}}</view>
-					</view>
-					<view class="order-item-content ddflex">
-						<view class="order-item-content-label">租借机柜</view>
-						<view class="order-item-content-data fflex tover">{{item.leaseDevId}}</view>
-					</view>
-					<view class="order-item-content ddflex">
-						<view class="order-item-content-label">电池ID</view>
-						<view class="order-item-content-data fflex tover">{{item.batteryId}}</view>
-					</view>
-					<!-- <view class="order-item-content ddflex">
-						<view class="order-item-content-label">电池型号</view>
-						<view class="order-item-content-data fflex tover">60V 30Ah</view>
-					</view>	 -->
-					<view class="order-item-content ddflex">
-						<view class="order-item-content-label">租赁用户</view>
-						<view class="order-item-content-data fflex tover">{{item.realName}} {{item.phone}}</view>
+		<block v-if="isLogin">
+			<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight+106+105) + 'rpx;'"></view>
+			
+			<!-- 订单 -->
+			<view>
+				<view class="order-item" v-for="item,index in groupList" @click="jumpUrl('/pages/orderDetail/orderDetail?id='+item.id)">
+					<view class="ddflex order-item-header">
+						<view class="order-time">{{item.leaseTime}}</view>
+						<block>
+							<view v-if="item.status==2"  class="order-state" style="color: #0FCB27;">已完成</view>
+							<view v-else class="order-state">未完成</view>
+						</block>
 					</view>
-					<view class="order-item-content ddflex">
-						<view class="order-item-content-label">租借时长</view>
-						<view class="order-item-content-data fflex tover">{{item.time?(item.time+'分钟'):'-'}}</view>
-					</view>
-					<view class="order-item-content ddflex">
-						<view class="order-item-content-label">应付金额</view>
-						<view class="order-item-content-data fflex tover" style="color: #EB5C20;">{{(item.totalMoney||item.totalMoney===0||item.totalMoney==='0')?item.totalMoney+'元':'-'}}</view>
+					<view class="order-item-body">
+						<view class="order-item-content ddflex">
+							<view class="order-item-content-label">订单编号</view>
+							<view class="order-item-content-data fflex tover">{{item.orderNo}}</view>
+						</view>
+						<view class="order-item-content ddflex">
+							<view class="order-item-content-label">门店名称</view>
+							<view class="order-item-content-data fflex tover">{{item.leaseStoreName}}</view>
+						</view>
+						<view class="order-item-content ddflex">
+							<view class="order-item-content-label">租借机柜</view>
+							<view class="order-item-content-data fflex tover">{{item.leaseDevId}}</view>
+						</view>
+						<view class="order-item-content ddflex">
+							<view class="order-item-content-label">电池ID</view>
+							<view class="order-item-content-data fflex tover">{{item.batteryId}}</view>
+						</view>
+						<!-- <view class="order-item-content ddflex">
+							<view class="order-item-content-label">电池型号</view>
+							<view class="order-item-content-data fflex tover">60V 30Ah</view>
+						</view>	 -->
+						<view class="order-item-content ddflex">
+							<view class="order-item-content-label">租赁用户</view>
+							<view class="order-item-content-data fflex tover">{{item.realName}} {{item.phone}}</view>
+						</view>
+						<view class="order-item-content ddflex">
+							<view class="order-item-content-label">租借时长</view>
+							<view class="order-item-content-data fflex tover">{{item.time?(item.time+'分钟'):'-'}}</view>
+						</view>
+						<view class="order-item-content ddflex">
+							<view class="order-item-content-label">应付金额</view>
+							<view class="order-item-content-data fflex tover" style="color: #EB5C20;">{{(item.totalMoney||item.totalMoney===0||item.totalMoney==='0')?item.totalMoney+'元':'-'}}</view>
+						</view>
 					</view>
+					<!-- <view v-if="index!=1" class="order-btns ddflex">
+						<view class="order-btn" @click.stop="">确认支付</view>
+					</view> -->
 				</view>
-				<!-- <view v-if="index!=1" class="order-btns ddflex">
-					<view class="order-btn" @click.stop="">确认支付</view>
-				</view> -->
 			</view>
-		</view>
+			
+			<view v-if="groupList.length==0">
+				<view class="nodata">
+					<image :src="picUrlss+'empty.png'"></image>
+					<text>暂无订单~</text>
+				</view>
+			</view>
+		</block>
 		
-		<view v-if="groupList.length==0">
-			<view class="nodata">
-				<image :src="picUrlss+'empty.png'"></image>
-				<text>暂无订单~</text>
+		<view v-else>
+			<view :style="'height: '+ (systems.navigationHeight+systems.ktxStatusHeight) + 'rpx;'"></view>
+			<view class="wei-login" v-if="!isLogin">
+				<image :src="picUrlss + 'wei_login.png'"></image>
+				<view>暂未登录</view>
+				<navigator url="/pages/authorize/authorize" hover-class="none" class="cart-login">立即登录</navigator>
 			</view>
 		</view>
 		
@@ -130,6 +142,10 @@
 				systems: {},
 				isTop:0,
 				
+				isLogin:false,
+				
+				userInfo:{},
+				
 				showPop: false,
 				tempData: null,
 				
@@ -149,16 +165,24 @@
 			}
 		},
 		onLoad(options) {
-			if(req.isLogins(true)){
+			if(req.isLogins(false)){
+				this.isLogin = true
 				this.userInfo = req.getStorage('userInfo')
 				
 				if(!this.userInfo.storeId){
 					this.getMerchantList()
+				}else{
+					this.actMerchant={
+						id:this.userInfo.storeId
+					}
+					this.getDataList()
 				}
 			}else{
-				this.getDataList()
+				this.isLogin = false
+				// this.getDataList()
 			}
 			uni.$on('reSetLogin',(data)=>{
+				this.isLogin = true
 				console.log('reSetLogin')
 				this.actMerchant = null
 				if(req.isLogins(true)){
@@ -168,12 +192,18 @@
 						this.getMerchantList()
 					}
 				}else{
-					this.getDataList()
+					this.isLogin = false
+					// this.getDataList()
 				}
 			})
 		},
 		onShow() {
-
+			if(req.isLogins(false)){
+				this.isLogin = true
+			}else{
+				this.isLogin = false
+				// this.getMachineList()
+			}
 		},
 		onReachBottom() {
 			this.getDataList(true)

+ 2 - 0
pages/orderLook/orderLook.vue

@@ -132,6 +132,8 @@
 				showPop: false,
 				tempData: null,
 				
+				userInfo:{},
+				
 				queryType: '',
 				
 				groupList: [],

+ 14 - 5
pages/user/user.vue

@@ -38,15 +38,15 @@
 				<view class="flex">我的服务</view>
 			</view>
 			<view class="list2 dflex">
-				<navigator url="/pages/order/order" hover-class="none" class="li" open-type="switchTab">
+				<navigator url="" hover-class="none" class="li" @click="jumpUrlS('/pages/order/order')">
 					<image src="../../static/pages/images/user_service1.png"></image>
 					<text>我的订单</text>
 				</navigator>
-				<navigator v-if="!userInfos.storeId" url="" hover-class="none" class="li" @click="jumpUrl('pages/myStore/myStore')">
+				<navigator v-if="isLogin&&!userInfos.storeId" url="" hover-class="none" class="li" @click="jumpUrl('pages/myStore/myStore')">
 					<image src="../../static/pages/images/user_service2.png"></image>
 					<text>我的商家</text>
 				</navigator>
-				<navigator v-if="!userInfos.storeId" url="" hover-class="none" class="li" @click="jumpUrl('pages/myMerchant/myMerchant')">
+				<navigator v-if="isLogin&&!userInfos.storeId" url="" hover-class="none" class="li" @click="jumpUrl('pages/myMerchant/myMerchant')">
 					<image src="../../static/pages/images/user_service3.png"></image>
 					<text>我的门店</text>
 				</navigator>
@@ -66,7 +66,7 @@
 					<image src="../../static/pages/images/user_service7.png"></image>
 					<text>建议反馈</text>
 				</navigator>
-				<navigator url="" hover-class="none" class="li" @click="logout">
+				<navigator v-if="isLogin" url="" hover-class="none" class="li" @click="logout">
 					<image src="../../static/pages/images/user_service8.png"></image>
 					<text>退出登录</text>
 				</navigator>
@@ -133,11 +133,20 @@
 				this.getWarningData()
 			}else{
 				this.isLogin = false
+				this.userInfos = null
+				this.alarmCount = 0
+				this.exceptionOrderCount = 0
 			}
 		},
 		methods: {
+			jumpUrlS(url){
+				if (!req.isLogins(true)) return false;
+				uni.switchTab({
+					url:url
+				})
+			},
 			jumpUrl(url) {
-				if (!req.isLogin()) return false;
+				if (!req.isLogins(true)) return false;
 				app.globalData.navigateTo(url);
 			},
 			getUserInfo(){

+ 1 - 0
utils/request.js

@@ -236,6 +236,7 @@ const baseRequest = (url, data, method, success, isLoad) => {
 						// console.log("第二次执行")
 		
 						removeStorage('AUTH_TOKEN');
+						removeStorage('userInfo');
 						return redirectIndex();
 					}
 					if (json.data.code !== 0) {