吴洪双 5 år sedan
förälder
incheckning
194a8f492f

+ 1 - 1
App.vue

@@ -13,7 +13,7 @@
 			 if(lan == 'en') {
 				 this._i18n.locale = 'en-US'
 			 }
-			 if(lan == 'zh-Hans-CN' || lan=='zh') {
+			 if(lan == 'zh-Hans-CN' || lan=='zh' || lan=='zh-CN') {
 				 this._i18n.locale = 'zh-CN'
 			 }
 			 uni.setTabBarItem({ index: 0,text: this.$t('tabs.tab1')});

+ 2 - 2
configs/env.js

@@ -9,8 +9,8 @@ let configs = {
 if (process.env.NODE_ENV === 'development') {
 	// 测试环境
 	configs = Object.assign(configs, {
-		// baseUrl: 'https://app.sunzee.com.cn/ShenzeeServer',
-		baseUrl: 'http://127.0.0.1:8090',
+		baseUrl: 'https://app.sunzee.com.cn/ShenzeeServer',
+		// baseUrl: 'http://127.0.0.1:8090',
 	});
 }
 

+ 7 - 2
pages/User/equipmentSratisticsList.vue

@@ -30,6 +30,7 @@
 		},
 		data() {
 			return {
+				globalUser:{},
 				adminId: '',
 				merchantList:[{equipmentList:[]}],
 				extraIcon: {
@@ -54,9 +55,13 @@
 			}
 		},
 		onShow(state){
-			this.adminId = this.loginUser.id;
+			this.globalUser = uni.getStorageSync("globalUser");
+			this.adminId = this.globalUser.id;
 			this.init();
 		},
+		onLoad(state){
+			// this.init();
+		},
 		onPullDownRefresh() {
 			this.init();
 		},
@@ -77,7 +82,7 @@
 			},
 			getEquipmentListData(){
 				// console.log('getEquipmentListData')
-				this.getEquipmentListByUser(this.loginUser)
+				this.getEquipmentListByUser(this.globalUser)
 				.then(data => {
 					this.merchantList = data;
 					// console.log('merchantList2',this.merchantList.length)

+ 4 - 4
pages/User/equipmentStatusList.vue

@@ -114,6 +114,7 @@
 		},
 		data() {
 			return {
+				globalUser:{},
 				merchantList:[{equipmentList:[]}],
 				extraIcon: {
 					color: '#4cd964',
@@ -126,16 +127,15 @@
 		},
 		computed: {
 			...mapState(['loginUser']),
-			
 		},
 		onLoad(state){
-			this.getEquipmentListData();
-			
+			// this.getEquipmentListData();
 		},
 		onPullDownRefresh() {
 			this.getEquipmentListData();
 		},
 		onShow() {
+			this.globalUser = uni.getStorageSync("globalUser");
 			uni.setNavigationBarTitle({title: this.$t('equipmentStatusList.title')});
 			this.getEquipmentListData();
 		},
@@ -148,7 +148,7 @@
 				return equipment.name?equipment.name:'暂无名称';
 			},
 			getEquipmentListData(){
-				this.getEquipmentListByUser(this.loginUser)
+				this.getEquipmentListByUser(this.globalUser)
 				.then(data => {
 					this.merchantList = data;
 					var listName = data[0].equipmentList;

+ 9 - 7
pages/User/merchantList.vue

@@ -41,6 +41,7 @@
 		},
 		data() {
 			return {
+				globalUser:{},
 				merchantList: [{
 					equipmentList: []
 				}],
@@ -59,13 +60,14 @@
 		},
 		onShow() {
 			uni.setNavigationBarTitle({title: this.$t('merchantList.title')});
-			var globalUser = uni.getStorageSync("globalUser");
-			this.id = globalUser.id;
+			this.globalUser = uni.getStorageSync("globalUser");
+			this.id = this.globalUser.id;
+			this.getEquipmentListData();
 		},
 		onLoad(state) {
-			var globalUser = uni.getStorageSync("globalUser");
-			this.id = globalUser.id;
-			this.getEquipmentListData();
+			// this.globalUser = uni.getStorageSync("globalUser");
+			// this.id = this.globalUser.id;
+			// this.getEquipmentListData();
 		},
 		onPullDownRefresh() {
 			this.getEquipmentListData();
@@ -128,12 +130,12 @@
 			},
 			getEquipmentListData() {
 				if(this.id==1){
-					this.getEquipmentListByProvince(this.loginUser)
+					this.getEquipmentListByProvince(this.globalUser)
 					.then(data => {
 						this.list = data;
 					}, _ => void uni.stopPullDownRefresh());
 				}else{
-					this.getEquipmentListByUser(this.loginUser)
+					this.getEquipmentListByUser(this.globalUser)
 					.then(data => {
 						this.merchantList = data;
 						var listName = data[0].equipmentList;