Browse Source

首页与列表页商品详情跳转

lsx 2 years ago
parent
commit
6588d2498c
2 changed files with 16 additions and 6 deletions
  1. 1 1
      src/packageGoods/ticket/index.vue
  2. 15 5
      src/pages/index/index.vue

+ 1 - 1
src/packageGoods/ticket/index.vue

@@ -12,7 +12,7 @@
 			<view class="flex ticket-box-list">
 				<!-- <navigator :url="`/pages/ticketBox/detail?boxId=${ item.boxId }`" class="flex ticket-box-list-item"
 					hover-class="navigator-hover" v-for="(item, index) in list" :key="index"> -->
-				<navigator :url="`/packagePrize/goods/index?id=${ item.refId }&boxId=${ item.boxId }`" class="flex ticket-box-list-item"
+				<navigator :url="JSON.parse(item.refType).value === 'goods' ? `/packagePrize/goods/detail?id=${ item.refId }&boxId=${ item.boxId }`:JSON.parse(item.refType).value === 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`" class="flex ticket-box-list-item"
 					hover-class="navigator-hover" v-for="(item, index) in list" :key="index">
 					<image :src="item.picUrl" mode="aspectFill"></image>
 					<view class="info">

+ 15 - 5
src/pages/index/index.vue

@@ -511,12 +511,22 @@
 				})
 			},
 
-			// 点击盲票,跳转盲票详情
+			// 点击盲票,跳转关联商品详情
 			toTicketBox(item) {
-				//跳转商品详情
-				uni.navigateTo({
-					url: `/packagePrize/goods/index?id=${ item.refId }&boxId=${ this.ticketInfo.boxId }`
-				})
+        if(item.refType && JSON.parse(item.refType).value === 'goods'){
+          uni.navigateTo({
+            url: `/packagePrize/goods/index?id=${ item.refId }&boxId=${ this.ticketInfo.boxId }`
+          })
+        }else if(item.refType && JSON.parse(item.refType).value === 'coin'){
+          uni.navigateTo({
+            url: `/packagePrize/goods/detail?id=424`
+          })
+        }else if(item.refType && JSON.parse(item.refType).value === 'coupon' || JSON.parse(item.refType).value === 'coupon_pkg') {
+          uni.navigateTo({
+            url: `/packagePrize/goods/detail?id=425`
+          })
+        }
+
 			},
 
 			// 点击奖品,跳转到奖品详情