From 0a4db7b6f4f6f55cd3c7ba58550f4627e1b77462 Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Tue, 10 Nov 2026 15:22:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(uniapp):=20=E7=A7=BB=E9=99=A4=E8=B4=AD?= =?UTF-8?q?=E7=89=A9=E8=BD=A6=E5=8F=B3=E6=BB=91=E5=88=A0=E9=99=A4=E6=B6=88?= =?UTF-8?q?=E9=99=A4=E7=BA=A2=E7=BA=BF=EF=BC=8C=E4=BC=98=E5=8C=96=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E5=90=B8=E5=BA=95=E6=8C=89=E9=92=AE=E4=B8=8E=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=B5=A0=E5=93=81=E5=88=92=E7=BA=BF=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=8F=8A=E9=98=B6=E6=A2=AF=E4=BF=83=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/address/address.scss | 3 +- pages/mine/address/address.vue | 9 +- pages/order/myOrder.vue | 34 ++++++ pages/order/orderDetail.vue | 41 ++++++- .../product/promotion/-promotion-details.vue | 82 ++++++++++---- .../product/product/promotion/-promotion.vue | 49 +++++++-- pages/tabbar/cart/cartList.vue | 100 +++++++++--------- pages/tabbar/home/template/tpl.js | 5 +- 8 files changed, 238 insertions(+), 85 deletions(-) diff --git a/pages/mine/address/address.scss b/pages/mine/address/address.scss index 944e4dc..ade56c8 100644 --- a/pages/mine/address/address.scss +++ b/pages/mine/address/address.scss @@ -126,7 +126,8 @@ z-index: 99; padding: 20rpx 30rpx calc(20rpx + constant(safe-area-inset-bottom)); padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom)); - background: $page-color-base; + background: #ffffff; + box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.04); box-sizing: border-box; } diff --git a/pages/mine/address/address.vue b/pages/mine/address/address.vue index 6090a69..fb5012c 100644 --- a/pages/mine/address/address.vue +++ b/pages/mine/address/address.vue @@ -32,11 +32,12 @@ - - - - 添加新收货人 + + + + 添加新收货人 + diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue index ce77b31..2b5856b 100644 --- a/pages/order/myOrder.vue +++ b/pages/order/myOrder.vue @@ -68,9 +68,11 @@ :key="goodsIndex"> + 赠 + 赠品 {{ order.groupName }} ¥{{unitPrice(order.flowPrice) }} @@ -444,6 +446,11 @@ async function confirmCancelAfterSale() { } } +function isGiftItem(goods: any) { + if (!goods) return false + return goods.promotionType === 'GIFT' || (Number(goods.flowPrice) === 0 && goods.promotionType === 'GIFT') +} + function onAfterSaleExpress(order: any) { const sku = (order?.orderItems && order.orderItems[0]) || {} storage.setAfterSaleData({ ...order, ...sku, storeName: order.storeName }) @@ -692,6 +699,7 @@ function reBuy(order: any) { height: 131rpx; margin-right: 10rpx; margin-bottom: 10rpx; + position: relative; } .goods-info { @@ -803,4 +811,30 @@ function reBuy(order: any) { border-color: $light-color !important; background-color: #ffffff !important; } + + .gift-corner-badge { + position: absolute; + top: 0; + left: 0; + background: #ff4d4f; + color: #fff; + font-size: 18rpx; + padding: 2rpx 8rpx; + border-top-left-radius: 6rpx; + border-bottom-right-radius: 6rpx; + z-index: 2; + line-height: 1.2; + } + + .gift-badge { + display: inline-block; + background: #ff4d4f; + color: #fff; + font-size: 20rpx; + line-height: 28rpx; + padding: 0 10rpx; + border-radius: 6rpx; + margin-right: 8rpx; + vertical-align: middle; + } \ No newline at end of file diff --git a/pages/order/orderDetail.vue b/pages/order/orderDetail.vue index 131bac4..6fdb1e8 100644 --- a/pages/order/orderDetail.vue +++ b/pages/order/orderDetail.vue @@ -108,8 +108,14 @@ - {{ sku.goodsName }} - + + 赠品 + {{ sku.goodsName }} + + + ¥{{ unitPrice(sku.goodsPrice) }} + + ¥{{unitPrice(sku.goodsPrice) }} @@ -122,6 +128,7 @@ x{{ sku.num }} 退款/售后 + 随单赠送 @@ -631,7 +638,13 @@ function canApplySkuAfterSale(sku: any) { return false } +function isGiftItem(sku: any) { + if (!sku) return false + return sku.promotionType === 'GIFT' || (Number(sku.flowPrice) === 0 && sku.promotionType === 'GIFT') +} + function canShowSkuAfterSale(sku: any) { + if (isGiftItem(sku)) return false if (isECouponOrder.value) return false if (!order.value?.sn || Number(order.value.flowPrice) === 0) return false if (isAppointmentOrderFlag.value && !appointmentAllow.value.afterSale) return false @@ -1178,4 +1191,28 @@ page, flex:2; } } + +.gift-badge { + display: inline-block; + background: #ff4d4f; + color: #fff; + font-size: 20rpx; + line-height: 28rpx; + padding: 0 10rpx; + border-radius: 6rpx; + margin-right: 8rpx; + vertical-align: middle; +} +.gift-original-price { + color: #999; + font-size: 26rpx; + text-decoration: line-through; + font-weight: normal; +} +.gift-tip { + font-size: 22rpx; + color: #999; + margin-top: 8rpx; + text-align: right; +} diff --git a/pages/product/product/promotion/-promotion-details.vue b/pages/product/product/promotion/-promotion-details.vue index 2ed0d34..d8749e1 100644 --- a/pages/product/product/promotion/-promotion-details.vue +++ b/pages/product/product/promotion/-promotion-details.vue @@ -1,25 +1,23 @@ +