twt il y a 10 mois
Parent
commit
aa1a6c86ff
5 fichiers modifiés avec 305 ajouts et 3 suppressions
  1. 55 0
      pages/addjk/activityDetail.vue
  2. 166 2
      pages/addjk/eadit.vue
  3. 62 0
      pages/addjk/jkDetail.vue
  4. 17 0
      pages/index/index.vue
  5. 5 1
      pages/wyCar/apply.vue

+ 55 - 0
pages/addjk/activityDetail.vue

@@ -13,6 +13,18 @@
 			<view class="name2" v-if="info.startTime">{{info.startTime.slice(0,10)}}~{{info.endTime.slice(0,10)}}</view>
 			<view class="name3">{{info.activityContent}}</view>
 		</view>
+		<view class="couponPackageData">
+			<view class="couponPackageTitle">{{info.couponPackageName}}</view>
+			<view class="linecouponCont" v-for="item in packageDetailList">
+			  <view class="linecouponContLeft">
+				  <view class="couponType" v-if="item.discountType==1">满减券</view>
+				  <view class="couponType" v-if="item.discountType==2">商品券</view>
+				  <view class="couponType" v-if="item.discountType==3">服务券</view>
+				  <view class="couponName">{{item.actName}}</view>
+			  </view>
+			  <view class="couponNum">x{{item.actQty}}</view>
+			</view>
+		</view>
 		<view class="shopBox">
 			<view class="shopBoxTop">
 				<view class="shopMs">活动门店</view>
@@ -115,6 +127,7 @@
 				img:'',
 				imgListArr:'',
 				iOSInfo:'',
+				packageDetailList:'',
 			}
 		},
 		onLoad(opt) {
@@ -209,6 +222,7 @@
 						   },'GET').then(res => {
 						  		uni.hideLoading();
 								this.info=res.data.data
+								this.packageDetailList=res.data.couponList
 								// this.activityName=jkdata.activityName;
 								// this.activityContent=jkdata.activityContent;
 								// this.money=jkdata.money;
@@ -640,4 +654,45 @@
 		color: #666666;
 		font-size: 22rpx;
 	}
+	.couponPackageData{
+		background: #ffffff;
+		margin-top: 20rpx;
+	}
+	.couponPackageTitle{
+		padding-left: 24rpx;
+		padding-top: 30rpx;
+		color: #333333;
+		font-size: 32rpx;
+		line-height: 45rpx;
+		font-weight: 500;
+	}
+	.linecoupon{
+		justify-content: space-between;
+	}
+	.linecouponCont{
+		display: flex;
+		justify-content: space-between;
+		padding: 15rpx 24rpx;
+	}
+	.linecouponContLeft{
+		display: flex;
+		
+	}
+	.couponType{
+		color: #FFA511;
+		border: 1px solid #FFA511;
+		border-radius: 4rpx;
+		font-size: 18rpx;
+		line-height: 26rpx;
+		padding: 0 8rpx;
+		height: 26rpx;
+		margin-top: 5rpx;
+	}
+	.couponName{
+		font-size: 26rpx;line-height: 38rpx;color: #3C3C3C;
+		padding-left: 20rpx;
+	}
+	.couponNum{
+		font-size: 26rpx;line-height: 38rpx;color: #999999;
+	}
 </style>

+ 166 - 2
pages/addjk/eadit.vue

@@ -37,6 +37,28 @@
 				 <view class="addshop" @click="addShop">添加</view>
 			  </view>
 		  </view>
+	  </view>
+	   <view class="kk"></view>
+	  <view class="box" style="padding-bottom: 5rpx;">
+		  <view class="title">活动发放券包</view>
+		  <view class="line linecoupon" @click="gocouponShow">
+			  <view class="lineLeft">
+			  	  <span>选择券包</span>
+			  </view>
+			  <view class="lineRight" style="display: flex;">
+				  {{couponPackageData?couponPackageData.name:'请选择'}}
+			   <image src="../../static/img/jt2.png" mode="widthFix" style="width: 16rpx;margin-top: 4rpx;margin-left: 10rpx;"></image>
+			  </view>
+		  </view>
+		  <view class="linecouponCont" v-for="item in packageDetailList">
+			  <view class="linecouponContLeft">
+				  <view class="couponType" v-if="item.discountType==1">满减券</view>
+				  <view class="couponType" v-if="item.discountType==2">商品券</view>
+				  <view class="couponType" v-if="item.discountType==3">服务券</view>
+				  <view class="couponName">{{item.actName}}</view>
+			  </view>
+			  <view class="couponNum">x{{item.actQty}}</view>
+		  </view>
 	  </view>
 	  <view class="kk"></view>
 	  <view class="box"  style="padding-bottom: 0;">
@@ -201,6 +223,24 @@
 	  <view style="height: 120rpx;"></view>
 	  <view class="preview" @click="preview">预览</view>
 	  <w-compress ref='wCompress' />
+	  <view class="couponBox" v-if="couponShow">
+		  <view class="couponCont">
+			  <view class="couponTopBox">
+				  <view class="couponTop">
+					  <view class="couponTopTxrt">选择券包</view>
+					  <image src="../../static/img/chahao.png" mode="" class="couponClose" @click="couponClose"></image>
+				  </view>
+				  <view class="couponSearchBox">
+					  <image src="../../static/img/icon_search.png" mode="" class="searchImg"></image>
+					  <input v-model="couponname" type="text" placeholder="券包名称" class="topInput" @confirm="inputconfirm">
+				  </view>
+			  </view>
+			  <view class="couponLineBOx">
+				  <view class="couponLine" @click="ckcoupon(item)" v-for="(item,index) in couponPackageList">{{item.name}}</view>
+			  </view>
+			 
+		  </view>
+	  </view>
 	</view>
 </template>
 
@@ -240,6 +280,11 @@
 				groupOutState:false,
 				groupRestrictions:false,
 				isExistGroup:false,
+				couponname:'',
+				couponShow:false,
+				couponPackageList:'',
+				packageDetailList:'',
+				couponPackageData:'',
 			}
 		},
 		onLoad(opt) {
@@ -247,8 +292,9 @@
 			if(opt.id){
 				this.id=opt.id;
 				this.getDetails()
+				
 			}
-			
+			this.getcouponPackageList()
 			
 		},
 		
@@ -271,6 +317,28 @@
 			
 		},
 		methods: {
+		  ckcoupon(item){
+			  this.couponPackageData=item
+			   this.couponShow=false
+			  this.$http('openH5SetTheGuest/couponPackageDetailList', {
+			     couponPackageId:item.id
+			   },'GET').then(res => {
+			  				   this.packageDetailList=res.data
+			   })
+		  },
+		  getcouponPackageList(){
+			  this.$http('openH5SetTheGuest/couponPackageList', {
+			   
+			   },'GET').then(res => {
+				   this.couponPackageList=res.data
+			   })
+		  },
+		  couponClose(){
+			 this.couponShow=false
+		  },
+		  gocouponShow(){
+			   this.couponShow=true
+		  },
 		  nopayCl(){
 			  if(this.isExistGroup){
 				  return false
@@ -617,7 +685,9 @@
 				groupTime:this.groupTime,
 				groupMoney:this.groupMoney,
 				groupOutState:this.groupOutState?1:0,
-				groupRestrictions:this.groupRestrictions?1:0
+				groupRestrictions:this.groupRestrictions?1:0,
+				couponPackageId:this.couponPackageData.id,
+				couponPackageName:this.couponPackageData.name
 			} 
 			console.log(editdata)
 			//return false;
@@ -729,6 +799,63 @@
 </script>
 
 <style scoped>
+.couponLine{
+	font-size: 26rpx;color: #333333;
+	border-bottom: 1px solid #EEEEEE;
+	line-height: 80rpx;
+	padding-left: 30rpx;
+	
+}
+.couponLineBOx{
+	height: calc(70vh - 200rpx);
+	overflow-y: auto;
+	padding-top: 10px;
+}
+.searchImg{
+		width: 40rpx;
+		height: 40rpx;
+		margin-top: 16rpx;
+		margin-left: 20rpx;
+	}
+	.couponSearchBox{
+		width: 702rpx;
+		height: 72rpx;
+		background: #F4F5F7;
+		border-radius: 36rpx;
+		margin-left: 24rpx;
+		display:flex;
+		position: relative;
+		margin-top: 10px;
+	}
+	.topInput{
+		font-size: 28rpx;
+		height: 72rpx;
+		line-height: 72rpx;
+		padding-left: 16rpx;
+		width: 500rpx;
+	}
+.couponCont{
+	width: 100vw;
+	height: 70vh;
+	background: #ffffff;
+	margin-top: 30vh;
+	border-radius: 32rpx 32rpx 0rpx 0rpx;
+}
+.couponTop{
+	display: flex;
+	justify-content: space-between;
+	padding: 40rpx 24rpx 10rpx 24rpx;
+}
+.couponTopTxrt{
+		font-weight: 500;
+		color: #3C3C3C;
+		font-size: 30rpx;
+		line-height: 36rpx;
+	}
+	.couponClose{
+		width: 36rpx;
+		height: 36rpx;
+	}
 .content{
 	min-height: 100vh;
 	background:#F4F5F7;
@@ -841,6 +968,9 @@
 	padding: 30rpx 24rpx;
 	border-bottom: 1px solid #EEEEEE;
 }
+.linecoupon{
+	justify-content: space-between;
+}
 .linexx{
 	color: #FF3B30;
 }
@@ -954,4 +1084,38 @@
 .line3 .lineLeft{
 	display: flex;align-items: center;
 }
+.linecouponCont{
+	display: flex;
+	justify-content: space-between;
+	padding: 15rpx 24rpx;
+}
+.linecouponContLeft{
+	display: flex;
+	
+}
+.couponType{
+	color: #FFA511;
+	border: 1px solid #FFA511;
+	border-radius: 4rpx;
+	font-size: 18rpx;
+	line-height: 26rpx;
+	padding: 0 8rpx;
+	height: 26rpx;
+	margin-top: 5rpx;
+}
+.couponName{
+	font-size: 26rpx;line-height: 38rpx;color: #3C3C3C;
+	padding-left: 20rpx;
+}
+.couponNum{
+	font-size: 26rpx;line-height: 38rpx;color: #999999;
+}
+.couponBox{
+	width: 100vw;
+	height: 100vh;
+	background: rgba(0, 0, 0, 0.5);
+	position: fixed;
+	top: 0;
+	left: 0;
+}
 </style>

+ 62 - 0
pages/addjk/jkDetail.vue

@@ -13,6 +13,18 @@
 			<view class="name2">{{info.startTime.slice(0,10)}}~{{info.endTime.slice(0,10)}}</view>
 			<view class="name3">{{info.activityContent}}</view>
 		</view>
+		<view class="couponPackageData">
+			<view class="couponPackageTitle">{{info.couponPackageName}}</view>
+			<view class="linecouponCont" v-for="item in packageDetailList">
+			  <view class="linecouponContLeft">
+				  <view class="couponType" v-if="item.discountType==1">满减券</view>
+				  <view class="couponType" v-if="item.discountType==2">商品券</view>
+				  <view class="couponType" v-if="item.discountType==3">服务券</view>
+				  <view class="couponName">{{item.actName}}</view>
+			  </view>
+			  <view class="couponNum">x{{item.actQty}}</view>
+			</view>
+		</view>
 		<view class="shopBox">
 			<view class="shopBoxTop">
 				<view class="shopMs">活动门店</view>
@@ -54,6 +66,7 @@
 			<view class="bottomRight" @click="generate">生成活动</view>
 		</view>
 		
+		
 		<!-- 适用门店 -->
 		<view class="baomingBox ckshopBox" v-if="useShopShow" @click="noShowShop2">
 			<view class="baomingCont" @click.stop="">
@@ -110,6 +123,7 @@
 				bgmMusic:'',
 				payshow:false,
 				mp3Url:'',
+				packageDetailList:'',
 			}
 		},
 		onLoad(opt) {
@@ -120,6 +134,13 @@
 				uni.setNavigationBarTitle({
 				title:this.info.activityName
 				})
+				if(this.info.couponPackageId){
+					this.$http('openH5SetTheGuest/couponPackageDetailList', {
+					   couponPackageId:this.info.couponPackageId
+					 },'GET').then(res => {
+							this.packageDetailList=res.data
+					 })
+				}
 			}
 			this.getShopinfo()
             this.shopckList= uni.getStorageSync("shopckList");
@@ -542,4 +563,45 @@
 		color: #666666;
 		font-size: 22rpx;
 	}
+	.couponPackageData{
+		background: #ffffff;
+		margin-top: 20rpx;
+	}
+	.couponPackageTitle{
+		padding-left: 24rpx;
+		padding-top: 30rpx;
+		color: #333333;
+		font-size: 32rpx;
+		line-height: 45rpx;
+		font-weight: 500;
+	}
+	.linecoupon{
+		justify-content: space-between;
+	}
+	.linecouponCont{
+		display: flex;
+		justify-content: space-between;
+		padding: 15rpx 24rpx;
+	}
+	.linecouponContLeft{
+		display: flex;
+		
+	}
+	.couponType{
+		color: #FFA511;
+		border: 1px solid #FFA511;
+		border-radius: 4rpx;
+		font-size: 18rpx;
+		line-height: 26rpx;
+		padding: 0 8rpx;
+		height: 26rpx;
+		margin-top: 5rpx;
+	}
+	.couponName{
+		font-size: 26rpx;line-height: 38rpx;color: #3C3C3C;
+		padding-left: 20rpx;
+	}
+	.couponNum{
+		font-size: 26rpx;line-height: 38rpx;color: #999999;
+	}
 </style>

+ 17 - 0
pages/index/index.vue

@@ -4,6 +4,9 @@
 		{{androidData}}
 		<view @click="gojkorder">集客订单</view>
 		<view>救援订单1</view>
+		<view>
+			{{longitude}}-----{{latitude}}
+		</view>
 	</view>
 </template>
 
@@ -13,6 +16,8 @@
 			return {
 				title: 'Hello',
 				androidData:'',
+				latitude:'',
+				longitude:'',
 			}
 		},
 		onLoad() {
@@ -22,6 +27,18 @@
 		 
 		 // this.callByAndroid()
 		 // window.LoginOut=this.LoginOut
+		 /* uni.getLocation({
+		 	type: 'wgs84',
+		 	success: function (res) {
+		 		console.log('当前位置的经度:' + res.longitude);
+		 		console.log('当前位置的纬度:' + res.latitude);
+				this.latitude=res.latitude
+				this.longitude=res.longitude
+		 	},fail(err){
+				console.log(err)
+			}
+		 }); */
+		
 		},
 		created() {
 			

+ 5 - 1
pages/wyCar/apply.vue

@@ -183,7 +183,11 @@
 							url:'/pages/wyCar/success'
 						})
 					}else{
-						
+						uni.showToast({
+						     title: '二维码链接已过期,请重新生成二维码',
+						 	 icon:'none',
+						     duration: 3000,
+						 });
 					}