Przeglądaj źródła

修复指定优惠券跳转问题

hwb0 3 lat temu
rodzic
commit
39245fa687

+ 17 - 9
src/packageGoods/ticket/index.vue

@@ -1,7 +1,8 @@
 <template>
 	<view>
 		<!-- #ifdef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票列表" leftIconSize="0"></u-navbar>
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票列表" leftIconSize="0">
+		</u-navbar>
 		<!-- #endif -->
 		<!-- #ifndef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票列表"></u-navbar>
@@ -18,12 +19,13 @@
 						<!-- #ifndef MP-ALIPAY -->
 						<view class="title ells-one">{{ item.title }}</view>
 						<!-- #endif -->
-						
+
 						<view class="price">¥{{ $numberFormat(item.salePrice) }}</view>
 					</view>
 				</navigator>
 				<view style="width: 100%;">
-					<u-loadmore :line="true" v-if="list.length>8" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
+					<u-loadmore :line="true" v-if="list.length>8" :status="status" :loading-text="'努力加载中'"
+						:nomore-text="'已经到底了'" />
 				</view>
 			</view>
 			<view class="flex empty" v-if="!list.length">
@@ -39,13 +41,17 @@
 	export default {
 		data() {
 			return {
-				status: 'nomore',//上拉刷新状态
+				status: 'nomore', //上拉刷新状态
 				pageNum: 1,
 				total: 0,
 				list: [],
+				ids: []
 			};
 		},
-		onLoad() {
+		onLoad(options) {
+			if (options.ids) {
+				this.ids = JSON.parse(options.ids)
+			}
 			this.getList()
 		},
 		methods: {
@@ -57,7 +63,8 @@
 					categoryId: '',
 					tagId: '',
 					type: 'online',
-					noToken: true
+					noToken: true,
+					boxIds: this.ids
 				}
 				$http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=20`, data).then(
 					res => {
@@ -77,12 +84,12 @@
 		},
 
 		onReachBottom() {
-			if(this.total < this.pageNum * 20) return ;
+			if (this.total < this.pageNum * 20) return;
 			this.status = 'loading';
 			// setTimeout(() => {
 			++this.pageNum
-			if(this.total < this.pageNum * 20) this.status = 'nomore';
-				else this.status = 'loading';
+			if (this.total < this.pageNum * 20) this.status = 'nomore';
+			else this.status = 'loading';
 			this.getList()
 			// }, 2000)
 		},
@@ -124,6 +131,7 @@
 					font-size: 36rpx;
 					font-weight: bold;
 				}
+
 				.titletwo {
 					width: 100%;
 					line-height: 40rpx;

+ 1 - 1
src/packageOther/about/index.vue

@@ -10,7 +10,7 @@
 		<view class="about">
 			<view class="flex about-logo">
 				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
-				<view class="edition">v 2.1.8</view>
+				<view class="edition">v 2.1.9</view>
 			</view>
 			<view class="about-action">
 				<u-cell-group :border="false">

+ 6 - 5
src/packagePrize/prize/index.vue

@@ -533,7 +533,8 @@
 			},
 
 			toPrizeDetail(item) {
-				let data = JSON.parse(item.useArea)
+				let boxIds = JSON.stringify(item.boxIds)
+				let useArea = JSON.parse(item.useArea)
 				let type = JSON.parse(item.type)
 				// 1判断type,如果为门店直接跳转不需要判断useArec
 				if (type.value == 2) {
@@ -543,21 +544,21 @@
 					})
 				} else {
 					// 3为线上票使用
-					if (data.value == 3) {
+					if (useArea.value == 3 || useArea.value == 1) {
 						uni.navigateTo({
-							url: `/packageGoods/ticket/index`
+							url: `/packageGoods/ticket/index?ids=${ boxIds }`
 						})
 					}
 
 					//0为通用优惠券
-					if (data.value == 0) {
+					if (useArea.value == 0) {
 						uni.navigateTo({
 							url: `/packageGoods/ticket/index`
 						})
 					}
 
 					// 4为线下票使用
-					if (data.value == 4) {
+					if (useArea.value == 4 || useArea.value == 4) {
 						uni.navigateTo({
 							url: `/packagePrize/coupon/detail?id=${ item.id }`
 						})