twt il y a 3 mois
Parent
commit
5e9d8db222
3 fichiers modifiés avec 134 ajouts et 33 suppressions
  1. 44 13
      pages/index/index.vue
  2. 17 7
      pages/subPack/maintain.vue
  3. 73 13
      pages/subPack/maintainItem.vue

+ 44 - 13
pages/index/index.vue

@@ -208,23 +208,24 @@
 					
 				</view>
 				<view class="goodsLIneBox" v-if="tabType==3">
-					<view class="goodsLine" @click="goMaintain">
+					<view class="goodsLine" @click="goMaintain(item)" v-for="(item,index) in byList">
 						<view class="goodsLeft">
-							<image class="goodsIcon" src="../../static/img2/icon_1.png" mode=""></image>
+							<image class="goodsIcon" v-if="item.mainImgUrl" :src="item.mainImgUrl" mode=""></image>
+							<image class="goodsIcon" v-else src="../../static/timg/noimg.png" mode=""></image>
 						</view>
 						<view class="goodsRight">
 							<view class="goodsRtop">
-								<view class="goodsName">全合成机油保养2次</view>
-								<view class="goodsMs">含:发动机机油、机油滤芯、雾化杀菌等</view>
+								<view class="goodsName">{{item.title}}</view>
+								<view class="goodsMs">{{item.title}}</view>
 							</view>
 							<view class="goodsRb">
 								<view class="goodsCBox">
 									<view class="goodsCLeft">
 										<view style="display: flex;"><view class="goodsTitle">2次更划算</view></view>
-										<view class="goodsPriceBox">
-											<span class="goodsPrice1">¥</span>
-											<span class="goodsPrice2">294</span>
-											<span class="goodsPrice3">/次¥588</span>
+										<view class="goodsPriceBox" v-for="(v,i) in item.packageItems" v-if="v.isDefault==1">
+											<span class="goodsPrice11">¥</span>
+											<span class="goodsPrice22">{{v.money}}</span>
+											<!-- <span class="goodsPrice33">/次¥588</span> -->
 										</view>
 									</view>
 									<view class="goodsCRight">
@@ -437,6 +438,7 @@
 				OpenMGoods:'',
 				openMActivity:'',
 				tabType:'',
+				byList:'',
 			}
 		},
 		onLoad(opt) {
@@ -532,9 +534,9 @@
 			}, 1000);
 		},
 		methods: {
-			goMaintain(){
+			goMaintain(item){
 			  uni.navigateTo({
-			  	url:'../subPack/maintain'
+			  	url:'../subPack/maintainItem?maintainId='+item.id
 			  })	
 			},
 			tabData(){
@@ -549,6 +551,14 @@
 				  },'GET').then(res => {
 				 	 this.openMActivity=res.data
 				  })
+				 
+			},
+			getHomeList(){
+				this.$http('openMaintain/home-list', {
+				    carId:this.carInfo.id
+				 },'GET').then(res => {
+					 this.byList=res.data
+				 })
 			},
 			tabFn(index,tpye){
 			  this.tabIndex=index	
@@ -863,8 +873,14 @@
 					    this.getShopinfo(6,item.orShopId)
 						
 					}else if(item.bizType==7){ //7门店列表
-						uni.navigateTo({
+						/* uni.navigateTo({
+							url:'shopList'
+						}) */
+						/* uni.switchTab({
 							url:'shopList'
+						}) */
+						uni.navigateTo({
+							url:'../subPack/maintain'
 						})
 					}else if(item.bizType==8){ //我的会员卡
 						uni.navigateTo({
@@ -1244,6 +1260,7 @@
 								this.carInfo=''
 							}
 							 this.$store.commit('mutationscarInfo', this.carInfo)
+							 this.getHomeList()
 							 this.jsTime()
 				  		}
 				  	 				
@@ -1593,7 +1610,7 @@
 }
 .goodsLine{
 	background: #FFFFFF;border-radius: 16rpx;
-	padding: 24rpx;
+	padding: 24rpx;margin-bottom: 20rpx;
 }
 .goodsIcon{
 	width: 246rpx;border-radius: 12rpx;
@@ -1997,7 +2014,21 @@ color: #EC0F0A;margin-right: 10rpx;
 		font-weight: 500;
 		color: #FF0000;
 	}
-	
+	.goodsPrice11{
+		font-size: 20rpx;
+		color: #EC0F0A;
+		padding-top: 8rpx;
+	}
+	.goodsPrice22{
+		font-size: 34rpx;
+			font-weight: 500;
+		color: #EC0F0A;
+		padding-top: 10rpx;
+	}
+	.goodsPrice33{
+		font-size: 22rpx;
+		color: #8B8B8B;
+	}
 	.goodsPrice4{
 		font-size: 24rpx;
 		font-weight: 400;

+ 17 - 7
pages/subPack/maintain.vue

@@ -2,10 +2,11 @@
 <view class="box">
  <view class="top" :style="{background:'#'+themeColor}">
 	 <view class="inputBox">
-		 <view class="ibLeft">
-			 <image class="ibCarIcon" src="../../static/timg/nocar.png" mode=""></image>
+		 <view class="ibLeft" @click="goCkcar">
+			<image class="ibCarIcon" v-if="carInfo.brandLogo" :src="carInfo.brandLogo" mode=""></image>
+			 <image class="ibCarIcon" v-else src="../../static/timg/nocar.png" mode=""></image>
 			 <view class="ibCarBox">
-				 <view class="ibCar">大众 捷达</view>
+				 <view class="ibCar">{{carInfo.brand?carInfo.brand:''}}&nbsp;{{carInfo.series?carInfo.series:''}}</view>
 				 <image src="../../static/img2/xia.png" mode="" class="xiaIcon"></image>
 			 </view>
 		 </view>
@@ -134,7 +135,7 @@
 	</view>
  </view>
  <!-- 提交订单弹框-->
- <view class="tkBox">
+ <view class="tkBox" v-if="tkShow">
 	 <view class="tkCont">
 		 <view class="tkTop">
 			 <image class="tkImg" src="../../static/timg/noimg.png" mode=""></image>
@@ -193,6 +194,8 @@
 				themeColor:'',
 				ext:'',
 				goodsnum:1,
+				tkShow:false,
+				carInfo:'',
 			}
 		},
 		onLoad(opt) {
@@ -202,11 +205,17 @@
 				frontColor: "#000000",
 				backgroundColor: '#' + this.themeColor
 			})
+			this.carInfo=this.$store.state.carInfo;
+			console.log(this.carInfo)
+			this.getRecommend()
 		},
 		onShow() {
 			
 		},
 		methods: {
+			goCkcar(){
+				
+			},
 			goItem(){
 			  uni.navigateTo({
 			  	url:'maintainItem'
@@ -217,12 +226,13 @@
 					url:'maintainSubmit'
 				})
 			},
-			getAboutMember(){
+			getRecommend(){
 				uni.showLoading({
 					title: '加载中'
 				})
-				this.$http('miniApp2/sys/getAboutMember', {
-				    unionID:this.unionID
+				this.$http('open-apply/get-recommend', {
+				    carId:this.carInfo.id,
+					bizId:'F4BCDD75-F72B-48D6-8455-631297AA939D'
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					

+ 73 - 13
pages/subPack/maintainItem.vue

@@ -14,17 +14,17 @@
  </view>
  <view class="shopCont">
  	<view class="shopCtop">
- 		<view class="goodsPrice">
+ 		<view class="goodsPrice" >
  			<view class="goodsPrice2">¥</view>
- 			<view class="goodsPrice3">294</view>
- 			<view class="goodsPrice4" >原价:¥1998</view>
+ 			<view class="goodsPrice3">{{itemDefault.money}}</view>
+ 			<view class="goodsPrice4" v-if="itemDefault.showCrossedPrice==1">原价:¥{{itemDefault.crossedPrice}}</view>
  		</view>
  		<view class="shareBox" >
 			<view class="shareTxt">分享</view>
 			<image class="shareIcon" src="../../static/timg/share.png" mode=""></image>
 		</view>
  	</view>
- 	<view class="goodsName">【豪华车型】全合成机油保养套餐</view>
+ 	<view class="goodsName">{{detail.title}}</view>
  	<view class="goodsMSBox" >
 		<view class="goodsMs">高级全合成</view>
 		<view class="goodsMs">可选用5W30/5W40/0W20</view>
@@ -41,7 +41,7 @@
  <view class="buyBOx">
 	 <view class="buyLine">
 		 <view class="buyTitle">已选车型</view>
-		 <view class="buyData">奥迪A42006款2.0TFSI无极 标准型(国2)
+		 <view class="buyData">{{carInfo.carModel?carInfo.carModel:''}}
 		   <image class="jtIcon" src="../../static/timg/jthei.png" mode=""></image>
 		 </view>
 	 </view>
@@ -109,9 +109,19 @@
  <view class="goodsDetail" >
  	<view class="goodsDetailTitle">商品详情</view>
  	<!-- <view v-html="info.details" style="background: #fff;"></view> -->
- 	 <rich-text :nodes="details" style="background: #fff;"></rich-text>
+ 	 <rich-text :nodes="detail.detailContent" style="background: #fff;"></rich-text>
  </view>
  
+ <view class="bottomTianc"></view>
+  
+  <view class="bottom">
+ 	 <view class="bleft">
+ 		<image class="kefuIcon" src="../../static/img2/kefu.png" mode=""></image>
+ 		<view style="text-align: center;font-size: 20rpx;color: #110B01;">客服</view>
+ 	</view>
+ 		 <view class="Btn" @click="submitFn">提交订单</view>
+ 	</view>
+ 
  
 </view>
 </template>
@@ -131,18 +141,30 @@
 					{url:'http://dmsphoto.66km.com.cn/thFiles/53DA3E26-5FA3-42DE-95A4-10BA255290A6.png'},
 				],
 				goodsnum:1,
-				details:'11233'
+				details:'11233',
+				maintainId:'',
+				detail:'',
+				itemDefault:'',
+				carInfo:'',
+				
 			}
 		},
 		onLoad(opt) {
 			this.ext = this.$common.getExtStoreId();
 			this.themeColor = uni.getStorageSync("themeColor");
-			
+			this.maintainId=opt.maintainId
+			this.carInfo=this.$store.state.carInfo;
+			this.getdetail()
 		},
 		onShow() {
 			
 		},
 		methods: {
+			submitFn(){
+				uni.navigateTo({
+					url:'maintainSubmit'
+				})
+			},
 			calculation(type){
 				if(type==1){
 					if(this.goodsnum>1){
@@ -153,16 +175,21 @@
 						this.goodsnum++
 				}
 			},
-			getAboutMember(){
+			getdetail(){
 				uni.showLoading({
 					title: '加载中'
 				})
-				this.$http('miniApp2/sys/getAboutMember', {
-				    unionID:this.unionID
+				this.$http('openMaintain/detail/'+this.maintainId, {
+				   /* maintainId:this.maintainId */
 				}, 'GET').then(res => {
 					uni.hideLoading();
-					
-				
+					this.detail=res.data
+					this.detail.packageItems.forEach(item=>{
+						if(item.isDefault==1){
+							 this.itemDefault=item
+						}
+					})
+				   
 				})
 			},
 			
@@ -449,5 +476,38 @@ color: #666E80;
 }
 .goodsDetail image{
 	width: 750rpx;
+}.bottom{
+	background: #FFFFFF;
+	display: flex;
+	justify-content: space-between;
+	position: fixed;
+	width: 100%;
+	padding:30rpx 0;
+    padding-bottom: constant(safe-area-inset-bottom);
+	padding-bottom: env(safe-area-inset-bottom); 
+	left: 0;bottom: 0;
+	box-shadow: 0rpx -2rpx 16rpx 0rpx rgba(153,153,153,0.2);
+}
+.bleft{
+	font-weight: 500;
+	color: #222222;
+	padding-left: 50rpx;
+}
+.Btn{
+	width: 532rpx;text-align: center;
+	height: 86rpx;line-height: 86rpx;
+	background: #FCD903;
+	border-radius: 43rpx;
+	font-size: 32rpx;
+	color: #110B01;
+	margin-right: 36rpx;
+}
+.kefuIcon{
+	width: 50rpx;height: 50rpx;
+}
+.bottomTianc{
+	height: 160rpx;
+	padding-bottom: constant(safe-area-inset-bottom);
+	padding-bottom: env(safe-area-inset-bottom); 
 }
 </style>