guo 2 vuotta sitten
vanhempi
commit
987f02963a
4 muutettua tiedostoa jossa 69 lisäystä ja 27 poistoa
  1. 13 1
      pages/mobile/CarDetail.vue
  2. 10 6
      pages/mobile/OemSearch.vue
  3. 40 14
      pages/mobile/group.vue
  4. 6 6
      pages/mobile/index.vue

+ 13 - 1
pages/mobile/CarDetail.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="box">
+		<view class="top">{{chexing}}</view>
 		<view class="mainBox">
 			
 			<view class="workBox2" v-for="(item,index) in chexingMesList" :key="index">
@@ -24,12 +25,14 @@
 			return {
 				
 				chexingMesList:[],
+				chexing:'',
 			}
 		},
 		onLoad(opt) {
 			var list = uni.getStorageSync('chexingMesList');
 			this.chexingMesList = list[0].views;
 			console.log('list',this.chexingMesList);
+			this.chexing = uni.getStorageSync('chexing');
 		},
 		methods: {
 			
@@ -41,10 +44,18 @@
 	.box {
 		min-height: 100vh;
 		background: #F4F5F7;
-		padding-top: 20rpx;
+		
 		padding-bottom: constant(safe-area-inset-bottom);
 		padding-bottom: env(safe-area-inset-bottom);
 	}
+	.top{
+		background: #FFFFFF;
+		padding: 20rpx 24rpx;
+		color: #333333;
+		font-size: 30rpx;
+		font-weight: bold;
+		margin-bottom: 20rpx;
+	}
 	.mainBox {
 		background: #FFFFFF;
 		min-height: 100vh;
@@ -80,5 +91,6 @@
 		width: 60%;
 		color: #333333;
 		margin-right: 10rpx;
+		word-break:break-all;
 	}
 </style>

+ 10 - 6
pages/mobile/OemSearch.vue

@@ -13,16 +13,16 @@
 		</view>
 
 
-		<!-- <view class="history" v-if="searchValue.length==0">
+		<view class="history" v-if="searchValue.length==0">
 			<view class="historyTop">
 				<view class="historyTopTxt">历史搜索</view>
-				<image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image>
+				<!-- <image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image> -->
 			</view>
-			<view v-for="(item,index) in historyList" class="historyLIneBox">
-				<view class="historyLIne" @click="gogroup">前刹车片</view>
+			<view v-for="(item,index) in 1" class="historyLIneBox">
+				<view class="historyLIne" @click="goSearch('16400RZDH01')">16400RZDH01</view>
 			</view>
 
-		</view> -->
+		</view>
 
 
 		<view @click="goCarModelList(item.partnum)" class="commentBox" v-for="(item,index) in itemList" :key="index">
@@ -86,7 +86,11 @@
 				this.page = 1;
 				this.getItemData();
 			},
-			
+			goSearch(str){
+				this.searchValue = str
+				this.page = 1;
+				this.getItemData();
+			},
 			// 配件查询
 			getItemData() {
 				uni.showLoading({

+ 40 - 14
pages/mobile/group.vue

@@ -75,7 +75,8 @@
 				param: '',
 				token: '',
 				epc_id: '',
-				chexingMesList:[],
+				chexingMesList:[],
+				chexing:''
 			}
 		},
 		onLoad(opt) {
@@ -114,7 +115,8 @@
 							this.param = res.data.result.list[0].param;
 						}
 						if (Object.keys(res.data.result.vehicle).length != 0)  {
-							this.chexingMesList = res.data.result.vehicle.tree
+							this.chexingMesList = res.data.result.vehicle.tree;
+							this.chexing = res.data.result.vehicle.description;
 						}
 					} else {
 
@@ -165,7 +167,8 @@
 						}
 						
 						if (Object.keys(res.data.result.vehicle).length != 0) {
-							this.chexingMesList = res.data.result.vehicle.tree
+							this.chexingMesList = res.data.result.vehicle.tree;
+							this.chexing = res.data.result.vehicle.description;
 						}
 					} else {
 						uni.showToast({
@@ -180,14 +183,22 @@
 			goCarDetail() {
 				var that = this;
 				uni.setStorage({
-					key: 'chexingMesList',
-					data: that.chexingMesList,
+					key: 'chexing',
+					data: that.chexing,
 					success: function() {
-						uni.navigateTo({
-							url: 'CarDetail'
-						})
+						
+						uni.setStorage({
+							key: 'chexingMesList',
+							data: that.chexingMesList,
+							success: function() {
+								uni.navigateTo({
+									url: 'CarDetail'
+								})
+							}
+						});
 					}
-				});
+				});
+				
 				
 			},
 			goOemSearch() {
@@ -200,11 +211,26 @@
 				console.log('返回');
 				uni.navigateBack({})
 			},
-			goTwo(item) {
-				uni.navigateTo({
-					url: 'modelTwo?vin=' + this.vin + '&zzTime=' + this.zzTime + '&param=' + item.param +
-						'&token=' + item.token + '&epc_id=' + this.epc_id
-				})
+			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
+								})
+							}
+						});
+					}
+				});
+				
 			}
 		}
 	}

+ 6 - 6
pages/mobile/index.vue

@@ -7,16 +7,16 @@
 				<!-- <image src="../../static/img/icon_camera.png" mode="" class="cameraImg"></image> -->
 			</view>
 		</view>
-		<!-- <view class="history">
+		<view class="history">
 			<view class="historyTop">
 				<view class="historyTopTxt">历史搜索</view>
-				<image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image>
+				<!-- <image src="../../static/img/icon_delete.png" mode="" class="historyDelImg"></image> -->
 			</view>
-			<view v-for="(item,index) in 3" class="historyLIneBox">
-				<view class="historyLIne" @click="gogroup2('LVHFC1663G6003140')">LVHFC1663G6003140</view>
+			<view v-for="(item,index) in 1" class="historyLIneBox">
+				<view class="historyLIne" @click="gogroup2('LVHRE4877A5013603')">LVHRE4877A5013603</view>
 			</view>
 			
-		</view> -->
+		</view>
 	</view>
 </template>
 
@@ -24,7 +24,7 @@
 	export default {
 		data() {
 			return {
-				vin: 'LVHFC1663G6003140'
+				vin: ''
 			}
 		},
 		onLoad() {