twt 4 місяців тому
батько
коміт
e32581660e
5 змінених файлів з 448 додано та 5 видалено
  1. 1 1
      manifest.json
  2. 7 0
      pages.json
  3. 15 0
      pages/index/byItem.vue
  4. 422 0
      pages/index/differential.vue
  5. 3 4
      pages/index/engineOil.vue

+ 1 - 1
manifest.json

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

+ 7 - 0
pages.json

@@ -56,6 +56,13 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/index/differential",
+			"style": {
+				"navigationBarTitleText": "分动箱差速器",
+				"navigationStyle": "custom"
+			}
+		},
 		{
 			"path": "pages/index/goodsDetail",
 			"style": {

+ 15 - 0
pages/index/byItem.vue

@@ -35,6 +35,16 @@
 				<image src="../../static/img/icon_biansuxiang.png" mode="" class="lineImg2"></image>
 			</view>
 		</view>
+	  </view>
+	  <view class="lineBox flex" style="margin-top: 20rpx;">
+	  	<view class="line" @click="godifferential">
+	  			<view class="lineTitle">分动箱差速器</view>
+	  			<view class="lineEnglish">Transfer case differential </view>
+	  			<view class="lineImgbox">
+	  				<image src="../../static/img/icon_jiyou.png" mode="" class="lineImg1"></image>
+	  			</view>
+	  		</view>
+	  		
 	  </view>
 	   <!-- <picker-view v-if="visible" :indicator-style="indicatorStyle"  @change="bindChange" class="picker-view">
 		  <picker-view-column>
@@ -151,6 +161,11 @@
 			   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
 			   })
+		   },
+		   godifferential(){
+			   uni.navigateTo({
+			   	url:'/pages/index/differential?nLevelID='+this.optdata.nLevelID+'&logo='+this.optdata.logo+'&value='+this.optdata.value+'&id='+this.optdata.id+'&isVin='+this.optdata.isVin+'&vin='+this.optdata.vin
+			   })
 		   }
 		}
 	}

+ 422 - 0
pages/index/differential.vue

@@ -0,0 +1,422 @@
+<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="cont">
+			 <view class="topBox">
+				<view class="topLine" @click="goby">
+					<image src="../../static/img/icon_baoyang.png" mode="" class="toplineImg"></image>
+					<view class="topName">保养周期</view>
+				</view>
+				<view class="topsx"></view>
+				<view class="topLine" @click="gopz">
+					<image src="../../static/img/icon_cheliang.png" mode="" class="toplineImg"></image>
+					<view class="topName">车辆配置</view>
+				</view>
+			</view> 
+			<view class="jiyouBox" v-if="loading">
+				
+				<view class="modelRemarkBox">
+					<view class="modelRemarkLine" v-for="(item,index) in brandArr"
+					 @click="modelRemarkTab(item.id)" :class="{activeMr:modelRemarkNum==item.id}">{{item.name}}</view>
+				
+				</view>
+				<view class="jiyouTop">
+					<view class="jiyoutopTitle">分动箱油</view>
+					<!-- <view class="jyzl">机油加注量:<span style="color: #FF4F00;">{{oilusage}}</span> </view> -->
+				</view>
+				<view class="jylineBox">
+					<view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
+						<view class="jyimgBox">
+							<image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
+							<image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
+						</view>
+						<view class="jylineRight">
+							<view class="jyName">
+								{{item.specificationModel}}
+							</view>
+							<view class="ruleList">
+								<view class="ruleListSpan">{{item.modelRemark}}</view>
+							</view>
+						</view>
+						
+					</view>
+				</view>
+				<nodata v-if="MaintainPartList.length==0"></nodata>
+				<view class="jiyouTop" style="padding: 20rpx 0;">
+					<view class="jiyoutopTitle">前差速器油</view>
+				</view>
+				<view class="jylineBox">
+					<view class="jyline" v-for="(item,index) in MaintainPartList2" @click="godetail(item)">
+						<view class="jyimgBox">
+							<image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
+							<image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
+						</view>
+						<view class="jylineRight">
+							<view class="jyName">
+								{{item.specificationModel}}
+							</view>
+							<view class="ruleList">
+								<view class="ruleListSpan">{{item.modelRemark}}</view>
+							</view>
+						</view>
+						
+					</view>
+				</view>
+				<nodata v-if="MaintainPartList2.length==0"></nodata>
+				<view class="jiyouTop"  style="padding: 20rpx 0;">
+					<view class="jiyoutopTitle">后差速器油</view>
+				</view>
+				<view class="jylineBox">
+					<view class="jyline" v-for="(item,index) in MaintainPartList3" @click="godetail(item)">
+						<view class="jyimgBox">
+							<image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
+							<image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
+						</view>
+						<view class="jylineRight">
+							<view class="jyName">
+								{{item.specificationModel}}
+							</view>
+							<view class="ruleList">
+								<view class="ruleListSpan">{{item.modelRemark}}</view>
+							</view>
+						</view>
+						
+					</view>
+				</view>
+				<nodata v-if="MaintainPartList3.length==0"></nodata>
+			</view>
+			
+		<!-- 	<view class="jiyouBox"  v-if="loading">
+				<view class="jiyouTop">
+					<view class="jiyoutopTitle">原厂售后推荐</view>
+				</view>
+				<view class="salesLine">
+					<view class="salesLeft">建议加注量</view>
+					<view class="salesRight">{{oilusage}}</view>
+				</view>
+				<view class="salesLine">
+					<view class="salesLeft">规格型号</view>
+					<view class="salesRight">{{spec}}</view>
+				</view>
+			</view>
+ -->
+
+		</view>
+
+
+
+	</view>
+</template>
+
+<script>
+	import nodata from '../../components/nodata/nodata.vue'
+	import homenav from "../../components/homenav/nav.vue"
+	export default {
+		components: {
+            nodata,homenav
+		},
+		data() {
+			return {
+               optdata:'',
+			   MaintainPartList:[],
+			   oilusage:'',
+			   iStatusBarHeight:'',
+			   loading:false,
+			   spec:'',
+			   modelRemarkNum:"3e7395a1-c10a-4df4-8639-34de044fd9cc",
+			   oldMaintainPartList:'',
+			   oldMaintainPartList2:'',
+			   oldMaintainPartList3:'',
+			   brandArr:[
+				  // {name:'漠驼',id:'283915b2-ae34-4238-90aa-7be4be9815c8'},
+				   {name:'领航',id:'3e7395a1-c10a-4df4-8639-34de044fd9cc'},
+				  /* {name:'领航100',id:'0ef3e44c-59c7-4911-bc68-8723a1d05c31'},
+				   {name:'领航氢洁',id:'e653bf0a-9885-4c25-a96d-986e4e285819'}, */
+				 
+			   ]
+			}
+		},
+		onLoad(opt) {
+			  console.log(opt)
+			   this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
+              this.optdata=opt;
+			  this.queryMaintainPartList()
+			  this.queryOilInfoByGroupID()
+		},
+		methods: {
+			 modelRemarkTab(id){
+				 this.modelRemarkNum=id
+				 this.queryMaintainPartList()
+					/* 
+					 var arr=[]
+					 this.oldMaintainPartList.forEach(item=>{
+						 var state=false
+						 if(item.brandId == id){
+							 state=true
+						 }
+						 
+						 if(state){
+						 	 arr.push(item)
+						 }
+					 })
+					
+					 this.MaintainPartList=arr */
+					  //this.MaintainPartList= this.oldMaintainPartList.filter(item => item.modelRemark.includes(name))
+				 
+			 },
+             queryMaintainPartList(){
+				 this.loading=false;
+				 uni.showLoading({ title: '加载中'});
+				 this.$http('partsByOpen/queryMaintainPartList', {
+				   groupId:this.optdata.id,
+				   //componentCode:'015008,015010,015011',
+				    componentCode:'015008',
+				   brandId:this.modelRemarkNum
+				  },'POST').then(res => {
+					  this.loading=true;
+				 	  uni.hideLoading();
+				 	  this.MaintainPartList=res.data
+					  //this.oldMaintainPartList=res.data
+					  //this.modelRemarkTab("283915b2-ae34-4238-90aa-7be4be9815c8")
+				 })
+				 this.$http('partsByOpen/queryMaintainPartList', {
+				   groupId:this.optdata.id,
+				   //componentCode:'015008,015010,015011',
+				   componentCode:'015010',
+				   brandId:this.modelRemarkNum
+				  },'POST').then(res => {
+				 					 
+				 	  uni.hideLoading();
+				 	  this.MaintainPartList2=res.data
+				 					 
+				 })
+				 this.$http('partsByOpen/queryMaintainPartList', {
+				   groupId:this.optdata.id,
+				   //componentCode:'015008,015010,015011',
+				   componentCode:'015011',
+				   brandId:this.modelRemarkNum
+				  },'POST').then(res => {
+				 					 
+				 	  uni.hideLoading();
+				 	  this.MaintainPartList3=res.data
+				 					 
+				 })
+			 },
+			 queryOilInfoByGroupID(){
+				 var that=this;
+				 this.$http('matchingByOpen/queryOilInfoByGroupID', {
+				  // mileage:'30000',
+				   groupId:this.optdata.id,
+				   
+				  },'POST').then(res => {
+				 		var arr = res.data
+						arr.forEach(item=>{
+							if(item[0]=='机油'){
+								that.oilusage=item[2]
+								that.spec=item[1]
+							}
+							
+						})
+						console.log(that.oilusage)
+				 })
+			 },
+			 goby(){
+				 uni.navigateTo({
+				 	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
+				 })
+			 }
+		}
+	}
+</script>
+
+<style scoped>
+.salesLine{
+	display: flex;
+	font-size: 26rpx;
+	line-height: 30rpx;
+	padding: 20rpx 0;
+}
+.salesLeft{
+	width: 200rpx;
+	color: #999999;
+}
+	.content {
+		min-height: 100vh;
+		background: #F4F5F7;
+	}
+    .jyimgBox{
+		border-radius: 10rpx;
+	}
+	.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;
+		/* border-top: 1rpx solid #EEEEEE; */
+	}
+
+	.cont {
+		padding: 30rpx 24rpx;
+	}
+	.toplineImg{
+		width: 35rpx;
+		height: 34rpx;
+	}
+	.topName{
+		line-height: 34rpx;font-weight: 400;
+color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
+	}
+	.topBox{
+		width: 702rpx;
+		height: 98rpx;
+		background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
+		border-radius: 16rpx;
+		display: flex;justify-content: center;
+	}
+	.topsx{
+		width: 2rpx;background: #ffffff;
+		margin-left: 85rpx;margin-right: 85rpx;
+		height: 54rpx;margin-top: 22rpx;
+	}
+	.topLine{
+		display: flex;padding-top: 34rpx;
+	}
+	.jiyouTop{
+		display: flex;justify-content: space-between;
+	}
+	.jiyouBox{
+		margin-top: 30rpx;border-radius: 16rpx;
+		background: #ffffff;padding: 30rpx;
+	}
+	.jiyoutopTitle{
+		font-weight: 500;font-size: 28rpx;
+		color: #1A1A1A;
+		line-height: 40rpx;
+	}
+	.jyzl{
+		font-weight: 400;line-height: 40rpx;
+		color: #666666;font-size: 24rpx;
+	}
+	.jyimg{
+		width: 130rpx;
+		height: 130rpx;
+		border-radius: 10rpx;
+	}
+	.jyline{
+		/* width: 302rpx; */
+		padding-top: 30rpx;
+		display: flex;
+		border-bottom: 1px solid #EEEEEE; 
+		padding-bottom: 20rpx;
+	}
+	.jyName{
+		font-weight: 400;font-size: 26rpx;
+		color: #1A1A1A;
+		line-height:36rpx ;
+		/* overflow: hidden; 
+		text-overflow: ellipsis; 
+		display: -webkit-box; 
+		-webkit-box-orient: vertical; 
+		-webkit-line-clamp: 2; */
+		padding-top: 10rpx;
+	}
+	.jylineRight{
+		padding-left: 20rpx;
+		width: 500rpx;
+	}
+	.best{
+		color: #FF4F00;border-radius: 6rpx;
+		padding: 0 8rpx;border: 1px solid #FF4F00;
+	}
+	.jylineBox{
+		
+	}
+	.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;
+	}
+	.ruleListSpan{
+		font-weight: 400;
+		font-size: 24rpx;
+		color: #999999;
+		line-height: 36rpx;
+		padding-right: 6rpx;
+		padding-top: 4rpx;
+	}
+	.modelRemarkBox{
+		display: flex;padding-bottom: 20rpx;
+	}
+	.modelRemarkLine{
+		background: #eee;
+		padding: 6rpx 20rpx;
+		border-radius: 6rpx;
+		margin-right: 20rpx;
+		font-size: 26rpx;
+	}
+	.activeMr{
+		background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
+		color: #FFF;
+	}
+</style>

+ 3 - 4
pages/index/engineOil.vue

@@ -99,10 +99,9 @@
 			   oldMaintainPartList:'',
 			   brandArr:[
 				   {name:'漠驼',id:'283915b2-ae34-4238-90aa-7be4be9815c8'},
-				   {name:'蓝油',id:'00d3cdf2-4ab4-4d7e-8e48-9e77624cc945'},
-				   {name:'领航1号',id:'e03f63ba-7045-4485-8adb-ee1c2d07de07'},
-				   {name:'领航',id:'0ef3e44c-59c7-4911-bc68-8723a1d05c31'},
-				   {name:'氢洁',id:'b617d3aa-0513-4fbc-b0e9-e4f65b0495fd'},
+				   {name:'领航',id:'3e7395a1-c10a-4df4-8639-34de044fd9cc'},
+				   {name:'领航100',id:'0ef3e44c-59c7-4911-bc68-8723a1d05c31'},
+				   {name:'领航氢洁',id:'e653bf0a-9885-4c25-a96d-986e4e285819'},
 				 
 			   ]
 			}