| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740 | <template>	<view class="carbox">				<view class="tab1 ">						<scroll-view  class="scroll-view" :scroll-into-view="toView" scroll-y="true" >				<view class="brand-select">					<template v-for="item in carModelList">					  <view :id="item['首字母']" v-if="item['首字母']!='热'">						<view class="brand-select-title" :id="item['首字母']+'-model'">						  <h5 :class="{'brand-select-titleselect':item['首字母']==toView}">{{item['首字母']}}</h5>						</view>					   							<view class="brand-select-wrapper">								<a class="brand-select-item" v-for="item2 in item['品牌列表']" @click="selectBrand(item2)" :id="item2.brand">								  <img :src="item2.logo" class="brand-select-item-icon">								  <span>{{item2.brand||item2.name}}</span>								</a>							</view>					   					  </view>					  <view :id="'rm'" v-if="item['首字母']=='热'" class="rmview">						<view class="brand-select-title" :id="item['首字母']+'-model'">						  <h5 :class="{'brand-select-titleselect':toView=='rm'}">{{item['首字母']}}</h5>						</view>		   							<view class="brand-select-wrapper">								<a class="brand-select-item" v-for="item2 in item['品牌列表']" @click="selectBrand(item2)" :id="item2.brand">								  <img :src="item2.logo" class="brand-select-item-icon">								  <span>{{item2.brand||item2.name}}</span>								</a>							</view>					   					  </view>					</template>				 </view>		    </scroll-view > 			<view class="fast-navigation">				<a class="fast-navigation-sel" v-if="item['首字母']=='热'" :class="{'select':toView=='rm'}" v-for="item in carModelList" @tap="bindToView(item)">热</a>			   <a class="fast-navigation-sel" v-if="item['首字母']!=='热'" :class="{'select':item['首字母']==toView}" v-for="item in carModelList" @tap="bindToView(item)">{{item['首字母']}}</a>			</view>					</view>		<!-- uni-popup -->		<view class="popupone"  @click="popupc" v-if="popuponeShow">			<view class="popup-content" >				<scroll-view class="brandList" scroll-y="true">										<view style="height: 10px;"></view>					<view v-for="item in carSeriesList" :key="item.manufactor" class="brandListkk">					  <h3 class="cell-item-title">{{ item.manufactor }}</h3>					  <span v-for="item2 in item.carSeries" :key="item2" :title="item2" class="span-cell" @click="selectCarFactory(item.manufactor,item2)" >{{item2}}</span>					</view>					<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>					<view class="status_bar" style="height: 50px;"></view>				</scroll-view>							</view>		</view> 				<!-- 排量 -->				<!-- 		<view class="displacementListBox" v-show="displacementListShow">			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>					<h3 class="carModel-nav-title">				<view class="carModel-nav-title—left">					<img :src="selectedCarBrand.logo" class="carModel-nav-title-img" @click="$emit('changeStep', 1)">					<span class="carModel-nav-title-msg carModel-nav-title-msg1">{{ selectedCarBrand.brand }} {{ carSeries }}</span>				</view>			    <view class="carBack" @click="carBack(1)">上一步</view>			  			</h3>			<scroll-view scroll-y="true" class="brandList">			  <view @click="selectDisplacement(item)" v-for="item in displacementList" class="displacementListLine" >			    {{item}}			  </view>			  <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>			  <view class="status_bar" style="height: 50px;"></view>			</scroll-view>		</view> -->		<!-- 排量 -->		<!-- 离合器 -->		<!-- <view class="carGroupListBox" v-show="carGroupListShow">			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>						<h3 class="carModel-nav-title">				<view class="carModel-nav-title—left">					<img :src="selectedCarBrand.logo" class="carModel-nav-title-img" @click="$emit('changeStep', 1)">					<span class="carModel-nav-title-msg carModel-nav-title-msg1">{{ selectedCarBrand.brand }} {{ carSeries }}{{displacement}}</span>				</view>				<view class="carBack" @click="carBack(2)">上一步</view>			</h3>			<scroll-view scroll-y="true" class="brandList">			  <view @click="goList(item)" v-for="item in carGroupList" class="displacementListLine" >			    {{item.title}}			  </view>			  <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>			  <view class="status_bar" style="height: 50px;"></view>			</scroll-view>		</view> -->		<!-- 离合器 -->				<!-- 搜索的 -->	<!-- 	<view class="carssListBox" v-show="carssListShow" @click="carssListShow=false">			<view class="carssListBoxCont" >				<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>				<h3 class="carModel-nav-title">					<view class="carModel-nav-title—left">						<span class="carModel-nav-title-msg" style="padding-left: 24rpx;">{{carName}}</span>					</view>									</h3>				<scroll-view scroll-y="true" class="brandList">				  <view @click.stop="ssitem(item)" v-for="item in carsslist" class="carsslineTxt" >				    {{item.title}}				  </view>				  <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>				  <view class="status_bar" style="height: 50px;"></view>				</scroll-view>			</view>		</view> -->				<!-- <view class="carssListBox2" v-show="secondShow" @click.stop="secondShow=false">			<view class="carssListBoxCont">				<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>				<h3 class="carModel-nav-title">					<view class="carModel-nav-title—left">						<span class="carModel-nav-title-msg" style="padding-left: 24rpx;">{{ssname1}}</span>					</view>					<view class="carBack" @click="secondShow=false">上一步</view>				</h3>				<scroll-view scroll-y="true" class="brandList">				  <view @click.stop="seconditem(item)" v-for="item in secondlist" class="carsslineTxt" >				    {{item.title}}				  </view>				  <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>				  <view class="status_bar" style="height: 50px;"></view>				</scroll-view>			</view>					</view>		<view class="carssListBox2" v-show="ssdisplacementListShow" @click.stop="ssdisplacementListShow=false">			<view class="carssListBoxCont">				<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>				<h3 class="carModel-nav-title">					<view class="carModel-nav-title—left">						<span class="carModel-nav-title-msg " style="padding-left: 24rpx;">{{ssname2}}</span>					</view>					<view class="carBack" @click="ssdisplacementListShow=false">上一步</view>				</h3>				<scroll-view scroll-y="true" class="brandList">				  <view @click="golistnew(item)" v-for="item in ssdisplacementList" class="carsslineTxt" >				    {{item.displacement}}				  </view>				  <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>				  <view class="status_bar" style="height: 50px;"></view>				</scroll-view>			</view>					</view> -->		<!-- 搜索的 -->	</view></template><script>	export default {		//props:['iStatusBarHeight','svHeight'],		data() {			return {				carModelList:'',				toView:'',				type:'right',				iStatusBarHeight:0,				selectedCarBrand:'',				brand:'',				carSeriesList:'',				manufactor:'',				carSeries:'',				displacementList:'',				displacementListShow:false,				selectedCarSeries:'',				displacement:'',				carGroupList:'',				carGroupListShow:false,				carsslist:[],				carName:'',				carssListShow:false,				secondShow:false,				secondlist:'',				carItem:'',				ssdisplacementListShow:false,				ssdisplacementList:'',				ssname1:'',				ssname2:'',				popuponeShow:false,				type:'',			}		},		onLoad(opt) {          this.type=opt.type		  this.getdata()		   		},		methods: {		  aaa(){			 return {height: `calc(100vh - 44px)`}; 		  },		  popupc(e){			 /* console.log(e)			  if(!e.show){				  this.displacementListShow=false;				  this.carGroupListShow=false;			  } */			  this.popuponeShow=false		  },		  carBack(num){				if(num==2){					this.carGroupListShow=false;				}				if(num==1){					this.displacementListShow=false;				}		  },		  getcarsslist(){			  this.secondShow=false;			  this.ssdisplacementListShow=false;			   uni.showLoading({ title: '加载中'});			  this.$http('matchingByOpen/queryCarModelGroupIiPackage', {			  		name:this.carName				  }, 'POST').then(res => {				  uni.hideLoading();				  this.carssListShow=true;				  this.carsslist=res.data			  //	this.carModelList=res.data.brands			  				  })		  },		  ssitem(item){			  this.carItem=item;			  uni.showLoading({ title: '加载中'});			  if(item.type==1){				  var params={					  type:item.type,					  manufactor:item.manufactor,				  }				  this.$http('matchingByOpen/queryCarModelGroupIiPackageSecond', params, 'POST').then(res => {				  	this.secondlist=res.data;				  				this.secondShow=true;				  	  uni.hideLoading();				  })			  }else if(item.type==2){				  var params={					  type:item.type,					  manufactor:item.manufactor,					  brand:item.brand,					  carSeries:item.carSeries				  }				  this.$http('matchingByOpen/queryCarModelGroupIiPackageSecond', params, 'POST').then(res => {				  	this.secondlist=res.data;				  			this.secondShow=true;				  	  uni.hideLoading();				  })			  }else{				  if(item.displacementList.length==1){					  uni.navigateTo({					  	url:'list?type=2&id='+item.displacementList[0].id					  })				  }else{					  this.ssdisplacementList=item.displacementList;					  this.ssdisplacementListShow=true;					  this.ssname2=item.title;				  }				 				  			  }			   this.ssname1=item.title			 			  		  },		  seconditem(item){			  if(item.displacementList.length==1){			  					  uni.navigateTo({			  					  	url:'list?type=2&id='+item.displacementList[0].id			  					  })			  }			  else{				 this.ssdisplacementList=item.displacementList;				 this.ssdisplacementListShow=true;				 this.ssname2=item.title 			  }			  			 // this.$refs.popup.open("right2")			  //this.popupShow=true;		  },		  carNameInput(){			//console.log(this.carName)  			if(this.carName==''){				this.carssListShow=false;				this.secondShow=false;				this.ssdisplacementListShow=false;			}		  },          getdata(){			 			  uni.showLoading({ title: '加载中'});			 			  this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;			  this.$http('matchingByOpen/queryCarModelGroupPackage', {						  }, 'POST').then(res => {				   console.log("matchingByOpen/queryCarModelGroupPackage")				  console.log(res)			  	  this.carModelList=res.data.brands;				   			  	  uni.hideLoading();				 			  }).catch((err) => {				  console.log(err)			  })		  },		  selectBrand(item){		  	console.log(item)		  	this.selectedCarBrand=item;		  	//this.$refs.popup.open("right")		  	this.popuponeShow=true;		  	this.brand=item.brand		  	this.getbrand()		  },		  getbrand(){		  	uni.showLoading({ title: '加载中'});		  	this.$http('matchingByOpen/queryCarModelGroupPackage', {		  	  brand:this.brand		  	 },'POST').then(res => {		  		uni.hideLoading();		  		this.carSeriesList=res.data.carSeriesList		  	})		  },		  selectCarFactory(manufactor,item){		  	this.manufactor=manufactor;		  	this.carSeries=item;			console.log(manufactor)			console.log(item)			console.log(this.selectedCarBrand)		  	//this.selectedCarSeries=item		  	//this.displacementListShow=true;		  	//this.getdisplacementList()			uni.navigateTo({				url:'/pages/index/displacement?logo='+this.selectedCarBrand.logo+'&manufactor='+manufactor+'&carSeries='+item+'&brand='+this.selectedCarBrand.brand+"&type="+this.type			})		  },		  getdisplacementList(){		  	uni.showLoading({ title: '加载中'});		  	this.$http('matchingByOpen/queryCarModelGroupPackage', {		  	  brand:this.brand,		  	  manufactor:this.manufactor,		  	  carSeries:this.carSeries		  	 },'POST').then(res => {		  		uni.hideLoading();		  		this.displacementList=res.data.displacementList		  	})		  },		  selectDisplacement(item){		  	this.displacement=item;		  	this.carGroupListShow=true;		  	this.getmodelList();		  },		  getmodelList(){		  	uni.showLoading({ title: '加载中'});		  	this.$http('matchingByOpen/queryCarModelGroupPackage', {		  	  brand:this.brand,		  	  manufactor:this.manufactor,		  	  carSeries:this.carSeries,		  	  displacement:this.displacement		  	 },'post').then(res => {		  		uni.hideLoading();		  		this.carGroupList=res.data.carGroupList		  	})		  },		  goList(item){			  console.log(item)			   this.$store.commit('mutationslistId', item.id)			  uni.navigateTo({			  	url:'list?name='+item.value+'&nLevelID='+item.carModelInfo.nLevelID+'&id='+item.id			  })		  },		  golistnew(item){			  uni.navigateTo({			  	url:'list?type=2&id='+item.id			  })		  },		  bindToView(item){		  	console.log(item)		  	if(item['首字母']=='热'){		  			this.toView ='rm'		  	}else{		  			this.toView = item['首字母']		  	}		  	console.log(this.toView)		  			  },		  close(){		  	//this.$refs.popup.close()		  },		}	}</script><style scoped lang="scss">.popupone{	width: 100vw;height: 100vh;	background:rgba(0, 0, 0, 0.4) ;	position: fixed;top: 0;left: 0;	z-index: 11;}.brandListkk{	/* padding-top: 44px; */}.brand-select .rmview .brand-select-title{	/* background: #fff; */}.rmview{	border-radius: 16rpx;overflow: hidden;}.carModel-nav-title-left{		display: flex;	}	.carModel-nav-title{		display: flex;		justify-content: space-between;	}	.carBack{		line-height: 100rpx;		font-size: 30rpx;		font-family: PingFangSC-Medium, PingFang SC;		font-weight: 500;		color: #FFFFFF;		padding-right: 24rpx;	}	.carSs{		width: 750rpx;		height: 96rpx;		background: #FFFFFF;		padding-top: 24rpx;		position: fixed;		z-index: 999;		left: 0;		top:90rpx;		/* top: calc(44px + 96rpx); */	}	.carssBox{		width: 702rpx;		height: 72rpx;		background: #F4F5F7;		border-radius: 36rpx;		margin: 0 auto;			}	.carSsImg{		width: 40rpx;		height: 40rpx;		margin-top: 16rpx;		margin-left: 20rpx;	}	.carssInput{		line-height:72rpx;		font-size: 28rpx;		height:72rpx;		padding-left: 16rpx;		width: 600rpx;	}	.carssBox{		display: flex;	}	.brand-select{	  .brand-select-title{	    height: 64rpx;	   	    position: relative;	    h5{	      position: absolute;	      height:40rpx;	      font-size:28rpx;	      font-weight:500;	      color:#1a1a1a;	      line-height:40rpx;	      top: 12rpx;	      left: 30rpx;	    }	  }	  .brand-select-wrapper{	    display: flex;	    flex-wrap: wrap;	    background:rgba(255,255,255,1);		width: 714rpx;border-radius: 16rpx;	    .brand-select-item{	      display: block;	      width: 80rpx;	      min-height: 100rpx;	      padding: 30rpx;	      img{	        display: inline-block;	        margin-left: 10rpx;	        width: 60rpx;	        height: 60rpx;	      }	      span{	        display: inline-block;	        text-align: center;	        height:33rpx;	        width: 90rpx;	        font-size:22rpx;	        font-weight:400;	        color:#1a1a1a;	        line-height:33rpx;	      }	    }		  }	}	.fast-navigation{	  position: absolute;	  text-align: center;	  right: 10rpx;	  top: 0rpx;	  width: 34rpx;	  font-size:24rpx;	  font-weight:500;	  line-height:35rpx;	  color: rgb(153, 153, 153);	  a{	    display: block;		padding-top: 6rpx;		padding-left: 10rpx;	  }	  .select{	    color: #FF4F00;	  }	}	.scroll-view{		/* height: calc(100vh - 120rpx); */		height: 100vh;	}	.brand-select{		padding-bottom: 100rpx;	}	.popup-height {			width: 200px;	}	.popup-content{		width: 80vw;		background: #FFFFFF;		height: 100vh;		margin-left: 20vw;		/* padding-top: 20rpx; */	}	.carModel-nav-title{	  height:100rpx;	  background: linear-gradient(110deg, #48B9F9 0%, #3F90F7 100%);	  line-height: 100rpx;	  display: flex;	  z-index: 500;	  &.cell-logo{	    position: sticky;	    top: 0;	   background: linear-gradient(110deg, #48B9F9 0%, #3F90F7 100%);	  }	  .carModel-nav-title-box{	    width: 100%;	    display: flex;	  }	  .carModel-nav-title-img{	    margin: 20rpx;	    width: 60rpx;	    height: 60rpx;	  }	  .carModel-nav-title-msg{	    font-size:30rpx;	    font-weight:400;	    color:rgba(255,255,255,1);	    display: block;	    padding-right: 20rpx;		width: 400rpx;		overflow: hidden;		text-overflow: ellipsis; 				white-space: nowrap; 	  }	  .carModel-nav-title-msg1{		  width: 300rpx;	  }	}	.cell-item-title{	 line-height: 69rpx;padding-left: 24rpx;	  width: 520rpx;margin-left: 30rpx;	  height: 69rpx;	  background: #FF4F00 linear-gradient(132deg, #FF8635 0%, #FF4828 100%);	  border-radius: 16rpx;	  font-weight: 500;	  color: #FFFFFF;font-size: 28rpx;	}	.span-cell{	  position: relative;	  display: -webkit-box;	  display: -webkit-flex;	  display: flex;	  box-sizing: border-box;	  width: calc(100% - 60rpx);	  padding: 6rpx 24rpx;	  overflow: hidden;	  color: #323233;	  font-size: 26rpx;	  line-height: 82rpx;	  height: 82rpx;	  background-color: #fff;	  border-bottom: 1px solid #ebedf0;	  margin-left: 30rpx;	}	.span-cell:nth-last-child(1){		border-bottom: none;	}	.carModel-nav-title{	  height:100rpx;	 background: linear-gradient(110deg, #48B9F9 0%, #3F90F7 100%);	 line-height: 100rpx;	  display: flex;	  z-index: 500;	  &.cell-logo{	    position: sticky;	    top: 0;	   background: linear-gradient(110deg, #48B9F9 0%, #3F90F7 100%);	  }	  .carModel-nav-title-box{	    width: 100%;	    display: flex;	  }	  .carModel-nav-title-img{	    margin: 20rpx;	    width: 60rpx;	    height: 60rpx;	  }	  .carModel-nav-title-msg{	    font-size:30rpx;	    font-weight:400;	    color:rgba(255,255,255,1);	    display: block;	    padding-right: 20px;	  }	}	.carbox{		/* height: calc(100vh - 120rpx); */		padding: 0 18rpx;		padding-top: 20rpx;	}	.brandList{		/* height: calc(100vh - 45px); */		/* padding-bottom:var(--status-bar-height); */		height: 100vh;	}	.displacementListLine{		min-height: 50rpx;		padding: 20rpx 20rpx 20rpx 30rpx;		font-size:28rpx;		font-weight:600;		color:rgba(51,51,51,1);		line-height:50rpx;		border-top: 2rpx solid rgb(238, 238, 238);		background-color: rgb(255, 255, 255);	}	.carsslineTxt{		// height: 98rpx;		background: #FFFFFF;		line-height:50rpx;		color: #333333;		font-size: 28rpx;		padding: 0 24rpx;		border-bottom: 1px solid #EEEEEE;		padding: 20rpx 20rpx 20rpx 30rpx;	}	.displacementListBox{		position: fixed;		top: 97rpx;		left: 20vw;		width: 80vw;		height: 100vh;		background:#F4F5F7 ;		z-index: 11111;		/*  #ifdef H5 */		top:calc(210rpx);		/*  #endif  */	}	.carGroupListBox{		position: fixed;		top: 0;		left: 20vw;		width: 80vw;		height: 100vh;		background:#F4F5F7 ;		z-index: 11111;		top: 210rpx;		/*  #ifdef H5 */	/* 	top:calc(44px + 220rpx); */		/*  #endif  */	}	.carssListBox{		position: fixed;		top: 0;		left: 0;		width: 200vw;		height: 100vh;		background: rgba(0,0,0,0.5) ;		z-index: 11111;		/*  #ifdef H5 */		top:calc( 210rpx);		/*  #endif  */	}	.carssListBoxCont{		background: #FFFFFF;width: 80vw;margin-left: 20vw;height: 100vh;	}	.carssListBox2{		position: fixed;		top: 0;		left: 0;		width: 100vw;		height: 100vh;		background: rgba(0,0,0,0) ;		z-index: 11112;		top:calc(210rpx);			}	.brand-select-titleselect{		    color: #FF4F00 !important;	}	.tab1{		position: relative;	}</style>
 |