twt 2 years ago
parent
commit
4a37a98f70
4 changed files with 79 additions and 10 deletions
  1. 5 3
      pages/mobile/SelectCarTwo.vue
  2. 64 2
      pages/mobile/group.vue
  3. 6 4
      pages/mobile/modelTwo.vue
  4. 4 1
      pages/mobile/vinDetail.vue

+ 5 - 3
pages/mobile/SelectCarTwo.vue

@@ -39,7 +39,7 @@
 
 		<!-- 型号 -->
 		<view v-if="xinghaoShow" class="cangBox">
-			<view @click="goVinDetail(item)" class="workBox2" v-for="(item,index) in xinghaoList" :key="index">
+			<view @click="gogroup(item)" class="workBox2" v-for="(item,index) in xinghaoList" :key="index">
 				<view class="leftBox">
 					<view class="oneBox">
 						<view class="comtent2">
@@ -105,6 +105,7 @@
 				carModelShow: false,
 				xinghaoShow: false,
 				xinghaoList: [],
+				modelname:'',
 			}
 		},
 		onLoad(opt) {
@@ -118,6 +119,7 @@
 			goNext(item) {
 				if (item.next_restrain == 1) {
 					this.title += ' > ' + item.model_name;
+					this.modelname=item.model_name
 					this.getYueSuData(item)
 				}
 			},
@@ -188,9 +190,9 @@
 				});
 			},
 			
-			goVinDetail() {
+			gogroup(item) {
 				uni.navigateTo({
-					url: 'VinDetail'
+					url: 'group?type=2&token='+item.token+'&param='+item.param+'&access_time='+this.access_time+'&epc_id='+this.epc_id+'&modelname='+this.modelname
 				})
 			},
 

+ 64 - 2
pages/mobile/group.vue

@@ -77,14 +77,76 @@
 				chexingMesList:[],
 				chexing:'',
 				description:'',
+				type:'',
 			}
 		},
 		onLoad(opt) {
-			this.vin = opt.vin
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
-			this.getData()
+			if(opt.type==2){
+				this.type=2
+				this.token=opt.token;
+				this.param=opt.param;
+				this.access_time=opt.access_time;
+				this.epc_id=opt.epc_id;
+				this.description=opt.modelname;
+				//车型点选
+				this.getModelGroup()
+			}else{
+				this.vin = opt.vin
+				this.getData()
+			}
+			
 		},
 		methods: {
+			getModelGroup(){
+				uni.showLoading({
+					title: '加载中'
+				});
+				this.$http('advancedEpc/getModelGroup', {
+					token: this.token,
+				    param: this.param,
+					epc_id:this.epc_id,
+					access_time:this.access_time
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					//console.log(res.data.number);
+					if (res.data.number == 200 || res.data.number == 5212) {
+						this.brand_name = res.data.result.brand_name;
+						this.brand_id = res.data.result.brand_id;
+						this.access_time = res.data.result.access_time;
+						this.caption = res.data.result.caption
+						this.epc_id = res.data.result.epc_id;
+				
+						if (res.data.result.restrains.length > 0) {
+							this.restrains = res.data.result.restrains;
+							this.restrainShow = true;
+							
+						} else {
+							this.zzTime = res.data.result.access_time;
+							this.zlist = res.data.result.list;
+							this.restrainShow = false;
+							this.groupShow = true;
+							this.token = res.data.result.list[0].token;
+							this.param = res.data.result.list[0].param;
+							if(res.data.result.vehicle.description){
+								this.description=res.data.result.vehicle.description
+							}
+						}
+						if (Object.keys(res.data.result.vehicle).length != 0)  {
+							this.chexingMesList = res.data.result.vehicle.tree;
+							this.chexing = res.data.result.vehicle.description;
+						}
+					} else {
+				
+						uni.showToast({
+							title: res.data.message,
+							icon: 'none',
+							duration: 3000
+						});
+					}
+				
+				});
+			},
 			getData() {
 				uni.showLoading({
 					title: '加载中'

+ 6 - 4
pages/mobile/modelTwo.vue

@@ -28,7 +28,7 @@
 						<view class="vinB">VIN</view>
 						<view class="vinNum">{{vin}}</view>
 					</view>
-					<view class="vinBox2">
+					<view class="vinBox2"  v-if="chexingMesList.length != 0">
 						<view class="detail" @click="goCarDetail()">车型详情</view>
 						<image src="../../static/img/icon_arrow_blue_r@2x.png" mode="" style="width: 24rpx; height: 24rpx"></image>
 					</view>
@@ -103,6 +103,7 @@
 				iStatusBarHeight: '',
 				epc_id:'',
 				description:'',
+				chexingMesList:[],
 			}
 		},
 		onLoad(opt) {
@@ -114,6 +115,7 @@
 			this.description=opt.description;
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.getData()
+			this.chexingMesList = uni.getStorageSync('chexingMesList');
 		},
 		methods: {
 			goOemSearch(){
@@ -225,8 +227,8 @@
 					vin: this.vin,
 					access_time: this.zzTime,
 					param: this.param,
-					token: this.token
-
+					token: this.token,
+                    epc_id:this.epc_id,
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					//console.log(res.data.number);
@@ -272,7 +274,7 @@
 					success: function() {
 						uni.navigateTo({
 							url: 'vinDetail?vin=' + that.vin + '&token=' + item.token + '&param=' +
-								item.param + '&access_time=' + that.access_time + '&tabIndex=' + index
+								item.param + '&access_time=' + that.access_time + '&tabIndex=' + index+'&epc_id='+that.epc_id
 						})
 					}
 				});

+ 4 - 1
pages/mobile/vinDetail.vue

@@ -74,7 +74,8 @@
 				bannerArr: [],
 				tabIndex: 1,
 				page: 1,
-				total_page: 1
+				total_page: 1,
+				epc_id:'',
 			}
 		},
 		onLoad(opt) {
@@ -85,6 +86,7 @@
 			this.token = opt.token;
 			this.param = opt.param;
 			this.access_time = opt.access_time;
+			this.epc_id=opt.epc_id
 			this.getItemData();
 
 
@@ -126,6 +128,7 @@
 					token: this.token,
 					param: this.param,
 					access_time: this.access_time,
+					epc_id:this.epc_id
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					this.epc_id = res.data.result.epc_id;