浏览代码

优化信息获取

zhengkaixin 1 年之前
父节点
当前提交
82d4fd593c
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 6 0
      pages/mine/mine.vue
  2. 2 2
      pages/statistics/statistics.vue

+ 6 - 0
pages/mine/mine.vue

@@ -140,9 +140,15 @@
 					openId: this.carhelp.getOpenId()
 					openId: this.carhelp.getOpenId()
 				}).then((response) => {
 				}).then((response) => {
 					uni.hideLoading();
 					uni.hideLoading();
+					
 					this.personInfo = response.data.regUser;
 					this.personInfo = response.data.regUser;
 					this.companyInfo = response.data.companyInfo;
 					this.companyInfo = response.data.companyInfo;
 					
 					
+					var token = response ? response.data.token : '';
+					this.carhelp.setPersonInfo(response.data.regUser );
+					
+					this.carhelp.setToken(token);
+					this.carhelp.setPersonInfoPlus(response.data);
 					this.$forceUpdate()
 					this.$forceUpdate()
 				}).catch(error => {
 				}).catch(error => {
 					uni.showToast({
 					uni.showToast({

+ 2 - 2
pages/statistics/statistics.vue

@@ -446,7 +446,7 @@
 
 
 			this.getCompanyInfoList();
 			this.getCompanyInfoList();
 			
 			
-
+			this.getHomePageKwh(0);
 			
 			
 		},
 		},
 		onReady() {
 		onReady() {
@@ -683,7 +683,7 @@
 					this.companyList = list;
 					this.companyList = list;
 					if(list.length==1){
 					if(list.length==1){
 						this.companyId=list[0].id
 						this.companyId=list[0].id
-						this.getHomePageKwh(0);
+						
 					}else{
 					}else{
 						
 						
 					}
 					}