From 033a3bd9ba66d66d3767c681465ce2cedbcd5c19 Mon Sep 17 00:00:00 2001 From: tangxinyue <524779910@qq.com> Date: Sat, 30 May 2026 14:39:16 +0800 Subject: [PATCH] =?UTF-8?q?pdd=E6=B7=BB=E5=8A=A0=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=8D=B7=E5=92=8C618=E6=B4=BB=E5=8A=A8=E5=88=B8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/shopping/pdd/add-order/add-order.vue | 15 +- .../pdd/components/list-card/list-card.vue | 16 +- pages/shopping/pdd/json/order.json | 14 +- pages/shopping/pdd/list-index.vue | 137 +++++++++++++++--- .../pdd/order-detail/order-detail.vue | 55 +++++-- static/image/shopping/pdd/618.png | Bin 0 -> 1700 bytes static/image/shopping/pdd/coupon-logo.png | Bin 0 -> 631 bytes static/image/shopping/pdd/coupon1.png | Bin 0 -> 108981 bytes static/image/shopping/pdd/coupon2.png | Bin 0 -> 86375 bytes static/image/shopping/pdd/coupon3.png | Bin 0 -> 89512 bytes 10 files changed, 187 insertions(+), 50 deletions(-) create mode 100644 static/image/shopping/pdd/618.png create mode 100644 static/image/shopping/pdd/coupon-logo.png create mode 100644 static/image/shopping/pdd/coupon1.png create mode 100644 static/image/shopping/pdd/coupon2.png create mode 100644 static/image/shopping/pdd/coupon3.png diff --git a/pages/shopping/pdd/add-order/add-order.vue b/pages/shopping/pdd/add-order/add-order.vue index a18e065..f6478e9 100644 --- a/pages/shopping/pdd/add-order/add-order.vue +++ b/pages/shopping/pdd/add-order/add-order.vue @@ -138,6 +138,9 @@ 旗舰店 + 618 + @@ -155,6 +158,8 @@ + @@ -166,8 +171,10 @@ - - + + + ¥ - + @@ -287,7 +294,7 @@ - + 取消 diff --git a/pages/shopping/pdd/components/list-card/list-card.vue b/pages/shopping/pdd/components/list-card/list-card.vue index f3b8734..679a9e3 100644 --- a/pages/shopping/pdd/components/list-card/list-card.vue +++ b/pages/shopping/pdd/components/list-card/list-card.vue @@ -13,6 +13,8 @@ + 待支付 @@ -27,7 +29,7 @@ - 品牌 + 品牌 {{ product.title }} {{ product.spec }} @@ -245,6 +247,7 @@ const toDetail = (id) => { width: 0; .title-box { + width: 100%; font-size: 26rpx; color: #1A1A1A; line-height: 36rpx; @@ -252,22 +255,21 @@ const toDetail = (id) => { -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; + word-break: break-all; .brand-tag { - display: inline-block; background-color: #252525; color: #fff; font-size: 22rpx; line-height: 22rpx; - padding: 4rpx 8rpx; + padding: 2rpx 8rpx; border-radius: 4rpx; margin-right: 8rpx; - margin-top: -4rpx; + position: relative; + top: -2rpx; } - .title-text { - vertical-align: middle; - } + .title-text {} } .spec-text { diff --git a/pages/shopping/pdd/json/order.json b/pages/shopping/pdd/json/order.json index 871e802..e7a7661 100644 --- a/pages/shopping/pdd/json/order.json +++ b/pages/shopping/pdd/json/order.json @@ -10,7 +10,8 @@ "name": "", "logo": "", "hasBrandAuth": true, - "hasFlagship": true + "hasFlagship": true, + "has618": false }, "products": [ { @@ -64,7 +65,8 @@ "name": "", "logo": "", "hasBrandAuth": true, - "hasFlagship": true + "hasFlagship": true, + "has618": false }, "products": [ { @@ -144,7 +146,8 @@ "name": "", "logo": "", "hasBrandAuth": true, - "hasFlagship": true + "hasFlagship": true, + "has618": false }, "products": [ { @@ -490,8 +493,9 @@ "shop": { "name": "索尼(SONY)数码官方旗舰店", "logo": "", - "hasBrandAuth": true, - "hasFlagship": true + "hasBrandAuth": false, + "hasFlagship": false, + "has618": true }, "products": [ { diff --git a/pages/shopping/pdd/list-index.vue b/pages/shopping/pdd/list-index.vue index aa23430..4b2acd2 100644 --- a/pages/shopping/pdd/list-index.vue +++ b/pages/shopping/pdd/list-index.vue @@ -3,6 +3,17 @@ + + + @@ -111,6 +182,33 @@ const { proxy } = getCurrentInstance(); const activeTab = ref(0); const scrollIntoId = ref(''); +// 优惠券配置 +const couponInfo = ref({ + show618Coupon: true, + coupon618Amount: '188', + hasCoupon: true, + couponPath: '/static/image/shopping/pdd/coupon1.png' +}); +const tempCouponInfo = ref({ + show618Coupon: true, + coupon618Amount: '188', + hasCoupon: true, + couponPath: '/static/image/shopping/pdd/coupon1.png' +}); +const couponPopup = ref(null); + +const openCouponPopup = () => { + tempCouponInfo.value = JSON.parse(JSON.stringify(couponInfo.value)); + couponPopup.value.open(); +}; + +const saveCouponInfo = () => { + couponInfo.value = JSON.parse(JSON.stringify(tempCouponInfo.value)); + uni.setStorageSync('pddCouponInfo', couponInfo.value); + couponPopup.value.close(); + uni.showToast({ title: '保存成功', icon: 'success' }); +}; + //导航栏菜单按钮 const buttonGroup = [ @@ -133,26 +231,9 @@ const buttonGroup = [ }, 400); } }, { - name: "切换优惠券", + name: "设置优惠券", click: () => { - scrollIntoId.value = ''; - setTimeout(() => { - scrollIntoId.value = 'bottom-anchor'; - }, 50); - setTimeout(() => { - chooseImage(); - }, 400); - } - }, { - name: "显示618活动券", - click: () => { - scrollIntoId.value = ''; - setTimeout(() => { - scrollIntoId.value = 'bottom-anchor'; - }, 50); - setTimeout(() => { - chooseImage(); - }, 400); + openCouponPopup(); } } ] @@ -350,6 +431,11 @@ const filteredOrderList = computed(() => { }); onShow(() => { + const pddCouponInfo = uni.getStorageSync('pddCouponInfo'); + if (pddCouponInfo) { + couponInfo.value = pddCouponInfo; + } + const isInitialized = uni.getStorageSync('isPddOrderListInitialized'); if (!isInitialized) { uni.setStorageSync('pddOrderList', defaultDataList); @@ -778,6 +864,19 @@ const closeImage = () => { } } } + +.coupon-banner { + background-color: #FEF5B2; + padding: 20rpx 22rpx; + font-weight: 400; + font-size: 26rpx; + color: #1A1A1A; + line-height: 26rpx; + + .red { + color: #DF2E26; + } +}