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() { } - -