twt %!s(int64=2) %!d(string=hai) anos
pai
achega
ac801dd58e
Modificáronse 4 ficheiros con 20 adicións e 11 borrados
  1. 2 2
      common/request.js
  2. 1 1
      pages/mobile/group.vue
  3. 13 5
      pages/mobile/modelTwo.vue
  4. 4 3
      pages/mobile/vinDetail.vue

+ 2 - 2
common/request.js

@@ -13,10 +13,10 @@ const http = (url = '', date = {}, type = 'POST', header = {
 		header={};
 		
 		if(token){
-			header['token']=token;
+			header['accessToken']=token;
 			header['uid']=uid; 
 		}else{
-			header['token']='';
+			header['accessToken']='';
 			header['uid']=''; 
 		}
 		

+ 1 - 1
pages/mobile/group.vue

@@ -86,7 +86,7 @@
 				uni.showLoading({
 					title: '加载中'
 				});
-				this.$http('advancedEpc/getVinGroupPc', {
+				this.$http('advancedEpc/getVinGroup', {
 					vin:this.vin,
 					
 				}, 'GET').then(res => {

+ 13 - 5
pages/mobile/modelTwo.vue

@@ -204,10 +204,8 @@
 						  console.log("约束1")
 						  this.restrainShow1=true;
 						  this.restrainList1=res.data.result.list;
-						 
 						}else{
 						   this.lastShow=true;
-						  
 						   this.childrenList=res.data.result.list;
 						   this.oldList= this.childrenList
 						}
@@ -227,9 +225,19 @@
 				})
 			},
              goThree(item,index){
-				 uni.navigateTo({
-				 	url:'vinDetail?vin='+this.vin+'&token='+item.token+'&param='+item.param+'&access_time='+this.access_time+'&tabIndex='+index
-				 })
+				 var that=this;
+				 uni.setStorage({
+				 	key: 'childrenList',
+				 	data: that.childrenList,
+				 	 success: function () {
+				 	  uni.navigateTo({
+				 	  	url:'vinDetail?vin='+that.vin+'&token='+item.token+'&param='+item.param+'&access_time='+that.access_time+'&tabIndex='+index
+				 	  })
+				 	 }
+				 }); 
+				 
+				 
+				 
 			 },
 			 childrenkeyup(){
 				 this.childrenList=this.oldList;

+ 4 - 3
pages/mobile/vinDetail.vue

@@ -65,7 +65,8 @@
 		onLoad(opt) {
 			// console.log('opt++',opt);
 			this.vin = opt.vin;
-			this.tabIndex = opt.tabIndex;
+			this.tabIndex = Number( opt.tabIndex)+1;
+			this.groupData = uni.getStorageSync('childrenList');
 			this.token = opt.token;
 			this.param = opt.param;
 			this.access_time = opt.access_time;
@@ -139,10 +140,10 @@
 					title: '加载中'
 				});
 				this.$http('/advancedEpc/getPartsPc', {
-					vin: this.son_vin,
+					vin: this.vin,
 					token: this.son_token,
 					param: this.son_param,
-					access_time: this.son_access_time,
+					access_time: this.access_time,
 				}, 'GET').then(res => {
 					uni.hideLoading();