twt 2 år sedan
förälder
incheckning
bdd8352e40

+ 1 - 1
main.js

@@ -5,7 +5,7 @@ import Vue from 'vue'
 import './uni.promisify.adaptor'
 Vue.config.productionTip = false
 App.mpType = 'app'
-
+//4ebed0e000a00dc4580b2d10861d4781 秘钥
 import request from 'utils/request.js'
 Vue.prototype.$http = request.http
 Vue.prototype.$ajax = request.ajax

+ 1 - 1
manifest.json

@@ -50,7 +50,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxcf7344725e280322",
+        "appid" : "wx7b55d68810dd6f1f",
         "setting" : {
             "urlCheck" : false
         },

+ 47 - 1
pages/index/byItem.vue

@@ -37,12 +37,58 @@
 		data() {
 			return {
 				optdata:'',
+				isVin:'',
+				vin:'',
+				scarid:'',
 			}
 		},
 		onLoad(opt) {
-           this.optdata=opt
+		   console.log(opt);
+           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()
+		   }
+		   
 		},
 		methods: {
+		   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 => {
+			   				
+			   		
+			   })
+		   },
            goEngineOil(){
 			   uni.navigateTo({
 			   	url:'/pages/index/engineOil?nLevelID='+this.optdata.nLevelID+'&logo='+this.optdata.logo+'&value='+this.optdata.value+'&id='+this.optdata.id

+ 17 - 5
pages/index/carConfiguration.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="content">
 	  <view class="top">
-	  	 <view class="carBrand">宝马</view>
-		 <view class="carName">宝马-iX3-华晨宝马</view>
+	  	 <view class="carBrand">{{info.brand}}</view>
+		 <view class="carName">{{info.manufactor}}-{{info.carSeries}}-{{info.salesName}}</view>
 	  </view>
 	  <view class="box">
 		  <view class="line">
@@ -57,14 +57,26 @@
 		},
 		data() {
 			return {
-				
+				nLevelIDs:'',
+				info:'',
 			}
 		},
 		onLoad(opt) {
-         
+            this.nLevelIDs=opt.nLevelID;
+			this.queryCarModelBynLevelID()
 		},
 		methods: {
-           
+           queryCarModelBynLevelID(){
+			   uni.showLoading({ title: '加载中'});
+			   this.$http('matchingByOpen/queryCarModelBynLevelID', {
+			     nLevelIDs:this.nLevelIDs,
+			   
+			     
+			    },'POST').then(res => {
+			   	uni.hideLoading();
+			   	this.info=res.data
+			   })
+		   }
 		}
 	}
 </script>

+ 1 - 2
pages/index/carModel.vue

@@ -1,8 +1,6 @@
 <template>
 	<view class="carbox">
 		
-		
-		
 		<view class="tab1 ">
 			<scroll-view  class="scroll-view" :scroll-into-view="toView" scroll-y="true" >
 				<view class="brand-select">
@@ -209,6 +207,7 @@
 				  this.displacementListShow=false;
 				  this.carGroupListShow=false;
 			  } */
+			  this.popuponeShow=false
 		  },
 		  carBack(num){
 				if(num==2){

+ 13 - 3
pages/index/engineOil.vue

@@ -13,7 +13,7 @@
 					<view class="topName">保养周期</view>
 				</view>
 				<view class="topsx"></view>
-				<view class="topLine">
+				<view class="topLine" @click="gopz">
 					<image src="../../static/img/icon_cheliang.png" mode="" class="toplineImg"></image>
 					<view class="topName">车辆配置</view>
 				</view>
@@ -24,7 +24,7 @@
 					<view class="jyzl">机油加注量:<span style="color: #FF4F00;">6.0L</span> </view>
 				</view>
 				<view class="jylineBox">
-					<view class="jyline" v-for="(item,index) in MaintainPartList">
+					<view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
 						<view class="jyimgBox">
 							<image :src="item.imgs" mode="" class="jyimg"></image>
 						</view>
@@ -76,7 +76,17 @@
 			
 			 goby(){
 				 uni.navigateTo({
-				 	url:'/pages/index/maintenance?nLevelID='+this.optdata.nLevelID
+				 	url:'/pages/index/maintenance?nLevelID='+this.optdata.nLevelID+'&id='+this.optdata.id
+				 })
+			 },
+			 godetail(e){
+				 uni.navigateTo({
+				 	url:'/pages/index/goodsDetail?id='+e.id
+				 })
+			 },
+			 gopz(){
+				 uni.navigateTo({
+				 	url:'/pages/index/carConfiguration?nLevelID='+this.optdata.nLevelID
 				 })
 			 }
 		}

+ 107 - 18
pages/index/gearboxOil.vue

@@ -2,8 +2,8 @@
 	<view class="content">
 		<view class="box">
 			<view class="historyLine">
-				<image src="http://img.db.66km.cn/carbrandlogo/B - 宝马.png" mode="" class="historylinecarImg"></image>
-				<view class="historylinecar">华晨宝马iX3 G08 电动 HA001N0电动领先型 ( 改款 )(2021-2021)过长换行</view>
+				<image :src="optdata.logo" mode="" class="historylinecarImg"></image>
+				<view class="historylinecar">{{optdata.value}}</view>
 			</view>
 		</view>
 		<view class="cont">
@@ -13,13 +13,13 @@
 					
 				</view>
 				<view class="jylineBox">
-					<view class="jyline" v-for="(item,index) in 2">
+					<view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
 						<view class="jyimgBox">
-							<image src="http://dmsphoto.66km.com.cn/thFiles/1057BA84-E59D-47B7-9F66-73E3491A443E.jpg" mode="" class="jyimg"></image>
+							<image :src="item.imgs" mode="" class="jyimg"></image>
 						</view>
 						<view class="jyName">
-							<span class="best">最佳</span>
-							<span class="jyNametxt">安耐驰 全合成机油润滑油 5W-40 SM级 4L 汽车全合成机油润滑油 </span>
+							<!-- <span class="best">最佳</span> -->
+							<span class="jyNametxt">{{item.name}} </span>
 						</view>
 					</view>
 				</view>
@@ -31,36 +31,74 @@
 				</view>
 				<view class="yhxxline">
 					<view class="yhxxlineLeft">型号/厂家</view>
-					<view class="yhxxlineRight">HU898777/DF89090/980889</view>
+					<view class="yhxxlineRight">
+						{{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.carmodelGroupGearbox ||'--' }} / {{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.manufactor||'--' }}
+					</view>
 				</view>
 				<view class="yhxxline">
 					<view class="yhxxlineLeft">原厂加注量</view>
-					<view class="yhxxlineRight">5</view>
+					<view class="yhxxlineRight">
+						{{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.fillingcapacity ||'--' }}
+					</view>
 				</view>
 				<view class="yhxxline">
 					<view class="yhxxlineLeft">换油量(L)</view>
-					<view class="yhxxlineRight">重力:5  机器:12</view>
+					<view class="yhxxlineRight">
+						重力:{{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.gravity ||'--' }} 机器:{{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.machine ||'--' }}
+					</view>
 				</view>
 				<view class="yhxxline">
 					<view class="yhxxlineLeft">换油接头</view>
-					<view class="yhxxlineRight">A24</view>
+					<view class="yhxxlineRight">
+						 {{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.oilchangeConnector ||'--' }}
+					</view>
 				</view>
 				<view class="yhxxline">
 					<view class="yhxxlineLeft">养护指导</view>
-					<view class="yhxxlineRight">养护指导这是养护指导信息这是养护指导信息这是养护指导信息这是</view>
+					<view class="yhxxlineRight">{{detail.carmodelGroupGearbox.guidance}}</view>
 				</view>
 				
 				<view class="yhxxImgBox">
-					<view class="yhxxImglineBox">
-						<view class="yhxxImgBorder">
-							<image src="http://dmsphoto.66km.com.cn/thFiles/B366C258-AE13-41F3-86A8-B0CEDD1654C0.jpg" mode="" class="yhxxImg"></image>
+					<view class="yhxxImglineBox" v-if="detail.oilchangeConnectorPhoto.length>0">
+						<view class="yhxxImgBorder" @click="showImgList(detail.oilchangeConnectorPhoto)">
+							<image :src="detail.oilchangeConnectorPhoto[0]" mode="" class="yhxxImg"></image>
 						    <view class="yhxxCkdt">
 								<image src="../../static/img/icon_pic.png" mode="" class="iconpic"></image>
-								<view class="yhxxCkdtNum">1</view>
+								<view class="yhxxCkdtNum">{{detail.oilchangeConnectorPhoto.length}}</view>
 							</view>
 						</view>
 						<view class="yhxximgName">接头位置</view>
 					</view>
+					<view class="yhxxImglineBox" v-if="detail.guidancePhoto.length>0">
+						<view class="yhxxImgBorder" @click="showImgList(detail.guidancePhoto)">
+							<image :src="detail.guidancePhoto[0]" mode="" class="yhxxImg"></image>
+						    <view class="yhxxCkdt">
+								<image src="../../static/img/icon_pic.png" mode="" class="iconpic"></image>
+								<view class="yhxxCkdtNum">{{detail.guidancePhoto.length}}</view>
+							</view>
+						</view>
+						<view class="yhxximgName">养护指导</view>
+					</view>
+					<view class="yhxxImglineBox" v-if="detail.inspectionPhoto.length>0">
+						<view class="yhxxImgBorder" @click="showImgList(detail.inspectionPhoto)">
+							<image :src="detail.inspectionPhoto[0]" mode="" class="yhxxImg"></image>
+						    <view class="yhxxCkdt">
+								<image src="../../static/img/icon_pic.png" mode="" class="iconpic"></image>
+								<view class="yhxxCkdtNum">{{detail.inspectionPhoto.length}}</view>
+							</view>
+						</view>
+						<view class="yhxximgName">检查口/加注/放油口</view>
+					</view>
+					<view class="yhxxImglineBox" v-if="detail.boxPhoto.length>0">
+						<view class="yhxxImgBorder" @click="showImgList(detail.boxPhoto)">
+							<image :src="detail.boxPhoto[0]" mode="" class="yhxxImg"></image>
+						    <view class="yhxxCkdt">
+								<image src="../../static/img/icon_pic.png" mode="" class="iconpic"></image>
+								<view class="yhxxCkdtNum">{{detail.boxPhoto.length}}</view>
+							</view>
+						</view>
+						<view class="yhxximgName">变速箱图片</view>
+					</view>
 				</view>
 				
 			</view>
@@ -79,14 +117,56 @@
 		},
 		data() {
 			return {
-
+                optdata:'',
+                MaintainPartList:[],
+				detail:'',
 			}
 		},
 		onLoad(opt) {
-
+              this.optdata=opt;
+			  this.queryMaintainPartList();
+			  this.queryGearbox()
 		},
 		methods: {
-
+		  showImgList(arr){
+			  uni.previewImage({
+				urls: arr,
+				longPressActions: {
+					itemList: ['发送给朋友', '保存图片'],
+					success: function(data) {
+						console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+					},
+					fail: function(err) {
+						console.log(err.errMsg);
+					}
+				}
+			});
+		  },
+          queryMaintainPartList(){
+			 uni.showLoading({ title: '加载中'});
+			 this.$http('partsByOpen/queryMaintainPartList', {
+			   groupId:this.optdata.id,
+			   componentCode:'007005',
+			   
+			  },'POST').then(res => {
+				uni.hideLoading();
+				this.MaintainPartList=res.data
+			 })
+          },
+		  queryGearbox(){
+			  this.$http('partsByOpen/queryGearbox', {
+			    groupId:this.optdata.id,
+			   
+			   },'POST').then(res => {
+			  				
+			  		this.detail=res.data
+			  })
+		  },
+		  godetail(e){
+		  				 uni.navigateTo({
+		  				 	url:'/pages/index/goodsDetail?id='+e.id
+		  				 })
+		  }
 		}
 	}
 </script>
@@ -234,4 +314,13 @@ line-height: 34rpx;padding-top: 16rpx;
 	.yhxxCkdtNum{
 		color: #ffffff;font-weight: 500;font-size: 20rpx;padding-left: 5rpx;    padding-bottom: 6rpx;
 	}
+	.yhxxImgBox{
+	 display: flex;
+	}
+	.yhxxImglineBox{
+		margin-right: 30rpx;
+	}
+	.yhxxImglineBox:nth-child(4){
+		margin-right: 0rpx;
+	}
 </style>

+ 19 - 15
pages/index/goodsDetail.vue

@@ -3,26 +3,18 @@
 	  <view class="uni-margin-wrap">
 			<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000"
 				:duration="duration">
-				<swiper-item>
+				<swiper-item v-for="(item,index) in info.imgList">
 					<view class="swiper-item">
-						<image src="http://dmsphoto.66km.com.cn/thFiles/09DDEDF1-A34F-491F-A7F0-B51F64B8CEE9.jpg" mode="aspectFit" class="swiper-itemImg"></image>
-					</view>
-				</swiper-item>
-				<swiper-item>
-					<view class="swiper-item">
-						<image src="http://dmsphoto.66km.com.cn/thFiles/E437A2DB-BB54-46AB-B8BA-EC44C84FE808.jpg" mode="aspectFit" class="swiper-itemImg"></image>
-					</view>
-				</swiper-item>
-				<swiper-item>
-					<view class="swiper-item">
-						<image src="http://dmsphoto.66km.com.cn/thFiles/A9157023-4939-48B7-BB49-D9D8113EF953.jpg" mode="aspectFit" class="swiper-itemImg"></image>
+						<image :src="item.imgPath" mode="aspectFit" class="swiper-itemImg"></image>
 					</view>
 				</swiper-item>
+				
 			</swiper>
 	  	</view>
 		<view style="height: 30rpx;background: #F4F5F7;"></view>
 		<view class="detail">
 			<view class="datailTitle">商品详情</view>
+			<view v-html="info.ozContent"></view>
 		</view>
 	  
 	</view>
@@ -35,14 +27,26 @@
 		},
 		data() {
 			return {
-				
+				id:'',
+				info:'',
 			}
 		},
 		onLoad(opt) {
-         
+            this.id=opt.id;
+			this.queryPartDetail()
 		},
 		methods: {
-           
+           queryPartDetail(){
+			   uni.showLoading({ title: '加载中'});
+			   this.$http('partsByOpen/queryPartDetail', {
+			     id:this.id,
+			   
+			     
+			    },'POST').then(res => {
+					uni.hideLoading();
+					this.info=res.data
+			   })
+		   }
 		}
 	}
 </script>

+ 14 - 6
pages/index/history.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="content">
 	  <view class="box">
-		  <view class="historyLine" v-for="(item,index) in 3">
-		  	<image src="http://img.db.66km.cn/carbrandlogo/B - 宝马.png" mode="" class="historylinecarImg"></image>
-		  	<view class="historylinecar">华晨宝马iX3 G08 电动 HA001N0电动领先型 ( 改款 )(2021-2021)过长换行</view>
+		  <view class="historyLine" v-for="(item,index) in historyList">
+		  	<image :src="item.logo" mode="" class="historylinecarImg"></image>
+		  	<view class="historylinecar">{{item.title}}</view>
 		  </view>
 	  </view>
 	</view>
@@ -16,14 +16,22 @@
 		},
 		data() {
 			return {
-				
+				historyList:[],
 			}
 		},
 		onLoad(opt) {
-         
+          this.queryHistory()
 		},
 		methods: {
-           
+           queryHistory(){
+			 this.$http2('queryHistory', {
+			   
+			  
+			  },'POST').then(res => {
+							
+					this.historyList=res.data
+			 })
+           },
 		}
 	}
 </script>

+ 24 - 6
pages/index/index.vue

@@ -21,17 +21,17 @@
 					<view class="historyTitle">历史查询</view>
 					<image src="../../static/img/icon_arrow.png" mode="" class="jiantouimg"></image>
 				</view>
-				<view class="historyLine" v-for="(item,index) in 3">
-					<image src="http://img.db.66km.cn/carbrandlogo/B - 宝马.png" mode="" class="historylinecarImg"></image>
-					<view class="historylinecar">华晨宝马iX3 G08 电动 HA001N0电动领先型 ( 改款 )(2021-2021)过长换行</view>
+				<view class="historyLine" v-for="(item,index) in historyList" v-if="index<3">
+					<image :src="item.logo" mode="" class="historylinecarImg"></image>
+					<view class="historylinecar">{{item.title}}</view>
 				</view>
 			</view>
 		</view>
 		<carModel ref="carModelView" ></carModel>
 		
 		<!-- 选择车型 -->
-		<view class="ckcarBox" v-if="ckCarShow">
-			<view class="ckcar">
+		<view class="ckcarBox" v-if="ckCarShow" >
+			<view class="ckcar" @click.stop="">
 				<view class="ckcarTop flex">
 					<view class="ckcarTitle">请选择车型</view>
 					<image src="../../static/img/icon_quxiao.png" mode="" class="ckcarClose" @click="ckcarClose"></image>
@@ -61,6 +61,7 @@
 				ckCarShow:false,
 				vinNum:'',
 				moreVinList:[],
+				historyList:[],
 			}
 		},
 		onLoad() {
@@ -71,6 +72,7 @@
            },500)
 		},
 		methods: {
+			
 			 uniLogin(){
 				 var that=this;
 				 uni.login({
@@ -87,7 +89,23 @@
 				  code:e.code,
 				 
 				 },'GET').then(res => {
-					 
+					 uni.setStorage({
+					 	key: 'wxdata',
+					 	data: res.data,
+					 	 success: function () {
+					 	    that.queryHistory()
+					 	 
+					 	 }
+					 }); 
+				 })
+			 },
+			 queryHistory(){
+				 this.$http2('queryHistory', {
+				   
+				  
+				  },'POST').then(res => {
+				 				
+				 		this.historyList=res.data
 				 })
 			 },
              gohistory(){

+ 20 - 2
pages/index/search.vue

@@ -26,7 +26,7 @@
 	  			<image src="../../static/img/icon_quxiao.png" mode="" class="ckcarClose" @click="ckcarClose"></image>
 	  		</view>
 	  		<view class="ckcarlineBox">
-	  			<view class="ckcarline flex" v-for="(item,index) in vinList">
+	  			<view class="ckcarline flex" v-for="(item,index) in vinList" @click="goDetal(item)">
 	  				<view class="ckcarLeft">{{item.title}}</view>
 	  				<image src="../../static/img/icon_arrow.png" mode="" class="ckcarJtimg"></image>
 	  			</view>
@@ -56,7 +56,7 @@
 	  		</view>
 	  		
 	  		<scroll-view class="brandList" scroll-y="true">
-	  			<view class="pLine" v-for="(item,index) in displacementList" @click="">{{item.displacement}}</view>
+	  			<view class="pLine" v-for="(item,index) in displacementList" @click="goDetalcx(item)">{{item.displacement}}</view>
 	  		</scroll-view>
 	  		
 	  	</view>
@@ -87,12 +87,25 @@
 				displacement:'',
 				brand:'',
 				carSeries:'',
+				isVin:'',
+				vin:'',
 			}
 		},
 		onLoad(opt) {
          
 		},
 		methods: {
+		   goDetal(e){
+			   uni.navigateTo({
+			   	url:'/pages/index/byItem?nLevelID='+e.carModelInfo.nLevelID+'&logo='+e.carModelInfo.logo+'&isVin='+this.isVin+'&value='+e.value+'&id='+e.ids+'&vin='+this.vin
+			   }) 
+		   },
+		   goDetalcx(e){
+			   console.log(e)
+			   uni.navigateTo({
+			   	url:'/pages/index/byItem?scarid='+e.id
+			   }) 
+		   },
 		   carMbtn(e){
 			   this.type=e.type;
 			   if(e.type==1){
@@ -142,6 +155,8 @@
 			   console.log(this.value.length)
 			   if(this.value.length==17){
 				   uni.showLoading({ title: '加载中'});
+				   this.isVin=1;
+				   this.vin=this.value
 				   this.$http('matchingByOpen/queryCarModelGroupByVinAggregation', {
 				     vin: this.value,type:2
 				    },'POST').then(res => {
@@ -152,6 +167,8 @@
 				   })
 			   }else{
 				   uni.showLoading({ title: '加载中'});
+				   this.isVin=0;
+				   this.vin='';
 				   this.$http('matchingByOpen/queryCarModelGroupIiPackage', {
 				     name: this.value,
 				    },'POST').then(res => {
@@ -268,6 +285,7 @@
 }
 .ssinput{
 	font-size: 28rpx;font-weight: 400;padding-left: 24rpx;line-height: 80rpx;height: 80rpx;
+	width: 600rpx;
 }
 .simg{
 	width: 34rpx;height: 34rpx;margin-top: 23rpx;margin-left:30rpx;