Переглянути джерело

优化供货商和零售端登录

jiangfeng 5 роки тому
батько
коміт
113ddd0f45
1 змінених файлів з 29 додано та 38 видалено
  1. 29 38
      hdApp/src/admin/home/workbench.vue

+ 29 - 38
hdApp/src/admin/home/workbench.vue

@@ -300,45 +300,36 @@ export default {
       this.$util.pageTo(item)
     },
     init () {
+					getWeixinId().then(res => {
+						this.getappIdList = res.data
+					});
+					getUser().then(res => {
+						uni.setNavigationBarTitle({
+							title: res.name
+						});
 
-			/*延迟监听token*/
-			if(!uni.getStorageSync('token')){
-				setTimeout(()=>{
-					this.init();
-				},100);
-			}else{
-				getWeixinId().then(res => {
-					this.getappIdList = res.data
-				});
-        getUser().then(res => {
-          uni.setNavigationBarTitle({
-            title: res.name
-          });
-
-          let nowTime = getDataTimestamp(new Date(), true);
-          if (nowTime > res.setDeadline) {
-            this.renewMask = true;
-          }
-        });
-        consoleIndex().then(res => {
-          this.data = res.data;
-          const { asset, todayData } = res.data;
-          if (!this.$util.isEmpty(asset)) {
-            // 订单总览
-            this.orderData[0].value = asset.unSendOrder;
-            this.orderData[1].value = asset.sendingOrder;
-            this.orderData[2].value = todayData.order;
-            // 总览数据
-            this.totalData[0].value = asset.totalUser;
-            this.totalData[1].value = asset.totalView;
-            this.totalData[2].value = asset.totalOrder;
-            this.totalData[3].value = asset.totalIncome;
-            this.totalData[4].value = asset.totalExpend;
-            this.totalData[5].value = asset.totalPurchase;
-          }
-        });
-      }
-
+						let nowTime = getDataTimestamp(new Date(), true);
+						if (nowTime > res.setDeadline) {
+							this.renewMask = true;
+						}
+					});
+					consoleIndex().then(res => {
+						this.data = res.data;
+						const { asset, todayData } = res.data;
+						if (!this.$util.isEmpty(asset)) {
+							// 订单总览
+							this.orderData[0].value = asset.unSendOrder;
+							this.orderData[1].value = asset.sendingOrder;
+							this.orderData[2].value = todayData.order;
+							// 总览数据
+							this.totalData[0].value = asset.totalUser;
+							this.totalData[1].value = asset.totalView;
+							this.totalData[2].value = asset.totalOrder;
+							this.totalData[3].value = asset.totalIncome;
+							this.totalData[4].value = asset.totalExpend;
+							this.totalData[5].value = asset.totalPurchase;
+						}
+					});
     },
     // 跳转
     pageToFn (page) {