Browse Source

样式修改

twt 3 days ago
parent
commit
d02b22e278
3 changed files with 86 additions and 3 deletions
  1. 1 1
      pages/index/goodsList.vue
  2. 2 1
      pages/index/history.vue
  3. 83 1
      pages/index/search.vue

+ 1 - 1
pages/index/goodsList.vue

@@ -173,7 +173,7 @@
 						logo:res.data.carModelInfo.logo,
 					}
 					 this.optdata=data;
-					//this.saveQueryHistory();
+					this.saveQueryHistory();
 					 this.queryMaintainPartList()
 			   })
 			},

+ 2 - 1
pages/index/history.vue

@@ -102,5 +102,6 @@
 }
 .historyLogoBox{
 		display: flex;align-items: center;
-	}
+}
+
 </style>

+ 83 - 1
pages/index/search.vue

@@ -19,8 +19,25 @@
 		  <!-- 	<image src="http://img.db.66km.cn/carbrandlogo/B - 宝马.png" mode="" class="historylinecarImg"></image> -->
 		  	<view class="historylinecar" @click="carMbtn(item)">{{item.title}}</view>
 		  </view>
-		  <nodata v-if="loading&&carMlist.length==0"></nodata>
+		  <nodata v-if="loading&&carMlist.length==0&&value"></nodata> 
 	  </view>
+	  <view class="historybox" v-if="!value&&carMlist.length==0">
+	   <view class="historyTitle">历史记录</view>
+	   <view class="historyLine" v-for="(item,index) in historyList" @click="goGoodsList(item)">
+		<view class="historyLineCar">
+			<view class="historyLogoBox">
+				<image :src="item.logo" mode="" class="historylinecarImg"></image>
+			</view>
+			<view>
+				<view class="historylinecar">{{item.title}}</view>
+				<view class="historyLineVin" v-if="item.ifVin">
+					<view class="vinms">VIN</view>
+					<view class="vinNum">{{item.vin}}</view>
+				</view>
+			</view>
+		</view>
+	  </view>
+	 </view>
 	  
 	  <!-- 选择车型 -->
 	  <view class="ckcarBox" v-if="ckCarShow">
@@ -105,6 +122,7 @@
 				bizType:'',
 				carModel:'',
 				focuszt:false,
+				historyList:[],
 			}
 		},
 		onLoad(opt) {
@@ -117,6 +135,8 @@
 		 /* this.$nextTick(() => {
 		     this.$refs.myInput.focus();
 		  }); */
+		 
+		 this.queryHistory()
 		
 		},
 		 onReady() {
@@ -126,6 +146,16 @@
 		    });
 		  },
 		methods: {
+			queryHistory(){
+			 //this.loading=false;
+			 this.$http2('queryHistory', {
+			   
+			  
+			  },'POST').then(res => {
+					//this.loading=true;		
+					this.historyList=res.data
+			 })
+			},
 		   searchDel(){
 			   console.log("清除")
 			   this.value=''
@@ -138,6 +168,11 @@
 			    	url:'/pages/index/goodsList?nLevelID='+e.carModelInfo.nLevelID+'&logo='+e.carModelInfo.logo+'&isVin='+this.isVin+'&value='+e.value+'&id='+e.ids+'&vin='+this.vin
 			    })
 		   },
+		   goGoodsList(e){
+			   uni.navigateTo({
+			    	url:'/pages/index/goodsList?nLevelID='+e.nLevelID+'&logo='+e.logo+'&isVin='+e.ifVin+'&value='+e.title+'&id='+e.groupID+'&vin='+e.vin
+			    })
+		   },
 		   goDetalcx(e){
 			   console.log(e)
 			  /* uni.navigateTo({
@@ -390,4 +425,51 @@
 	display: flex;justify-content: space-between;
 	padding: 30rpx 0;border-bottom: 1rpx solid #EEEEEE;
 }
+.historylinecarImg{
+	width: 54rpx;
+	height: 54rpx;
+}
+.historylinecar{
+	font-weight: 400;font-size: 26rpx;
+	color: #1A1A1A;
+	line-height: 46rpx;width: 636rpx;
+}
+.historyLine{
+	
+	padding: 30rpx 0;border-top: 1rpx solid #EEEEEE;
+}
+.historyLineCar{
+	display: flex;justify-content: space-between;
+}
+.vinms{
+	width: 38rpx;
+	height: 26rpx;
+	background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
+	border-radius: 4rpx;
+	text-align: center;
+	line-height: 26rpx;
+	font-weight: 600;
+	color: #FFFFFF;
+	font-size: 18rpx;
+	margin-top: 2rpx;
+}
+.historyLineVin{
+	display: flex;
+}
+.vinNum{
+	font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
+	color: #999999;line-height: 30rpx;
+}
+.historyLogoBox{
+		display: flex;align-items: center;
+	}
+.historybox{
+		padding: 0 24rpx;
+}
+.historyTitle{
+	padding: 24rpx 0;font-size: 28rpx;color: #999999;
+}
+.historybox .historyLogoBox{
+	padding-right: 10rpx;
+}
 </style>