From e7ab0004cd249c5164d0490d8ba622aa4f475be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Tue, 27 Oct 2026 15:37:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BC=98=E6=83=A0=E5=88=B8):=20=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E7=BC=96=E7=A0=81?= =?UTF-8?q?=20title=EF=BC=8C=E4=BC=98=E6=83=A0=E5=88=B8=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=94=B9=20scoped=20=E9=81=BF=E5=85=8D=E6=B1=A1?= =?UTF-8?q?=E6=9F=93=E4=BB=B7=E6=A0=BC=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../src/pages/goods/goods_list/index.vue | 14 +- .../src/pages/users/user_coupon/index.vue | 128 +++++++++--------- 2 files changed, 74 insertions(+), 68 deletions(-) diff --git a/frontend/uni-app/src/pages/goods/goods_list/index.vue b/frontend/uni-app/src/pages/goods/goods_list/index.vue index 351db1f2a..8db0ef1aa 100644 --- a/frontend/uni-app/src/pages/goods/goods_list/index.vue +++ b/frontend/uni-app/src/pages/goods/goods_list/index.vue @@ -122,6 +122,8 @@ page: 1, limit: 20, cid: 0, + coupon_category_id: '', + productId: '', }); const price = ref(0); const stock = ref(0); @@ -144,7 +146,11 @@ where.value.cid = options.cid || 0; where.value.coupon_category_id = options.coupon_category_id || ''; where.value['sid'] = options.sid || 0; - title.value = options.title || ''; + try { + title.value = options.title ? decodeURIComponent(options.title) : ''; + } catch (e) { + title.value = options.title || ''; + } where.value['keyword'] = options.searchValue || ''; where.value['productId'] = options.productId || ''; get_product_list(); @@ -445,9 +451,14 @@ } .productList .list .item .text .money { + display: inline-block; font-size: 26rpx; font-weight: bold; margin-top: 8rpx; + white-space: nowrap; + /* 覆盖偶发全局 .money { flex-direction:column } 污染(如优惠券页未 scoped) */ + flex-direction: row; + align-items: baseline; } .productList .list .item .text .money.on { @@ -455,6 +466,7 @@ } .productList .list .item .text .money .num { + display: inline; font-size: 34rpx; } diff --git a/frontend/uni-app/src/pages/users/user_coupon/index.vue b/frontend/uni-app/src/pages/users/user_coupon/index.vue index 4174493e5..b5a57267e 100644 --- a/frontend/uni-app/src/pages/users/user_coupon/index.vue +++ b/frontend/uni-app/src/pages/users/user_coupon/index.vue @@ -122,10 +122,10 @@ function useCoupon(item) { if (navOn.value == 2) return let url = ''; if (item.category_id == 0 && item.product_id == '') { - url = '/pages/goods/goods_list/index?title=' + i18n.t(`默认`) + url = '/pages/goods/goods_list/index?title=' + encodeURIComponent(i18n.t(`默认`)) } if (item.category_id != 0) { - url = `/pages/goods/goods_list/index?title=${item.coupon_title}&coupon_category_id=${item.category_id}` + url = `/pages/goods/goods_list/index?title=${encodeURIComponent(item.coupon_title || '')}&coupon_category_id=${item.category_id}` } if (item.product_id != '') { let arr = item.product_id.split(','); @@ -133,7 +133,7 @@ function useCoupon(item) { if (num == 1) { url = '/pages/goods_details/index?id=' + item.product_id } else { - url = '/pages/goods/goods_list/index?productId=' + item.product_id + '&title=' + i18n.t(`默认`) + url = '/pages/goods/goods_list/index?productId=' + item.product_id + '&title=' + encodeURIComponent(i18n.t(`默认`)) } } uni.navigateTo({ @@ -180,69 +180,6 @@ function getUseCoupons() { } - -