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; + } +}