Browse Source

抽奖活动上线

wenjie 7 months ago
parent
commit
883bb839ac
5 changed files with 71 additions and 11 deletions
  1. 5 4
      luckyDraw/index.vue
  2. 1 1
      luckyDraw/prizeList.vue
  3. 7 3
      orderFood/index.vue
  4. 56 1
      orderFood/pay.vue
  5. 2 2
      refuel/refuelDetail.vue

+ 5 - 4
luckyDraw/index.vue

@@ -152,7 +152,7 @@
 				</view>
 				<image class="img" :src="result.prizeImg" mode=""></image>
 				<view class="address">
-					{{result.address}}
+					取货地址:{{result.address}}
 				</view>
 				<view class="notice">
 					{{result.sendType == 1?`兑换有效期:请在${result.valid}个工作日内到自提点取货,过期失效`:'优惠劵已存入【我的优惠劵】,可前往【我的优惠劵】中查看使用'}}
@@ -203,6 +203,7 @@
 		},
 		data() {
 			return {
+				fullPrize:[],//完整奖品
 				bg:'https://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/rP86PRmpk21z60fd17f0e1363aacf412d0a7f9983abb.png/1.png',
 				isPrize:false,
 				isGet:false,
@@ -379,12 +380,12 @@
 							}
 						})
 						
-						let newPrizeList = this.mergeArraysAlternately(prizeList,failList)
+						this.fullPrize = this.mergeArraysAlternately(prizeList,failList)
 						
 						this.list = prizeList
 						
 						this.prizes = []
-						newPrizeList.map((item,index)=>{
+						this.fullPrize.map((item,index)=>{
 							this.prizes.push({
 								fonts: [{
 									text: item.prizeName,
@@ -442,7 +443,7 @@
 					if (res.state == 'Success') {
 						this.$refs.myLucky.play()
 						let id = res.content.rafflePrizeId
-						this.list.map((item,index)=>{
+						this.fullPrize.map((item,index)=>{
 							if(item.id == id){
 								this.result = item
 								this.prizeIndex = index

+ 1 - 1
luckyDraw/prizeList.vue

@@ -90,7 +90,7 @@
 				</view>
 				<image class="img" :src="prizeInfo.prizeImg" mode=""></image>
 				<view class="address">
-					{{prizeInfo.address}}
+					取货地址:{{prizeInfo.address}}
 				</view>
 				<view class="notice">
 					{{prizeInfo.sendType == 1?`兑换有效期:请在${prizeInfo.valid}个工作日内到自提点取货,过期失效`:'优惠劵已存入【我的优惠劵】,可前往【我的优惠劵】中查看使用'}}

+ 7 - 3
orderFood/index.vue

@@ -43,7 +43,7 @@
 											</view>
 											<view class="num">
-												{{i.channelPrice}}
+												{{i.priceHead}}
 											</view>
 										</view>
 										<view class="old-price">
@@ -230,7 +230,7 @@
 					  "nameCn": item.nameCn,
 					  "productId": item.productId,
 					  "quantity": 1,
-					  "selPrice": item.channelPrice,
+					  "selPrice": item.priceHead,
 					  "orgPrice": item.basePrice,
 					}
 					this.carList.push(obj)
@@ -292,7 +292,10 @@
 							address:this.shopInfo.address,
 							shopId:this.shopId,
 							products:this.carList,
-							total:this.total
+							total:this.total,
+							openTime:this.shopInfo.openTime,
+							closeTime:this.shopInfo.closeTime,
+							totalNum:this.totalNum
 						}
 						uni.navigateTo({
 							url:`/orderFood/pay`,
@@ -335,6 +338,7 @@
 		onLoad(options) {
 			this.cateName = options.cateName
 			this.shopId = options.id || "63836999-5117-4980-8632-497f007808ef"
+			// this.shopId = "63836999-5117-4980-8632-497f007808ef"
 			this.shopDetail()
 			this.menuList()
 		},

+ 56 - 1
orderFood/pay.vue

@@ -30,7 +30,7 @@
 			</view>
 			<view class="total-box">
 				<view class="num">
-					共{{createQuery.products.length}}件 
+					共{{totalNum}}件 
 				</view>
 				<view class="price">
 					小计¥{{total}}
@@ -109,6 +109,23 @@
 			</button>
 		</view>
 		
+		
+		<u-modal :show="show" title="请你再次确认门店" showCancelButton cancelColor="#AAAAAA" confirmColor="#FF4D3A" cancelText="返回修改" confirmText="确认门店" @confirm="buy" @cancel="cancel">
+			<view class="modal-box">
+				<view class="shopName">
+					{{shopName}}
+				</view>
+				<view class="address">
+					{{address}}
+				</view>
+				
+				<view class="notice">
+					支付订单后无法退换,请确认下单门店!
+				</view>
+			</view>
+			
+		</u-modal>
+		
 	</view>
 </template>
 
@@ -122,6 +139,10 @@
 	export default {
 		data() {
 			return {
+				totalNum:0,
+				show:false,
+				openTime:'',
+				closeTime:'',
 				active:0,
 				loading:false,
 				shopName:'',
@@ -178,7 +199,14 @@
 			handleType(val){
 				this.createQuery.eatType = val
 			},
+			cancel(){
+				this.show = false
+			},
 			handleBuy(){
+				this.show = true
+			},
+			buy(){
+				this.show = false
 				if (this.loading) return
 					
 					this.loading = true
@@ -255,6 +283,9 @@
 				that.createQuery.shopName = data.shopName
 				that.address = data.address
 				that.total = data.total
+				that.openTime=data.openTime
+				that.closeTime=data.closeTime
+				that.totalNum = data.totalNum
 				console.log('data', data);
 			})
 		}
@@ -456,5 +487,29 @@
 			margin: 0;
 		}
 	}
+	
+	.modal-box{
+		.shop-name{
+			font-weight: 600;
+			font-size: 32rpx;
+			color: #181818;
+			width: 100%;
+		
+		}
+		.address{
+			font-weight: 300;
+			font-size: 24rpx;
+			color: #AAAAAA;
+			margin-top: 4rpx;
+			width: 100%;
+		}
+		
+		.notice{
+			margin-top: 20rpx;
+			font-weight: 300;
+			font-size: 24rpx;
+			color: #AAAAAA;
+		}
+	}
 }
 </style>

+ 2 - 2
refuel/refuelDetail.vue

@@ -592,8 +592,8 @@
 		onLoad(options) {
 			this.epId = options.epId
 			// '5154031457384536897'
-			this.storeId = '5154031457384536897'|| options.id
-			this.queryStoreDetail('5154031457384536897'||options.id)
+			this.storeId =  options.id
+			this.queryStoreDetail(options.id)
 			const eventChannel = this.getOpenerEventChannel();
 			let that = this
 			eventChannel.on('pay', function(data) {