| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 | <template>	<view class="content">	  <homenav :iStatusBarHeight="iStatusBarHeight" :title="'选择保养项目'"></homenav>	  <view class="box">		  <view class="historyLine" >			  <view class="historyLogoBox">			  	<image :src="optdata.logo" mode="" class="historylinecarImg"></image>			  </view>			  <view>			  	<view class="historylinecar">{{optdata.value}}</view>			  	<view class="historyLineVin" v-if="optdata.isVin==1">			  		<view class="vinms">VIN</view>			  		<view class="vinNum">{{optdata.vin}}</view>			  	</view>			  </view>					  </view>		 	  </view>	  	  <view class="title">机油推荐</view>	  	  <view class="lineBox flex">	  	<view class="line" @click="goEngineOil">			<view class="lineTitle">机油</view>			<view class="lineEnglish">Engine Oil</view>			<view class="lineImgbox">				<image src="../../static/img/icon_jiyou.png" mode="" class="lineImg1"></image>			</view>		</view>		<view class="line" @click="goGearboxOil">			<view class="lineTitle">变速箱油</view>			<view class="lineEnglish">Gearbox Oil</view>			<view class="lineImgbox">				<image src="../../static/img/icon_biansuxiang.png" mode="" class="lineImg2"></image>			</view>		</view>	  </view>	  <view class="lineBox flex"  style="padding-top: 30rpx;">	  	<view class="line" @click="goTransmission">	  			<view class="lineTitle">变速箱滤清器</view>	  			<view class="lineEnglish">Transmission filter</view>	  			<view class="lineImgbox">	  				<image src="../../static/img/icon_glx.png" mode="" class="lineImg1"></image>	  			</view>	  		</view>	  		<view class="line" @click="goWiper">	  			<view class="lineTitle">雨刷</view>	  			<view class="lineEnglish">Wiper</view>	  			<view class="lineImgbox">	  				<image src="../../static/img/icon_ys.png" mode="" class="lineImg1"></image>	  			</view>	  		</view>	  </view>	   <!-- <picker-view v-if="visible" :indicator-style="indicatorStyle"  @change="bindChange" class="picker-view">		  <picker-view-column>			  <view class="item" v-for="(item,index) in engineList" :key="index">{{item.engineModel}}</view>		  </picker-view-column>		  	  </picker-view> -->	  <uni-popup ref="popup" type="bottom" background-color="#fff">		  <view class="popupTitle">请选择发动机</view>		  <view style="popupLineBox">			   <view @click="ckengin(item)" class="popupLine" v-for="(item,index) in engineList">{{item.engineModel}}</view>			 		  </view>	  	  </uni-popup>	</view></template><script>	import homenav from "../../components/homenav/nav.vue"	export default {		components: {			homenav		},		data() {			return {				optdata:'',				isVin:'',				vin:'',				scarid:'',				iStatusBarHeight:'',				engineList:'',				visible:false,				indicatorStyle: `height: 50px;`			}		},		onLoad(opt) {		   console.log(opt);		   this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;           this.optdata=opt;		   if(opt.scarid){			   this.scarid=opt.scarid;			   this.queryCarModelGroupInfo()		   }else{			   if(opt.isVin==1){				   this.isVin=1;				   this.vin=opt.vin			   }			   		 			   this.saveQueryHistory()		   }		   this.queryEnginemodel()		   		},		methods: {			bindChange(){							},			goWiper(){				uni.navigateTo({					url:'/pages/index/wiper?nLevelID='+this.optdata.nLevelID+'&logo='+this.optdata.logo+'&value='+this.optdata.value+'&id='+this.optdata.id+'&isVin='+this.optdata.isVin+'&vin='+this.optdata.vin				 })			},			goTransmission(){				 uni.navigateTo({					url:'/pages/index/transmissionOil?nLevelID='+this.optdata.nLevelID+'&logo='+this.optdata.logo+'&value='+this.optdata.value+'&id='+this.optdata.id+'&isVin='+this.optdata.isVin+'&vin='+this.optdata.vin				  })			},		   queryEnginemodel(){			   this.$http('matchingByOpen/queryEnginemodel', {			     ids:this.optdata.id,			    			    },'POST').then(res => {			   		this.engineList=res.data			   })		   },		   queryCarModelGroupInfo(){			   uni.showLoading({ title: '加载中'});			   this.$http('matchingByOpen/queryCarModelGroupInfo', {			     id:this.scarid,			    			    },'POST').then(res => {					uni.hideLoading();			   		var data={						value:res.data.value,						id:res.data.id,						nLevelID:res.data.carModelInfo.nLevelID,						logo:res.data.carModelInfo.logo,					}					 this.optdata=data;			   		this.saveQueryHistory()			   })		   },		   saveQueryHistory(){			   this.$http2('saveQueryHistory', {			     nLevelID:this.optdata.nLevelID,				 logo:this.optdata.logo,				 title:this.optdata.value,				 groupId:this.optdata.id,				 isVin:this.isVin,				 vin:this.vin			    },'POST').then(res => {			   							   					   })		   },		   ckengin(item){			   console.log(item)			   uni.navigateTo({			   	url:'/pages/index/goodsList?nLevelID='+this.optdata.nLevelID+'&logo='+this.optdata.logo+'&value='+this.optdata.value+'&id='+item.ids+'&isVin='+this.optdata.isVin+'&vin='+this.optdata.vin			   })		   },           goEngineOil(){			   if(this.engineList.length>1){				  this.$refs.popup.open()			   }else{				   uni.navigateTo({				   	url:'/pages/index/goodsList?nLevelID='+this.optdata.nLevelID+'&logo='+this.optdata.logo+'&value='+this.optdata.value+'&id='+this.optdata.id+'&isVin='+this.optdata.isVin+'&vin='+this.optdata.vin				   })			   }			   		   },		   goGearboxOil(){			   uni.navigateTo({			   	url:'/pages/index/gearboxOil?nLevelID='+this.optdata.nLevelID+'&logo='+this.optdata.logo+'&value='+this.optdata.value+'&id='+this.optdata.id+'&isVin='+this.optdata.isVin+'&vin='+this.optdata.vin			   })		   }		}	}</script><style scoped>.content{	min-height: 100vh;	background: #F4F5F7;}.box{	padding: 0 24rpx;	background: #ffffff;}.historylinecarImg{	width: 54rpx;	height: 54rpx;}.historyLogoBox{		display: flex;align-items: center;		padding-right: 14rpx;	}.historylinecar{	font-weight: 500;font-size: 26rpx;	color: #1A1A1A;	line-height: 46rpx;width: 636rpx;}.historyLine{	display: flex;	padding: 30rpx 0;}.title{	font-weight: 500;font-size: 28rpx;	color: #1A1A1A;padding: 30rpx 24rpx;	line-height: 40rpx;}.lineBox{padding: 0 24rpx;	}.line{	width: 332rpx;	height: 206rpx;	background: #FFFFFF;	border-radius: 16rpx;}.lineTitle{	font-weight: 500;font-size: 28rpx;padding-top: 32rpx;	color: #1A1A1A;padding-left: 30rpx;	line-height: 40rpx;}.lineEnglish{	font-weight: 400;font-size: 24rpx;	color: #999999;padding-left: 30rpx;	line-height: 34rpx;padding-top: 10rpx;}.lineImg1{	width: 82rpx;height: 96rpx;}.lineImgbox{	text-align: right;}.lineImg2{	width: 106rpx;height: 82rpx;    margin-top: 10rpx;}.historyLineVin{	display: flex;background: #ffffff;}.historyLineCar{	display: flex;justify-content: space-between;}.vinNum{	font-weight: 400;font-size: 22rpx;padding-left: 10rpx;	color: #999999;line-height: 30rpx;}.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;}.picker-view {		width: 750rpx;		height: 600rpx;		margin-top: 20rpx;	}	.popupLine {		line-height: 100rpx;		text-align: center;		font-size: 28rpx;	    display: block;	}	.popupLineBox{		 padding-bottom: env(safe-area-inset-bottom);	}	.popupTitle{		line-height: 100rpx;		text-align: center;		font-size: 30rpx;		color: #999999;	}</style>
 |