From 1b70393b2d1756c183aab58f0aa7ffb0d4292ac0 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期五, 01 八月 2025 14:29:16 +0800 Subject: [PATCH] 添加优惠卷跳转指定页面 --- pages/product/goods.vue | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pages/product/goods.vue b/pages/product/goods.vue index ed638ae..a7bbf36 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -499,8 +499,11 @@ async onLoad (options) { if(options.q){ - let queryParam = null; - const decodedUrl = decodeURIComponent(decodeURIComponent(option.q)); + const queryParam = { + id:'', + goodsId:'' + }; + const decodedUrl = decodeURIComponent(decodeURIComponent(options.q)); console.log('鍘熷URL:', decodedUrl); const params = this.parseUrlParams(decodedUrl); const id = params.id; @@ -645,7 +648,7 @@ this.goodsSpec = response.data.result.specs; this.PromotionList = response.data.result.promotionMap; this.goodsParams = response.data.result.goodsParamsDTOList || []; - + console.log('浼樻儬鍗锋椿鍔�--------------------銆�',response.data.result.promotionMap) // 鍒ゆ柇鏄惁鎷煎洟娲诲姩鎴栬�呯Н鍒嗗晢鍝� 濡傛灉鏈夊垯鏄剧ず鎷煎洟娲诲姩淇℃伅 this.PromotionList && Object.keys(this.PromotionList).forEach((item) => { @@ -793,8 +796,8 @@ */ back () { if (getCurrentPages().length == 1) { - uni.switchTab({ - url: "/pages/tabbar/home/index", + uni.redirectTo({ + url: "/pages/commodity-square/commoditySquare", }); } else { uni.navigateBack(); -- Gitblit v1.8.0