Parcourir la source

线下票购买使用优惠券流程调整

DELL il y a 3 ans
Parent
commit
058fdd66aa

+ 2 - 3
components/pay-popup/pay-popup.vue

@@ -65,7 +65,7 @@
 				checked: false,
 			};
 		},
-
+		
 		methods: {
 			changeChecked(e) {
 				this.checked = e
@@ -73,7 +73,7 @@
 
 			toCoupon() {
 				uni.navigateTo({
-					url: `/pages/coupon/index?couponId=${ this.payInfo.couponId }&boxId=${ this.payInfo.boxId }`
+					url: `/pages/coupon/index?couponId=${ this.payInfo.couponId }&boxId=${ this.payInfo.boxId }&ticketId=${ this.payInfo.ticketId }`
 				})
 			},
 
@@ -116,7 +116,6 @@
 				}).then(res => {
 					uni.hideLoading();
 					payIng = true
-					console.log("res.data.orderId:"+ res.data.orderId)
 					if (res.code == 0) {
 						if (res.data.needPay == 1) {
 							$http.post('/api/v1/mp/user/ticket/order/pay', {

+ 8 - 0
pages/coupon/index.vue

@@ -50,6 +50,8 @@
 				radiovalue1: '', //选中项的下标
 				couponId: '', //选中项的id
 				boxId: '',
+				ticketId:'',
+				
 			};
 		},
 		onShow() {
@@ -57,6 +59,10 @@
 		},
 		onLoad(opthios) {
 			this.boxId = opthios.boxId
+			
+			if(opthios.ticketId){
+				this.ticketId = opthios.ticketId
+			}
 			if (opthios.couponId) {
 				this.couponId = opthios.couponId
 				this.radiovalue1 = opthios.couponId
@@ -104,10 +110,12 @@
 
 			// 点击确认事件
 			exchange() {
+				console.log(this.ticketId)
 				let data = {
 					userCouponIds: this.couponId,
 					autoCoupon: 0,
 					boxId: this.boxId,
+					ticketId: this.ticketId,
 					orderNum: 1
 				}
 				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {

+ 1 - 0
pages/index/index.vue

@@ -201,6 +201,7 @@
 			// 立即开刮
 			payment() {
 				this.payInfo = this.ticketList[this.currentIndex]
+				console.log()
 				let data = {
 					userCouponIds: [],
 					autoCoupon: 1,

+ 2 - 2
pages/lucky/index.vue

@@ -75,7 +75,7 @@
 			</view>
 		</u-overlay>
 
-		<pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="getDetailInfo" />
+		<pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="getDetailInfo" v-if="payShow" />
 
 		<u-popup :show="showNull" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
 			@touchmove.prevent.stop>
@@ -312,7 +312,7 @@
 							couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
 								.data.couponList[0].title,
 							couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
-								.couponList[0].id
+								.couponList[0].id,
 						}
 						this.payInfo = info
 						this.payShow = true

+ 1 - 2
pages/prize/index.vue

@@ -79,7 +79,7 @@
 						</view>
 					</view>
 					<view class="info-now">
-						<view></view>立即使用
+						<view></view><view>查看详情</view>
 					</view>
 					<view class="flex price-title">
 						<view class="price"><text>¥</text>{{ item.discount / 100 }}</view>
@@ -286,7 +286,6 @@
 				let data = JSON.parse(item.useArea)
 				let type = JSON.parse(item.type)
 				// 1判断type,如果为门店直接跳转不需要判断useArec
-				console.log(item)
 				if (type.value == 2) {
 					// data.value 2为指定优惠券 0为通用优惠券
 					uni.navigateTo({