twt 1 рік тому
батько
коміт
fa85de0847
2 змінених файлів з 100 додано та 32 видалено
  1. 2 2
      pages/shop/confirm.vue
  2. 98 30
      pages/subPack/vipCard.vue

+ 2 - 2
pages/shop/confirm.vue

@@ -185,7 +185,7 @@
 				})
 				this.$http('openMallOrder/submitOrder', params,'POST').then(res => {
 					uni.hideLoading();
-					this.isgo=true;
+					
 					if(res.code==0){
 						this.orderData=res.data
 						this.unifiedPay(res.data)
@@ -202,7 +202,7 @@
 				this.$http('openMallOrder/unifiedPay', {
 					sheetId:res.id
 				},'POST').then(res => {
-					
+					this.isgo=true;
 					if(res.code==0){
 						
 						this.requestPayment(res.data)

+ 98 - 30
pages/subPack/vipCard.vue

@@ -11,13 +11,13 @@
 	   	</view>
 	   </view>
 	   <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
-	   <view style="height: 44px;">黄金会员</view>
+	   <view style="height: 44px;"></view>
 	   
-	   <view class="topBox">
+	   <view class="topBox" v-if="loding">
 		  <view class="topLeft1"></view>
 		   <view class="topRight1"></view> 
-		   <swiper  class="swiper" @change="spScroll">
-			   <swiper-item class="spItem" v-for="(item,index) in levelList" autoplay>
+		   <swiper  class="swiper" @change="spScroll" :current="currentspIndex " circular >
+			   <swiper-item class="spItem" v-for="(item,index) in levelList"  >
 				   <view class="topCont">
 					   <view class="vipBsbox">
 						   <img src="http://dmsphoto.66km.com.cn/thFiles/FAE86FA4-795A-4FAF-81A9-E5D35E7B9AB9.png" alt="" class="vipBsImg">
@@ -53,15 +53,15 @@
 	   <view class="contBox">
 		   <view class="vipzkBox" v-if="discountList.length>0">
 			   <view class="vipzkTop">
-				   <img src="http://dmsphoto.66km.com.cn/thFiles/19E20D8F-F478-4BC2-8B02-C565A542BA2A.png" alt="" class="vipzkTopimg">
+				   <img src="http://dmsphoto.66km.com.cn/thFiles/ADE780D4-E3B2-4005-B3A1-8CCD48279159.png" alt="" class="vipzkTopimg">
 				   <view class="vipzkTitle">会员折扣</view>
-				   <img src="http://dmsphoto.66km.com.cn/thFiles/E350EFE9-7397-4426-87F8-05B054C6ADAA.png" alt="" class="vipzkTopimg">
+				   <img src="http://dmsphoto.66km.com.cn/thFiles/B9AEA095-2ECD-4595-94F2-A52D8B93A4F2.png" alt="" class="vipzkTopimg">
 			   </view>
 			   <view class="vipzkLineBox" v-if="all">
 				   <view class="vipzkLine" v-for="(item,index) in discountList" v-if="index<8">
 					   <img v-if="item.type==2" src="http://dmsphoto.66km.com.cn/thFiles/FBF7C5A9-4436-4233-99B1-1AD3E36ABAAF.png" alt="" class="vipzkLineimg">
 					   <img v-if="item.type==1"  src="http://dmsphoto.66km.com.cn/thFiles/C417E31C-4A9E-4CCD-A401-537031E4EEA6.png" alt="" class="vipzkLineimg">
-					   <view class="vipzkNum">
+					   <view class="vipzkNum" v-if="item.discount">
 						   <span class="vipzkNumSpan1">{{item.discount/10}}</span>折
 					   </view>
 					   <view class="vipzklineMs">{{item.name}}</view>
@@ -92,19 +92,20 @@
 		   <!--赠送礼包 -->
 		   <view class="giveBox" v-if="data.packageArr.length>0">
 			   <view class="vipzkTop">
-				   <img src="http://dmsphoto.66km.com.cn/thFiles/19E20D8F-F478-4BC2-8B02-C565A542BA2A.png" alt="" class="vipzkTopimg">
+				   <img src="http://dmsphoto.66km.com.cn/thFiles/ADE780D4-E3B2-4005-B3A1-8CCD48279159.png" alt="" class="vipzkTopimg">
 				   <view class="vipzkTitle">赠送礼包</view>
-				   <img src="http://dmsphoto.66km.com.cn/thFiles/E350EFE9-7397-4426-87F8-05B054C6ADAA.png" alt="" class="vipzkTopimg">
+				   <img src="http://dmsphoto.66km.com.cn/thFiles/B9AEA095-2ECD-4595-94F2-A52D8B93A4F2.png" alt="" class="vipzkTopimg">
 			   </view>
 			   <view class="itemLineBox">
 				   <view  v-for="(item,index) in data.packageArr">
-					   <view class="itemCard">
+					   <view class="itemCard"  v-if="item.details.length>0">
 								   <view class="itemCardName">{{item.packName}}</view>
-								   <view class="itemShop">可用门店:全部门店
-									 <image src="../../static/timg/icon_arrow_right.png" mode="" class="shopit"></image>
+								   <view class="itemShop">可用门店:<span v-if="item.applyShopId">连锁共享</span> 
+								   <span v-if="!item.applyShopId">仅本店使用</span>
+									 <!-- <image src="../../static/timg/icon_arrow_right.png" mode="" class="shopit"></image> -->
 								   </view>
 					   </view>
-					   <view class="itemrowBox">
+					   <view class="itemrowBox" v-if="item.details.length>0">
 							   <view class="itemNameBox">
 								   <view class="itemNameTitle">名称</view>
 								   <view class="itemNumTitle">数量</view>
@@ -114,7 +115,8 @@
 								   <view class="itemrow" v-for="(v,i) in item.details">
 									   <view class="itemNameTitle">{{v.flowName}}</view>
 									   <view class="itemNumTitle">{{v.flowQty?v.flowQty:''}}</view>
-									   <view class="itemTimeTitle">{{v.expireNumber?v.expireNumber:'永久'}}</view>
+									   <view class="itemTimeTitle" v-if="v.expireNumber">{{v.expireNumber}}个月</view>
+									   <view class="itemTimeTitle" v-else>永久</view>
 								   </view>
 							   </view>
 					   					  
@@ -127,11 +129,11 @@
 		   <!-- 优惠券-->
 		   <view class="giveBox" v-if="data.packageArr.length>0">
 			   <view class="vipzkTop">
-				   <img src="http://dmsphoto.66km.com.cn/thFiles/19E20D8F-F478-4BC2-8B02-C565A542BA2A.png" alt="" class="vipzkTopimg">
+				   <img src="http://dmsphoto.66km.com.cn/thFiles/ADE780D4-E3B2-4005-B3A1-8CCD48279159.png" alt="" class="vipzkTopimg">
 				   <view class="vipzkTitle">优惠券</view>
-				   <img src="http://dmsphoto.66km.com.cn/thFiles/E350EFE9-7397-4426-87F8-05B054C6ADAA.png" alt="" class="vipzkTopimg">
+				   <img src="http://dmsphoto.66km.com.cn/thFiles/B9AEA095-2ECD-4595-94F2-A52D8B93A4F2.png" alt="" class="vipzkTopimg">
 			   </view>
-			   <view class="couponBox">
+			   <view class="couponBox" v-if="!all2">
 				   <view class="couponLine" v-for="(item,index) in data.couponArr">
 					   <view style="display: flex;justify-content: center;">
 						   <view class="couponName">{{item.actName}}</view>
@@ -142,21 +144,53 @@
 					   <view class="couponMs" v-else>满{{item.WhereMoney}}可用</view>
 				   </view>
 			   </view>
+			   <view class="couponBox" v-if="all2">
+					   <view class="couponLine" v-for="(item,index) in data.couponArr" v-if="index<6">
+						   <view style="display: flex;justify-content: center;">
+							   <view class="couponName">{{item.actName}}</view>
+							   <view class="couponNum">*{{item.number}}</view>
+						   </view>
+						   
+						   <view class="couponMs" v-if="item.WhereMoney==0">无门槛</view>
+						   <view class="couponMs" v-else>满{{item.WhereMoney}}可用</view>
+					   </view>
+			   </view>
+			   <view class="vipzkBottom" v-if="data.couponArr.length>6&&all2" @click="allBtn2">
+				   <view class="zkBtxt">查看全部</view>
+				   <img src="../../static/img/icon_arrow_down.png" alt="" class="zkbImg">
+			   </view>
+			   <view class="vipzkBottom" v-if="data.couponArr.length>6&&!all2" @click="allBtn2">
+				   <view class="zkBtxt">收起</view>
+				   <img src="../../static/img/icon_arrow_up.png" alt="" class="zkbImg">
+			   </view>
 			   
 			</view>	   
 			<!-- 附加权益-->
 			<view class="giveBox" v-if="data.equityArr.length>0">
 			   <view class="vipzkTop">
-				   <img src="http://dmsphoto.66km.com.cn/thFiles/19E20D8F-F478-4BC2-8B02-C565A542BA2A.png" alt="" class="vipzkTopimg">
+				   <img src="http://dmsphoto.66km.com.cn/thFiles/ADE780D4-E3B2-4005-B3A1-8CCD48279159.png" alt="" class="vipzkTopimg">
 				   <view class="vipzkTitle">附加权益</view>
-				   <img src="http://dmsphoto.66km.com.cn/thFiles/E350EFE9-7397-4426-87F8-05B054C6ADAA.png" alt="" class="vipzkTopimg">
+				   <img src="http://dmsphoto.66km.com.cn/thFiles/B9AEA095-2ECD-4595-94F2-A52D8B93A4F2.png" alt="" class="vipzkTopimg">
 			   </view>
-			   <view class="equityBox">
+			   <view class="equityBox" v-if="!all3">
 				   <view class="equityLine" v-for="(item,index) in data.equityArr">
 					   <img src="http://dmsphoto.66km.com.cn/thFiles/FB8E30CD-8771-432E-9486-3B7880DEE018.png" alt="" class="equityLineImg">
 				       <view class="equityMs">{{item.Contents}}</view>
 				   </view>
-				   
+			   </view>
+			   <view class="equityBox" v-if="all3">
+				   <view class="equityLine" v-for="(item,index) in data.equityArr" v-if="index<8">
+					   <img src="http://dmsphoto.66km.com.cn/thFiles/FB8E30CD-8771-432E-9486-3B7880DEE018.png" alt="" class="equityLineImg">
+					   <view class="equityMs">{{item.Contents}}</view>
+				   </view>
+			   </view>
+			   <view class="vipzkBottom" v-if="data.equityArr.length>8&&all3" @click="allBtn3">
+					   <view class="zkBtxt">查看全部</view>
+					   <img src="../../static/img/icon_arrow_down.png" alt="" class="zkbImg">
+			   </view>
+			   <view class="vipzkBottom" v-if="data.equityArr.length>8&&!all3" @click="allBtn3">
+					   <view class="zkBtxt">收起</view>
+					   <img src="../../static/img/icon_arrow_up.png" alt="" class="zkbImg">
 			   </view>
 			   
 			</view>	 
@@ -165,7 +199,7 @@
 	   <view class="bottom" v-if="viopId!=data.currentLevel.id">
 		  <view class="bottomLeft">
 			 <view class="price">¥ <span class="priceSpan">{{data.currentLevel.money}}</span> </view>
-			 <view class="bottomTitme" v-if="data.cLExpireDate">有效期:{{data.cLExpireDate}}</view>
+			 <view class="bottomTitme" v-if="data.cLExpireDate">有效期:{{data.cLExpireDate}}个月</view>
 			  <view class="bottomTitme" v-else>永久</view>
 		  </view>
 		  <view class="btn" @click="vipKt">立即开通</view>
@@ -187,7 +221,11 @@
 				currentIndex:'',
 				discountList:[],
 				all:true,
+				all2:true,
+				all3:true,
 				viopId:'',
+				currentspIndex:0,
+				loding:false,
 			}
 		},
 		onLoad() {
@@ -199,6 +237,12 @@
 		  allBtn(){
 			this.all=!this.all  
 		  },
+		  allBtn2(){
+		  		this.all2=!this.all2 
+		  },
+		  allBtn3(){
+		  		this.all3=!this.all3
+		  },
 		  vipKt(){
 			  uni.showToast({
 			  	title: '暂不支持,请联系门店购买',
@@ -259,10 +303,28 @@
 					})
 					this.data=res.data;
 					this.viopId=res.data.currentLevel.id;
-					this.discountList=this.data.discountProject.concat(this.data.discountGoods)
+					this.discountList=this.data.discountProject.concat(this.data.discountGoods);
+					this.loding=true;
 					//console.log(this.list)
 			    })
 		   }
+		},
+		onPullDownRefresh(){
+			console.log("onPullDownRefresh")
+			//this.data=''
+			//this.levelList=[];
+			//this.loding=false;
+			//this.currentspIndex=0
+			if(this.currentIndex){
+				this.getlist();
+			}else{
+				this.getdetail()
+			}
+			
+			setTimeout(() => {
+					uni.stopPullDownRefresh(); // 关闭下拉刷新 
+			}, 3000);
+			
 		}
 	}
 </script>
@@ -295,7 +357,7 @@
   display: flex;justify-content: space-between;
 }
 .price{
-	color: #FF4F00;font-size: 24rpx;
+	color: #FF4F00;font-size: 24rpx;font-weight: 600;
 }
 .bottomTitme{
 	color: #3C3C3C;font-size: 24rpx;padding-top: 5rpx;
@@ -324,21 +386,22 @@ color: #FCCEA5;font-size: 28rpx;margin-top: 24rpx;margin-right: 24rpx;
 .equityBox{
 	display: flex;
 	padding: 30rpx 0;flex-wrap: wrap;
+	padding-top: 10rpx;
 }
 .equityLineImg{
 	width: 86rpx;height: 86rpx;
 }
 .equityLine{
-	text-align: center;width: 25%;
+	text-align: center;width: 25%;padding-top: 20rpx;
 }
 .equityMs{
 	color: #3C3C3C;font-size: 24rpx;
 }
 .couponBox{
 	display: flex;
-	justify-content: space-around;
+	
 	padding: 30rpx 0;
-	padding-top: 10rpx;
+	padding-top: 0rpx;
 	flex-wrap: wrap;
 }
 .couponLine{
@@ -347,11 +410,15 @@ color: #FCCEA5;font-size: 28rpx;margin-top: 24rpx;margin-right: 24rpx;
 	background: url('http://dmsphoto.66km.com.cn/thFiles/95A792BC-5758-4AAA-89E2-1DE6A196C7B3.png') no-repeat;
 	background-size: 100% 100%;
 	margin-top: 20rpx;
+	margin-right: 16rpx;
+}
+.couponLine:nth-child(3n){
+	margin-right: 0rpx;
 }
 .couponName{
 	font-weight: 500;font-size: 26rpx;line-height: 37rpx;
 	color: #512108;padding-top: 22rpx;text-align: center;
-	overflow: hidden;max-width:180rpx ;
+	overflow: hidden;max-width:170rpx ;
 	   white-space: nowrap;
 	   text-overflow: ellipsis;
 	
@@ -395,7 +462,7 @@ color: #907B6E;padding-top: 10rpx;
 }
 .itemCard{
 	display: flex;justify-content: space-between;
-	
+	padding-top: 24rpx;
 color: #333333;font-size: 26rpx;
 }
 .itemCardName{
@@ -421,7 +488,7 @@ color: #333333;font-size: 26rpx;
 
 }
 .vipzkLine{
-	margin:30rpx 30rpx 0 30rpx;	width: 112rpx;text-align: center;
+	width: 25%;text-align: center;padding-top: 30rpx;
 }
 .vipzkLineimg{
 	width: 82rpx;height: 82rpx;
@@ -442,6 +509,7 @@ color: #1F2026;margin-top: -15rpx;position: relative;
 	color: #3C3C3C;font-size: 24rpx;
 	line-height: 33rpx;padding-top: 10rpx;
 	text-align: center;
+	padding-left: 10rpx;padding-right: 10rpx;
 }
 .vipzkBox{
 	background: linear-gradient(180deg, #FFFDFA 0%, #FFFAF3 100%) #FFF7EA;