twt 1 year ago
parent
commit
502b5135d5

+ 1 - 0
main.js

@@ -10,6 +10,7 @@ import request from 'utils/request.js'
 Vue.prototype.$http = request.http
 Vue.prototype.$ajax = request.ajax
 Vue.prototype.$http2 = request.http2
+Vue.prototype.$http3 = request.http3
 Vue.prototype.$baseURL = request.baseURL
 const app = new Vue({
   ...App

+ 7 - 0
pages.json

@@ -77,6 +77,13 @@
 				"navigationBarTitleText": "保养周期",
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path": "pages/index/suit",
+			"style": {
+				"navigationBarTitleText": "适配车型",
+				"navigationStyle": "custom"
+			}
 		}
 	],
 	"globalStyle": {

+ 111 - 10
pages/index/byItem.vue

@@ -40,10 +40,15 @@
 							<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="jyName">
-							<!-- <span class="best">最佳</span> -->
-							<span class="jyNametxt">{{item.name}} | {{item.specificationModel}} | {{item.partsCode}} </span>
+						<view class="jylineRight">
+							<view class="jyName">
+								<span class="jyNametxt">{{item.name}} | {{item.specificationModel}} | {{item.partsCode}} </span>
+							</view>
+							<view v-for="(exObj,exindex) in item.ExtendDatas" class="exspanBox">
+							   <span class="exspan1" v-for="ex in Object.keys(exObj)" v-if="ex!='partsId'&&exObj[ex]">{{ex}}: <span class="exspan2">{{exObj[ex]}}</span></span>
+							</view>
 						</view>
+						
 					</view>
 				</view>
 				<nodata v-if="MaintainPartList.length==0"></nodata>
@@ -62,13 +67,38 @@
 							<!-- <span class="best">最佳</span> -->
 							<span class="jyNametxt">{{item.name}} | {{item.specificationModel}} | {{item.partsCode}} </span>
 						</view>
+						<view v-for="(exObj,exindex) in item.ExtendDatas" class="exspanBox">
+						   <span class="exspan1" v-for="ex in Object.keys(exObj)" v-if="ex!='partsId'&&exObj[ex]">{{ex}}: <span class="exspan2">{{exObj[ex]}}</span></span>
+						</view>
 					</view>
 				</view>
 				<nodata v-if="afterList.length==0"></nodata>
 			</view>
 		</view>
 		  
+		<view v-if="disclaimerShow" class="tiTk">
+		     <view class="disclaimerShowBOx">
+		       <view class="disclaimerTitle">免责声明</view>
+		       <view class="disclaimerTxt">
+				   <view class="disclaimerTxtLIne">1、本系统只作为查询辅助工具,在使用中如有对数据与实车配件产品不匹配疑问时,请务必核实实车配件产品及原车维修保养手册所推荐产品标准</view>
+			       <view class="disclaimerTxtLIne">2、如有系统匹配疑问,无法辅助销售,欢迎进入反馈通道及时反馈</view>
+				   <view class="disclaimerTxtLIne">3、对于使用系统中出现的个别型号不匹配的情况一切解释权归本公司所有</view>
+				   <view class="disclaimerTxtLIne">我司将会不断完善升级系统,力求为客户提供最准确,最完善的配件数据查询服务。</view>
+			   </view>
+		       <view class="disclaimerXc">
+				   <checkbox-group @change="disclaimerChange">
+					   <checkbox style="transform:scale(0.7)" value="1" :checked="disclaimerchecked"  />下次不再提醒
+				   </checkbox-group>
+				   
+		         
+		       </view>
 		
+		       <view class="disclaimerBtnBox" @click="disclaimerBtn">
+		         我知道了
+		       </view>
+		
+		     </view>
+		</view>
 	 
 	  
 	 
@@ -94,9 +124,15 @@
 				loading:false,
 				MaintainPartList:[],
 				afterList:[],
+				disclaimerShow:false,
+				disclaimerchecked:false,
 			}
 		},
 		onLoad(opt) {
+			var disclaimercheckedck=uni.getStorageSync('disclaimerchecked');
+			if(disclaimercheckedck!=1){
+			  this.disclaimerShow=true;
+			}
 		   console.log(opt);
 		   this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
            this.optdata=opt;
@@ -116,6 +152,17 @@
 		   
 		},
 		methods: {
+		   disclaimerChange(e){
+			   console.log(e)
+			   this.disclaimerchecked=e.detail.value[0]
+		   },
+		   disclaimerBtn(){
+			   console.log(this.disclaimerchecked)
+			   this.disclaimerShow=false;
+			    if(this.disclaimerchecked){
+			    uni.setStorageSync('disclaimerchecked', 1);
+			   } 
+		   },
 		   queryCarModelGroupInfo(){
 			   uni.showLoading({ title: '加载中'});
 			   this.$http('matchingByOpen/queryCarModelGroupInfo', {
@@ -188,6 +235,54 @@
 </script>
 
 <style scoped>
+.disclaimerShowBOx{
+  width: 600rpx;
+  background: #FFFFFF;
+  border-radius: 10rpx;
+  padding-top: 24rpx;
+
+}
+.jylineRight{
+	width: 450rpx;padding-left: 16rpx;
+}
+.disclaimerXc{
+	padding-left: 24rpx;
+}
+.disclaimerTitle{
+  text-align: center;font-size: 30rpx;color: #333333;
+}
+.disclaimerTxt{
+color: #333333;font-size: 28rpx;
+padding: 30rpx;line-height: 40rpx;
+}
+.disclaimerBtnBox{
+  display: flex;justify-content: center;color: #3F90F7;
+  border-top: 1px solid #EEEEEE;line-height: 90rpx;margin-top: 24rpx;
+}
+.tiTk{
+	position: fixed;
+	left: 0;top: 0;
+	background: rgba(0, 0, 0, 0.4);
+	width: 100vw;height: 100vh;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+	.exspan1{
+	  margin-top: 5rpx;
+	  font-size: 24rpx;
+	  font-family: PingFangSC-Regular, PingFang SC;
+	  font-weight: 400;
+	  color: #999999;
+	  display: block;
+	 
+	}
+	.exspan2{
+		font-size: 24rpx;
+		font-family: PingFangSC-Regular, PingFang SC;
+		color:#3C3C3C;
+		font-style: normal;
+	}
 .content{
 	min-height: 100vh;
 	background: #F4F5F7;
@@ -215,8 +310,9 @@
 }
 .title{
 	font-weight: 500;font-size: 28rpx;
-	color: #1A1A1A;
-	line-height: 40rpx;
+	color: #1A1A1A;border-top-right-radius: 16rpx;
+	line-height: 40rpx;border-top-left-radius: 16rpx;
+	padding: 30rpx;background:#FF4F00;color: #ffffff;
 }
 .lineBox{
 padding: 0 24rpx;	
@@ -296,7 +392,7 @@ color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
 	}
 	.jiyouBox{
 		border-radius: 16rpx;
-		background: #ffffff;padding: 30rpx;
+		background: #ffffff;
 	}
 	.jiyoutopTitle{
 		font-weight: 500;font-size: 28rpx;
@@ -308,15 +404,15 @@ color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
 		color: #666666;font-size: 24rpx;
 	}
 	.jyimg{
-		width: 302rpx;
-		height: 302rpx;
+		width: 200rpx;
+		height: 200rpx;
 		border-radius: 10rpx;
 	}
 	.jyline{
 		width: 302rpx;padding-top: 30rpx;
 	}
 	.jyName{
-		font-weight: 400;font-size: 22rpx;
+		font-weight: 400;font-size: 28rpx;
 		color: #1A1A1A;
 		line-height:36rpx ;
 		overflow: hidden; 
@@ -325,13 +421,18 @@ color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
 		-webkit-box-orient: vertical; 
 		-webkit-line-clamp: 2;
 		padding-top: 10rpx;
+		width: 450rpx;
 	}
 	.best{
 		color: #FF4F00;border-radius: 6rpx;
 		padding: 0 8rpx;border: 1px solid #FF4F00;
 	}
 	.jylineBox{
-		display: flex;justify-content: space-between;flex-wrap: wrap;
+		/* display: flex;justify-content: space-between;flex-wrap: wrap; */
+		padding: 0 30rpx 30rpx 30rpx;
+	}
+	.jyline{
+		display: flex;
 	}
 	.historyLineVin{
 		display: flex;background: #ffffff;

+ 90 - 3
pages/index/goodsDetail.vue

@@ -12,8 +12,38 @@
 				
 			</swiper>
 	  	</view>
+		<view class="title-2">{{ info.brand }} {{ info.categoryName }} {{ info.name }}</view>
 		<view class="name" v-if="loading">{{info.name}} | {{info.specificationModel}} | {{info.partsCode}}</view>
-		<view style="height: 30rpx;background: #F4F5F7;"></view>
+		<view style="height: 20rpx;background: #F4F5F7;"></view>
+		<view class="tdetail">
+		  <view class="spcx" @click="goSuit">
+		    <view class="spcxLeft">
+		      <view class="spcxTitle">适用车型</view>
+		      <view class="spcxCk">查看</view>
+		    </view>
+		
+		    <img src="../../static/img/a28b1812de84495f7744583740df91bc.png" alt="" class="spcxjt">
+		  </view>
+		</view>
+		<view style="height: 20rpx;background: #F4F5F7;"></view>
+		<view class="detail-container tdetail"><!-- mt10 -->
+		  <h3 class="title-3">基本信息</h3>
+		    <p class="info-box-1 "><span class="box-title">配件品质</span> {{ info.partquality?info.partquality==='0'?'原厂件':info.partquality==='1'?'品牌件':'拆车件':'--' }}</p>
+		    <p class="info-box-1 "><span class="box-title">出厂编码</span> {{ info.factoryNumber }}</p>
+		  <p class="info-box-1 "><span class="box-title">是否OE件</span> {{ info.isoe==='1'?'是':'否' }}</p>
+		  <p class="info-box-1 "><span class="box-title">包装规格</span> {{ info.packagingSpecification }}</p>
+		  <p class="info-box-1 "><span class="box-title">产地</span> {{ info.placeProduction }}</p>
+		  <p class="info-box-1 "><span class="box-title">单位</span> {{ info.measurementUnit }}</p>
+		  <p class="info-box-1 tp1"><span class="box-title">车型备注</span> <span class="tpspan1">{{ info.modelRemark }}</span> </p>
+		  <view v-if="info.extendDatas&&info.extendDatas.length" class="extendDatasBox">
+		    <h3 class="title-3">规格参数</h3>
+		    <p v-for="item in info.extendDatas" :key="item.key" v-if="item.value" class="info-box-1 tp1">
+		      <span class="box-title  ">{{ item.key }}</span> <span class="tpspan1"> {{ item.value }}</span>
+		      </p>
+		  </view>
+		</view>
+		
+		<view style="height: 20rpx;background: #F4F5F7;"></view>
 		<view class="detail">
 			<view class="datailTitle">商品详情</view>
 			
@@ -50,6 +80,11 @@
 			this.queryPartDetail()
 		},
 		methods: {
+		   goSuit(){
+			   uni.navigateTo({
+			   	url:'suit?id='+this.id
+			   })
+		   },
            queryPartDetail(){
 			   uni.showLoading({ title: '加载中'});
 			   this.loading=false;
@@ -65,6 +100,7 @@
 					this.html = this.html.replace(/\<\/iframe/gi, '</video');
 					console.log(this.html) 
 			   })
+			  
 		   },
 		   showImgList(img){
 		   	var arr=[]
@@ -88,6 +124,9 @@
 </script>
 
 <style scoped>
+.tdetail{
+	padding: 24rpx;
+}
 .swiper-itemImg{
 	width: 750rpx;
 	height: 750rpx;
@@ -107,10 +146,10 @@
 }
 .name{
 	font-weight: 500;
-	color: #1A1A1A;
+	color: #999999;
 	line-height: 40rpx;
 	font-size: 28rpx;
-	padding: 30rpx 24rpx;
+	padding: 20rpx 24rpx;
 }
 
 .detail img{
@@ -123,4 +162,52 @@
 /deep/ video{
 	 width: 750rpx;
 }
+.title-2{
+  font-size:30rpx;
+  font-weight:500;
+  color:rgba(51,51,51,1);
+  padding: 0 24rpx;
+}
+.spcxLeft{
+  display: flex;
+}
+.spcxCk{
+  font-weight: 400;
+  color: #1A1A1A;
+  padding-left: 24rpx;
+}
+.spcxTitle{
+  font-weight: 400;
+color: #999999;
+
+}
+.spcxjt{
+  width: 20rpx;height: 20rpx;
+  margin-top: 10rpx;
+}
+.spcx{
+  display: flex;color: #333333;font-size: 24rpx;
+  justify-content: space-between;
+}
+.title-3{
+  font-size:28rpx;
+  font-weight:500;
+  color: #1A1A1A;
+}
+.info-box-1{
+  font-size:24rpx;
+  font-weight:400;
+  color:#1A1A1A;
+  padding-top: 30rpx;
+  display: inline-block;
+  width: 100%;
+}
+.box-title{
+    color: #999999;
+    width: 140rpx;
+    display: inline-block;
+  }
+  .extendDatasBox{
+    padding-top: 24rpx;
+  }
 </style>

+ 3 - 1
pages/index/index.vue

@@ -13,7 +13,9 @@
 					<input type="text" placeholder="请输入车辆品牌、车系或VIN码" placeholder-class="ip" class="ssinput">
 				</view>
 				<view class="st" @click="stBtn">
-				   <image src="../../static/img/icon_shitu.png" mode="" class="stimg"></image>
+				    <image src="../../static/img/icon_shitu.png" mode="" class="stimg"></image> 
+				   <!-- <image src="http://139.196.183.144/0.jpg" mode="" class="stimg"></image> -->
+				   <!-- http://139.196.183.144/0.jpg-->
 				   <view class="shitu">识图</view>
 				</view>
 				

+ 126 - 0
pages/index/suit.vue

@@ -0,0 +1,126 @@
+<template>
+	<view class="mainCon">
+	  <homenav :iStatusBarHeight="iStatusBarHeight" :title="'适配车型'"></homenav>
+	  <view class="innerCon">
+	    <view class="detail-container">
+	      <h2 class="title-2">{{ detail.brand }} {{ detail.categoryName }} {{ detail.name }}</h2>
+	      <p class="info-2">{{ detail.partsCode }} | {{ detail.specificationModel }}</p>
+	    </view>
+	   	<view style="height: 20rpx;background: #F4F5F7;"></view>
+	    <view class="detail-container mt10 spLogoLinebox">
+	       <view class="spLogoLine">
+	         <img src="../../static/img/home_icon_1.png" alt="" class="spLogoLineImg">
+	         <view class="spLogoTitle">适用车型</view>
+	       </view>
+	    </view>
+	    <view class="spcarlinebox" v-for="(item,index) in list">
+	      <view class="spcarlineTop" @click="Ick(item)">
+	        <view class="spcarlineCarBrad">{{item.brand}}</view>
+	        <img v-if="item.ck" src="../../static/img/icon_arrow_up.png" alt="" class="spcarlineTopImg">
+	        <img v-if="!item.ck" src="../../static/img/icon_arrow_down.png" alt="" class="spcarlineTopImg">
+	      </view>
+	      <view v-if="item.ck">
+	         <view class="spcarline" v-for="(v,i) in item.list">{{v.title}}</view>
+	      </view>
+	
+	    </view>
+	
+	  </view>
+	</view>
+</template>
+
+<script>
+	import homenav from "../../components/homenav/nav.vue"
+	import nodata from '../../components/nodata/nodata.vue'
+	export default {
+		components: {
+			homenav,nodata
+		},
+		data() {
+			return {
+				detail: {},
+				current: 0,
+				list:'',
+				iStatusBarHeight:'',
+			}
+		},
+		onLoad(opt) {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
+			this.id=opt.id;
+            this.getDetail()
+		},
+		methods: {
+			Ick(item){
+			  item.ck=!item.ck
+			},
+           getDetail(){
+			 uni.showLoading({ title: '加载中'});
+			 this.$http('partsByOpen/queryCarModelGroupByPartsID', {
+			   partsId:this.id,
+			  },'POST').then(res => {
+			 	uni.hideLoading();
+				 res.data.forEach(item=>{
+				   item.ck=false
+				 })
+				  this.list = res.data
+			 })
+			 this.$http('partsByOpen/queryPartDetail', {
+			   id:this.id,
+			  },'POST').then(res => {
+			 					
+			 	this.detail=res.data;
+			 					
+			 })
+           },
+		}
+	}
+</script>
+
+<style scoped>
+.detail-container{
+	padding: 24rpx;
+}
+.info-2{
+  font-size:24rpx;
+  font-weight:400;
+  color:rgba(153,153,153,1);
+}
+.title-2{
+	font-size:30rpx;
+	font-weight:500;
+	color:rgba(51,51,51,1);
+}
+.spLogoLinebox{
+   border-bottom: 1px solid #EEEEEE;
+}
+.spLogoLineImg{
+  width: 44rpx;height: 44rpx;
+}
+.spLogoTitle{
+  font-weight: 600;
+  color: #333333;
+  font-size: 28rpx;
+  line-height: 44rpx;
+  padding-left: 16rpx;
+}
+.spcarlineTop{
+  display: flex;justify-content: space-between;
+  background: #FFFFFF;
+  padding: 30rpx 24rpx;font-weight: 500;
+color: #333333;font-size: 28rpx;
+
+}
+.spcarlineTopImg{
+ width: 24rpx;height: 24rpx;
+}
+.spcarline{
+  font-weight: 400;
+  color: #666666;
+  font-size: 28rpx;
+  padding: 16rpx 24rpx;
+}
+.spLogoLine{
+  display: flex;
+
+}
+</style>

BIN
static/img/a28b1812de84495f7744583740df91bc.png


BIN
static/img/home_icon_1.png


BIN
static/img/icon_arrow_down.png


BIN
static/img/icon_arrow_up.png


+ 42 - 2
utils/request.js

@@ -1,6 +1,8 @@
  //测试地址
- //const baseURL = 'http://192.168.0.122:8002/' 
+//const baseURL2 = 'http://192.168.0.125:20134/' 
 const baseURL='http://wiper.66km.com.cn/' 
+//const baseURL='https://wiper.66km.com.cn/' 
+
 //66正式
 /* const baseURL = 'https://apidms.66km.com/' 
  const burl2='https://apidms.66km.com/' */
@@ -78,6 +80,44 @@ const http = (url = '', date = {}, type = 'POST', header = {
         }) 
     });
 }
+const http3 = (url = '', date = {}, type = 'POST', header = {
+}) => {
+    return new Promise((resolve, reject) => {
+		header={};
+		if(uni.getStorageSync("wxdata")){
+			var openId = uni.getStorageSync("wxdata").openid;
+		}else{
+			var openId = '';
+		}
+		
+		header['openId']=openId; 
+		header['Content-Type']='application/x-www-form-urlencoded';
+		console.log(baseURL + url)
+        uni.request({
+            method: type,
+            //url: baseURL2+'search?action=' + url,
+			url: baseURL + url,
+            data: date,
+            header: header,
+            dataType: 'json',         
+        }).then((response) => {
+           
+			if(response.data.code!=0){
+			
+				uni.showToast({
+				    title: response.data.msg,
+					 icon:'none',
+				     duration: 4000,
+				});
+			}
+		 resolve(response.data);
+        
+        }).catch(error => {
+            let [err, res] = error;
+            reject(err)
+        }) 
+    });
+}
 const http2 = (url = '', date = {}, type = 'POST', header = {
 }) => {
     return new Promise((resolve, reject) => {
@@ -147,5 +187,5 @@ function refresh(url,date,type,header){
 }
 
 export default {
-	http,baseURL,ajax,http2
+	http,baseURL,ajax,http2,http3
 }