guo 2 年之前
父节点
当前提交
80fdf0ac01
共有 3 个文件被更改,包括 209 次插入145 次删除
  1. 4 3
      pages/mobile/SelectCarTwo.vue
  2. 174 139
      pages/mobile/group.vue
  3. 31 3
      pages/mobile/modelTwo.vue

+ 4 - 3
pages/mobile/SelectCarTwo.vue

@@ -70,7 +70,8 @@
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.epc_id = opt.epc_id;
 			this.brand_name = opt.brand_name;
-			this.title = opt.brand_name;
+			this.title = opt.brand_name;
+			this.modelname = opt.brand_name;
 			this.getItemData();
 		},
 		methods: {
@@ -81,7 +82,7 @@
 				
 				if (item.next_restrain == 1) {
 					this.title += ' > ' + item.model_name;
-					this.modelname=item.model_name
+					this.modelname += ' ' + item.model_name;
 					this.getYueSuData(item)
 				}
 				else{
@@ -91,7 +92,7 @@
 			goNext2(item) {
 				this.token = item.token;
 				this.param = item.param;
-				
+				this.modelname += ' ' + item.combine_cp;
 				
 				if (item.next_restrain == 1) {
 					this.title += ' > ' + item.combine_cp;

+ 174 - 139
pages/mobile/group.vue

@@ -1,26 +1,26 @@
 <template>
 	<view class="content">
 
-		<!-- 自定义导航 -->
-		<view class="zdyNavBox">
-			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
-			<view class="zdyNav">
-				<view class="zdyNavLeft">
-					<div @click="goback" class="uni-page-head-btn"><i class="uni-btn-icon"
-							style="color: rgb(0, 0, 0); font-size: 27px;"></i></div>
-					
-				</view>
-				<view class="zdyNavTitle">车型件</view>
-				<view v-if="param.length != 0" class="zdyNavRight" @click="goOemSearch()">OEM搜索</view>
-				<view v-else style="width: 120rpx;"></view>
-				
-			</view>
+		<!-- 自定义导航 -->
+		<view class="zdyNavBox">
+			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
+			<view class="zdyNav">
+				<view class="zdyNavLeft">
+					<div @click="goback" class="uni-page-head-btn"><i class="uni-btn-icon"
+							style="color: rgb(0, 0, 0); font-size: 27px;"></i></div>
+
+				</view>
+				<view class="zdyNavTitle">车型件</view>
+				<view v-if="param.length != 0" class="zdyNavRight" @click="goOemSearch()">OEM搜索</view>
+				<view v-else style="width: 120rpx;"></view>
+
+			</view>
 		</view>
 		<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
 		<view style="height: 44px;"></view>
 
 
-		<view class="top">
+		<view v-if="type != 2" class="top">
 			<view class="topCont">
 				<view class="carBox">
 					<!-- <image src="../../static/img/nocar.png" mode="" class="carLogo"></image> -->
@@ -33,13 +33,22 @@
 						<view class="vinB">VIN</view>
 						<view class="vinNum">{{vin}}</view>
 					</view>
-					<view  v-if="chexingMesList.length != 0" class="vinBox2">
+					<view v-if="chexingMesList.length != 0" class="vinBox2">
 						<view class="detail" @click="goCarDetail()">车型详情</view>
-						<image src="../../static/img/icon_arrow_blue_r@2x.png" mode="" style="width: 24rpx; height: 24rpx"></image>
+						<image src="../../static/img/icon_arrow_blue_r@2x.png" mode=""
+							style="width: 24rpx; height: 24rpx"></image>
 					</view>
 				</view>
 			</view>
 		</view>
+		<view v-else class="top">
+			
+				<view class="carBox2">
+					<view class="carTxt2" v-if="!description">{{brand_name}}</view>
+					<view class="carTxt2" v-if="description">{{description}}</view>
+				</view>
+
+		</view>
 		<!--车辆配置  -->
 		<view class="mainBox" v-if="restrainShow">
 			<view class="maintitle">{{caption}}</view>
@@ -77,39 +86,39 @@
 				param: '',
 				token: '',
 				epc_id: '',
-				chexingMesList:[],
-				chexing:'',
-				description:'',
-				type:'',
+				chexingMesList: [],
+				chexing: '',
+				description: '',
+				type: '',
 			}
 		},
 		onLoad(opt) {
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
-			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;
+			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{
+			} else {
 				this.vin = opt.vin
 				this.getData()
 			}
-			
+
 		},
 		methods: {
-			getModelGroup(){
+			getModelGroup() {
 				uni.showLoading({
 					title: '加载中'
 				});
 				this.$http('advancedEpc/getModelGroup', {
 					token: this.token,
-				    param: this.param,
-					epc_id:this.epc_id,
-					access_time:this.access_time
+					param: this.param,
+					epc_id: this.epc_id,
+					access_time: this.access_time
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					//console.log(res.data.number);
@@ -119,11 +128,11 @@
 						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;
@@ -131,23 +140,23 @@
 							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 (res.data.result.vehicle.description) {
+								this.description = res.data.result.vehicle.description
 							}
 						}
-						if (Object.keys(res.data.result.vehicle).length != 0)  {
+						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() {
@@ -166,11 +175,11 @@
 						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;
-							
+							this.restrainShow = true;
+
 						} else {
 							this.zzTime = res.data.result.access_time;
 							this.zlist = res.data.result.list;
@@ -178,13 +187,13 @@
 							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 (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;
+						}
+						if (Object.keys(res.data.result.vehicle).length != 0) {
+							this.chexingMesList = res.data.result.vehicle.tree;
+							this.chexing = res.data.result.vehicle.description;
 						}
 					} else {
 
@@ -200,10 +209,10 @@
 			restrainsClick(item) {
 				this.param = item.param;
 				this.token = item.token;
-				
+
 				this.getcarVinGroup()
-			},
-			
+			},
+
 			getcarVinGroup() {
 				uni.showLoading({
 					title: '加载中'
@@ -222,8 +231,8 @@
 						this.caption = res.data.result.caption
 						if (res.data.result.restrains.length > 0) {
 							this.restrains = res.data.result.restrains;
-							this.restrainShow = true;
-							this.token = res.data.result.restrains[0].token;
+							this.restrainShow = true;
+							this.token = res.data.result.restrains[0].token;
 							this.param = res.data.result.restrains[0].param;
 						} else {
 							this.token = res.data.result.list[0].token;
@@ -232,14 +241,14 @@
 							this.zlist = res.data.result.list;
 							this.restrainShow = false;
 							this.groupShow = true;
-							if(res.data.result.vehicle.description){
-								this.description=res.data.result.vehicle.description
+							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;
+						}
+
+						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({
@@ -251,30 +260,31 @@
 
 				});
 			},
-			goCarDetail() {
-				var that = this;
-				uni.setStorage({
-					key: 'chexing',
-					data: that.chexing,
-					success: function() {
-						
-						uni.setStorage({
-							key: 'chexingMesList',
-							data: that.chexingMesList,
-							success: function() {
-								uni.navigateTo({
-									url: 'CarDetail'
-								})
-							}
-						});
-					}
-				});
-				
-				
+			goCarDetail() {
+				var that = this;
+				uni.setStorage({
+					key: 'chexing',
+					data: that.chexing,
+					success: function() {
+
+						uni.setStorage({
+							key: 'chexingMesList',
+							data: that.chexingMesList,
+							success: function() {
+								uni.navigateTo({
+									url: 'CarDetail'
+								})
+							}
+						});
+					}
+				});
+
+
 			},
 			goOemSearch() {
 				uni.navigateTo({
-					url: 'OemSearch?brand=' + this.brand_name + '&epc_id=' + this.epc_id + '&vin=' + this.vin + '&param=' + this.param +
+					url: 'OemSearch?brand=' + this.brand_name + '&epc_id=' + this.epc_id + '&vin=' + this.vin +
+						'&param=' + this.param +
 						'&token=' + this.token + '&access_time=' + this.access_time
 				})
 			},
@@ -282,26 +292,28 @@
 				console.log('返回');
 				uni.navigateBack({})
 			},
-			goTwo(item) {
-				var that = this;
-				uni.setStorage({
-					key: 'chexing',
-					data: that.chexing,
-					success: function() {
-						
-						uni.setStorage({
-							key: 'chexingMesList',
-							data: that.chexingMesList,
-							success: function() {
-								uni.navigateTo({
-									url: 'modelTwo?vin=' + that.vin + '&zzTime=' + that.zzTime + '&param=' + item.param +
-										'&token=' + item.token + '&epc_id=' + that.epc_id+'&description='+that.description
-								})
-							}
-						});
-					}
-				});
-				
+			goTwo(item) {
+				var that = this;
+				uni.setStorage({
+					key: 'chexing',
+					data: that.chexing,
+					success: function() {
+
+						uni.setStorage({
+							key: 'chexingMesList',
+							data: that.chexingMesList,
+							success: function() {
+								uni.navigateTo({
+									url: 'modelTwo?vin=' + that.vin + '&zzTime=' + that
+										.zzTime + '&param=' + item.param +
+										'&token=' + item.token + '&epc_id=' + that.epc_id +
+										'&description=' + that.description + '&type=' + that.type
+								})
+							}
+						});
+					}
+				});
+
 			}
 		}
 	}
@@ -315,41 +327,42 @@
 		padding-bottom: env(safe-area-inset-bottom);
 	}
 
-	.zdyNavBox {
-		width: 100vw;
-		background: #FFFFFF;
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 9999999;
-	
-	}
-	
-	.zdyNav {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 14rpx 6rpx;
-	}
-	
-	.zdyNavLeft{
-		width: 120rpx;
-	}
-	.zdyNavTitle {
-		background: #FFFFFF;
-		text-align: center;
-		font-size: 32rpx;
-		font-weight: bold;
-	}
-	
-	.zdyNavRight {
-		background: #FFFFFF;
-		text-align: center;
-		font-size: 28rpx;
-		color: #3F90F7;
-		width: 120rpx;
-	}
-	
+	.zdyNavBox {
+		width: 100vw;
+		background: #FFFFFF;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 9999999;
+
+	}
+
+	.zdyNav {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 14rpx 6rpx;
+	}
+
+	.zdyNavLeft {
+		width: 120rpx;
+	}
+
+	.zdyNavTitle {
+		background: #FFFFFF;
+		text-align: center;
+		font-size: 32rpx;
+		font-weight: bold;
+	}
+
+	.zdyNavRight {
+		background: #FFFFFF;
+		text-align: center;
+		font-size: 28rpx;
+		color: #3F90F7;
+		width: 120rpx;
+	}
+
 
 
 
@@ -362,6 +375,7 @@
 		width: 750rpx;
 		height: 160rpx;
 		background: #FFFFFF;
+
 	}
 
 	.carLogo {
@@ -376,8 +390,11 @@
 		color: #333333;
 		line-height: 36rpx;
 		width: 606rpx;
+
 	}
 
+	
+
 	.carJt {
 		width: 25rpx;
 		height: 24rpx;
@@ -389,7 +406,25 @@
 		justify-content: space-between;
 		padding: 30rpx 24rpx 24rpx 34rpx;
 	}
-
+	.carBox2{
+		background-color: #FFFFFF;
+		padding: 30rpx 24rpx;
+	}
+	.carTxt2 {
+		font-size: 28rpx;
+		font-family: PingFangSC-Medium, PingFang SC;
+		font-weight: 500;
+		color: #333333;
+		line-height: 36rpx;
+		/* width: 606rpx; */
+		height: 75rpx;
+		/* 隐藏文字显示 ...超过2行省略 */
+		overflow: hidden;
+		-webkit-line-clamp: 2;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-box-orient: vertical;
+	}
 	.vinBox {
 		display: flex;
 		justify-content: space-between;

+ 31 - 3
pages/mobile/modelTwo.vue

@@ -19,7 +19,7 @@
 		<view style="height: 44px;"></view>
 		
 		
-		<view class="top">
+		<view v-if="type != 2" class="top">
 			<view class="topCont">
 				<view class="carBox">
 					<!-- <image src="../../static/img/nocar.png" mode="" class="carLogo"></image> -->
@@ -37,6 +37,13 @@
 					</view>
 				</view>
 			</view>
+		</view>
+		<view v-else class="top">
+			
+				<view class="carBox2">
+					<view class="carTxt2">{{description}}</view>
+				</view>
+		
 		</view>
 		<view class="mainBox">
 			<view class="maintitle">{{caption}}
@@ -106,7 +113,8 @@
 				iStatusBarHeight: '',
 				epc_id:'',
 				description:'',
-				chexingMesList:[],
+				chexingMesList:[],
+				type:'',
 			}
 		},
 		onLoad(opt) {
@@ -116,6 +124,7 @@
 			this.token = opt.token;
 			this.epc_id = opt.epc_id;
 			this.description=opt.description;
+			this.type = opt.type;
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.getData()
 			this.chexingMesList = uni.getStorageSync('chexingMesList');
@@ -420,7 +429,26 @@
 		justify-content: space-between;
 		padding: 30rpx 24rpx 24rpx 34rpx;
 	}
-
+	
+	.carBox2{
+		background-color: #FFFFFF;
+		padding: 30rpx 24rpx;
+	}
+	.carTxt2 {
+		font-size: 28rpx;
+		font-family: PingFangSC-Medium, PingFang SC;
+		font-weight: 500;
+		color: #333333;
+		line-height: 36rpx;
+		/* width: 606rpx; */
+		height: 75rpx;
+		/* 隐藏文字显示 ...超过2行省略 */
+		overflow: hidden;
+		-webkit-line-clamp: 2;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-box-orient: vertical;
+	}
 	.vinBox {
 		display: flex;
 		justify-content: space-between;