From 1b26b81ac961d7264ecb3081380708ef85d981f6 Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Tue, 30 Jun 2026 14:26:28 +0800
Subject: [PATCH] 1
---
package1/buyFood/buyFood.vue | 354 +++++++++++++++---
.../delivery-time-op/delivery-time-op.vue | 21 +-
package1/order/orderDetail.vue | 196 ++++++----
package1/order/orderList.vue | 3 +
package1/order/returnOrder.vue | 7 +-
5 files changed, 446 insertions(+), 135 deletions(-)
diff --git a/package1/buyFood/buyFood.vue b/package1/buyFood/buyFood.vue
index 6b4da7a..43bd68b 100644
--- a/package1/buyFood/buyFood.vue
+++ b/package1/buyFood/buyFood.vue
@@ -13,17 +13,17 @@
团购到店
约上同学一起省
- 支付后到店核销,拼成更划算
+ 支付后到店核销,拼团更划算
核
到店核销
- 无需配送
+ 同校热拼
- 拼团价
- 同校热拼
+
@@ -313,7 +313,7 @@
-
+
+
+ 最低需支付0.01元
+
@@ -408,6 +411,9 @@
¥{{backendTotalAmount ? backendTotalAmount.toFixed(2) : totalAmountCalc.toFixed(2)}}
+
+ 最低需支付0.01元
+
若24小时内拼团失败,将会为您自动退款
@@ -440,6 +446,9 @@
-
>
@@ -720,6 +729,10 @@
}
return total > 0 ? total : 0.01;
},
+ isMinimumPayAmount() {
+ const amount = this.backendTotalAmount ? this.backendTotalAmount : this.totalAmountCalc;
+ return Number(amount).toFixed(2) === '0.01';
+ },
preDiscountTotal() {
if(this.isPaotui==true){
return this.goodsAmountCalc + this.packageFee + this.deliveryFeeCalc;
@@ -742,7 +755,8 @@
return baseValue + transferTime;
}
const value = Number(this.shopItem.groupDeliveryTime);
- const baseTime = isNaN(value) ? validCookingTime + 30 : (this.shopItem.groupDeliveryTimeIncludesTransfer == 1 ? Math.max(0, value - transferTime) : value);
+ const rawBaseTime = !isNaN(value) && value > 0 ? value : validCookingTime + 30;
+ const baseTime = this.shopItem.groupDeliveryTimeIncludesTransfer == 1 ? Math.max(0, rawBaseTime - transferTime) : rawBaseTime;
return baseTime + transferTime;
},
supportShopDelivery() {
@@ -892,12 +906,17 @@
normalizeCustomCommission() {
this.customCommission = this.formatCommissionValue(this.customCommission);
},
+ getEffectiveDeliveryDurationMinutes() {
+ const duration = Number(this.deliveryDurationMinutes);
+ return !isNaN(duration) && duration > 0 ? duration : 30;
+ },
updateImmediateTimeStr() {
const now = new Date();
const startTime = new Date(now);
const endTime = new Date(now);
+ const deliveryDuration = Math.max(this.getEffectiveDeliveryDurationMinutes(), 30);
startTime.setMinutes(startTime.getMinutes() + 25);
- endTime.setMinutes(endTime.getMinutes() + this.deliveryDurationMinutes);
+ endTime.setMinutes(endTime.getMinutes() + deliveryDuration);
this.immediateTimeStr = `${this.formatClockTime(startTime)}-${this.formatClockTime(endTime)}`;
},
refreshDeliveryTimeByModeChange() {
@@ -1058,15 +1077,15 @@
checkTime(type) {
if (type === this.formData.isImmediately) {
if (type === false) {
- this.$refs.model.open()
this.generateDeliveryTimes()
+ this.$refs.model.open()
}
return;
}
this.formData.isImmediately = type;
if (this.formData.isImmediately === false) {
- this.$refs.model.open()
this.generateDeliveryTimes()
+ this.$refs.model.open()
}
},
checkVoucher(type) {
@@ -1180,7 +1199,7 @@
if (!this.formData.deliveryTime || this.formData.deliveryTime === '自动送达' || this.formData.deliveryTime ===
'尽快送达'){
const now = new Date();
- now.setMinutes(now.getMinutes() + this.deliveryDurationMinutes);
+ now.setMinutes(now.getMinutes() + this.getEffectiveDeliveryDurationMinutes());
return this.formatDateTimeValue(now);
}else{
let timeStr = this.formData.deliveryTime;
@@ -1372,6 +1391,30 @@
this.freeOrderEffectVisible = false;
},
//时间选择器获取时间数据
+ getNextDeliverySlot(date) {
+ const interval = 20;
+ const slot = new Date(date);
+ slot.setSeconds(0, 0);
+ const remainder = slot.getMinutes() % interval;
+ if (remainder !== 0) {
+ slot.setMinutes(slot.getMinutes() + interval - remainder);
+ } else {
+ slot.setMinutes(slot.getMinutes() + interval);
+ }
+ return slot;
+ },
+ buildDeliveryTimeList(startTime, endTime) {
+ const interval = 20;
+ const list = [];
+ const cursor = new Date(startTime);
+ while (cursor <= endTime) {
+ list.push({
+ timestr: this.formatClockTime(cursor)
+ });
+ cursor.setMinutes(cursor.getMinutes() + interval);
+ }
+ return list;
+ },
generateDeliveryTimes() {
const now = new Date();
const today = new Date(now);
@@ -1394,44 +1437,27 @@
}];
const earliestTime = new Date(now);
- earliestTime.setMinutes(earliestTime.getMinutes() + this.deliveryDurationMinutes);
+ earliestTime.setMinutes(earliestTime.getMinutes() + this.getEffectiveDeliveryDurationMinutes());
- // 预约配送从预计最晚送达时间后的下一个半小时点开始
- let nextHour = earliestTime.getHours();
- let nextMinute = earliestTime.getMinutes() <= 30 ? 30 : 0;
- if (earliestTime.getMinutes() > 30) {
- nextHour += 1;
- }
+ const todayStartTime = this.getNextDeliverySlot(earliestTime);
+ const todayEndTime = new Date(today);
+ todayEndTime.setHours(23, 40, 0, 0);
+ todayTimelist.push(...this.buildDeliveryTimeList(todayStartTime, todayEndTime));
- // 从下一个半小时点开始,直到 23:30
- for (let h = nextHour; h <= 23; h++) {
- const startMin = (h === nextHour) ? nextMinute : 0;
- for (let m = startMin; m < 60; m += 30) {
- if (h === 23 && m > 30) continue; // 不超过 23:30
- const timeStr = `${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}`;
- todayTimelist.push({
- timestr: timeStr
- });
- }
- }
-
- // ----- 生成明天的时间列表(全天 00:00 ~ 23:30)-----
- const tomorrowTimelist = [];
- for (let h = 0; h <= 23; h++) {
- for (let m = 0; m < 60; m += 30) {
- if (h === 23 && m > 30) continue;
- const timeStr = `${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}`;
- tomorrowTimelist.push({
- timestr: timeStr
- });
- }
- }
+ // ----- 生成明天的时间列表(全天 00:00 ~ 23:40,每 20 分钟一档)-----
+ const tomorrowStartTime = new Date(tomorrow);
+ tomorrowStartTime.setHours(0, 0, 0, 0);
+ const tomorrowEndTime = new Date(tomorrow);
+ tomorrowEndTime.setHours(23, 40, 0, 0);
+ const tomorrowTimelist = this.buildDeliveryTimeList(tomorrowStartTime, tomorrowEndTime);
this.content = [{
+ id: 'today',
timezh: todayStr,
timelist: todayTimelist
},
{
+ id: 'tomorrow',
timezh: tomorrowStr,
timelist: tomorrowTimelist
}
@@ -2224,6 +2250,28 @@
font-size: 34rpx;
}
+ .minimum-pay-tip {
+ width: 100%;
+ min-height: 42rpx;
+ min-height: 42rpx;
+ margin: 0 0 12rpx;
+ padding: 8rpx 18rpx;
+ border-radius: 999rpx;
+ background: rgba(255, 245, 236, 0.96);
+ border: 1rpx solid rgba(255, 112, 67, 0.24);
+ color: #f0441f;
+ font-size: 22rpx;
+ font-weight: 800;
+ line-height: 32rpx;
+ text-align: center;
+ box-sizing: border-box;
+ }
+
+ .pay-minimum-tip {
+ width: 86%;
+ margin: -2rpx auto 12rpx;
+ }
+
.bottom-placeholder {
height: 166rpx;
}
@@ -2390,6 +2438,21 @@
position: relative;
}
+ .pintuan-popup-close {
+ position: absolute;
+ top: 24rpx;
+ right: 24rpx;
+ z-index: 5;
+ width: 58rpx;
+ height: 58rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 50%;
+ background: rgba(255, 255, 255, 0.86);
+ box-shadow: 0 8rpx 20rpx rgba(0, 35, 28, 0.12);
+ }
+
.kaituan1 {
height: 120rpx;
font-size: 44rpx;
@@ -2806,7 +2869,8 @@
.store-group-checkout {
background:
- radial-gradient(circle at 84% 110rpx, rgba(255, 229, 190, 0.74), transparent 270rpx),
+ radial-gradient(circle at 84% 110rpx, rgba(255, 229, 190, 0.78), transparent 270rpx),
+ radial-gradient(circle at 10% 520rpx, rgba(255, 125, 78, 0.1), transparent 260rpx),
linear-gradient(180deg, #fff0df 0%, #fff8f0 420rpx, #fffaf6 100%);
color: #3f2618;
}
@@ -2815,16 +2879,49 @@
background:
radial-gradient(circle at 78% 22%, rgba(255, 246, 221, 0.72), transparent 240rpx),
linear-gradient(135deg, #ff8a5c 0%, #ffbd70 58%, #ffe2bf 100%);
+ height: 360rpx;
position: relative;
overflow: hidden;
+ border-bottom-left-radius: 40rpx;
+ border-bottom-right-radius: 40rpx;
+ box-shadow: 0 18rpx 46rpx rgba(255, 132, 80, 0.2);
}
- .store-group-checkout .box1,
- .store-group-checkout .ziqu-box,
- .store-group-checkout .goods-card,
- .store-group-checkout .coupon-row {
- border-color: rgba(255, 218, 183, 0.82);
- box-shadow: 0 16rpx 38rpx rgba(178, 102, 48, 0.12);
+ .store-group-checkout .box1 {
+ margin-top: 22rpx;
+ padding: 28rpx 24rpx 24rpx;
+ border: 1rpx solid rgba(255, 226, 205, 0.86);
+ box-shadow: 0 18rpx 44rpx rgba(178, 102, 48, 0.1);
+ }
+
+ .store-group-checkout .ziqu-box {
+ margin-top: -4rpx;
+ border: 1rpx solid rgba(255, 226, 205, 0.86);
+ box-shadow: 0 18rpx 44rpx rgba(178, 102, 48, 0.1);
+ }
+
+ .store-group-checkout .ziqu-address {
+ width: calc(100% - 48rpx);
+ min-height: 128rpx;
+ margin: 68rpx auto 24rpx;
+ background:
+ linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 246, 0.94));
+ border: 1rpx solid rgba(255, 226, 205, 0.76);
+ box-shadow: 0 12rpx 28rpx rgba(178, 102, 48, 0.08);
+ }
+
+ .store-group-checkout .ziqu-address img {
+ margin-top: 42rpx;
+ }
+
+ .store-group-checkout .goods-card {
+ align-items: stretch;
+ padding: 18rpx;
+ margin-bottom: 18rpx;
+ background:
+ linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(255, 248, 242, 0.92));
+ border: 1rpx solid rgba(255, 226, 205, 0.8);
+ box-shadow: 0 10rpx 24rpx rgba(178, 102, 48, 0.07);
}
.store-group-checkout .ziqu-xuanfu,
@@ -2836,6 +2933,25 @@
box-shadow: 0 16rpx 30rpx rgba(255, 126, 39, 0.22);
}
+ .store-group-checkout .shop-title {
+ position: relative;
+ display: flex;
+ align-items: center;
+ margin-bottom: 10rpx;
+ padding-left: 18rpx;
+ line-height: 54rpx;
+ }
+
+ .store-group-checkout .shop-title::before {
+ content: '';
+ position: absolute;
+ left: 0;
+ width: 8rpx;
+ height: 28rpx;
+ border-radius: 999rpx;
+ background: linear-gradient(180deg, #ff7444, #ffb35e);
+ }
+
.store-group-checkout .shop-title,
.store-group-checkout .goods-name,
.store-group-checkout .total-label {
@@ -2855,6 +2971,148 @@
color: #f0441f;
}
+ .store-group-checkout .goods-img {
+ width: 136rpx;
+ height: 136rpx;
+ }
+
+ .store-group-checkout .goods-img img {
+ border-radius: 22rpx;
+ box-shadow: 0 10rpx 24rpx rgba(178, 102, 48, 0.12);
+ }
+
+ .store-group-checkout .goods-content {
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+ padding-left: 18rpx;
+ }
+
+ .store-group-checkout .goods-name {
+ font-size: 29rpx;
+ line-height: 40rpx;
+ }
+
+ .store-group-checkout .goods-content-bottom {
+ margin-top: auto;
+ line-height: 46rpx;
+ }
+
+ .store-group-checkout .group-price-tag {
+ display: flex;
+ align-items: center;
+ margin-left: 12rpx;
+ padding: 6rpx 14rpx;
+ background: #fff0e8;
+ border: 1rpx solid rgba(255, 116, 68, 0.28);
+ box-shadow: inset 0 0 0 1rpx rgba(255, 255, 255, 0.62);
+ }
+
+ .store-group-checkout .group-price-tag text + text {
+ margin-left: 8rpx;
+ }
+
+ .store-group-checkout .fee-list {
+ margin-top: 26rpx;
+ padding: 8rpx;
+ border-top: 0;
+ border-radius: 28rpx;
+ background:
+ linear-gradient(180deg, rgba(255, 250, 246, 0.96), rgba(255, 246, 239, 0.78));
+ border: 1rpx solid rgba(255, 226, 205, 0.74);
+ }
+
+ .store-group-checkout .coupon-row,
+ .store-group-checkout .fee-row {
+ min-height: 86rpx;
+ padding: 0 18rpx;
+ border-radius: 22rpx;
+ box-sizing: border-box;
+ }
+
+ .store-group-checkout .coupon-row {
+ margin-bottom: 8rpx;
+ background: #fff;
+ border-top: 0;
+ box-shadow: 0 8rpx 20rpx rgba(178, 102, 48, 0.06);
+ }
+
+ .store-group-checkout .fee-row + .fee-row {
+ border-top: 0;
+ }
+
+ .store-group-checkout .coupon-label,
+ .store-group-checkout .fee-label {
+ font-size: 28rpx;
+ font-weight: 800;
+ }
+
+ .store-group-checkout .coupon-available {
+ padding: 8rpx 16rpx;
+ border-radius: 999rpx;
+ background: #fff4ec;
+ color: #ef6c2f;
+ font-size: 23rpx;
+ font-weight: 900;
+ }
+
+ .store-group-checkout .coupon-empty {
+ padding: 8rpx 16rpx;
+ border-radius: 999rpx;
+ background: #f7eee8;
+ color: #b38a70;
+ font-size: 23rpx;
+ }
+
+ .store-group-checkout .remark-row {
+ align-items: flex-start;
+ padding-top: 16rpx;
+ padding-bottom: 14rpx;
+ background: #fff;
+ box-shadow: 0 8rpx 20rpx rgba(178, 102, 48, 0.05);
+ }
+
+ .store-group-checkout .remark-row .fee-label {
+ flex: 0 0 90rpx;
+ line-height: 64rpx;
+ color: #3f2618;
+ }
+
+ .store-group-checkout .remark-box {
+ min-width: 0;
+ }
+
+ .store-group-checkout .remark-box .remark-value {
+ height: auto;
+ min-height: 64rpx;
+ line-height: 34rpx;
+ padding: 15rpx 20rpx;
+ text-align: left;
+ border-radius: 20rpx;
+ background: #fff7f1;
+ border: 1rpx solid rgba(255, 226, 205, 0.86);
+ color: #5d3827;
+ white-space: normal;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ }
+
+ .store-group-checkout .remark-placeholder {
+ color: #b58d72;
+ }
+
+ .store-group-checkout .total-row {
+ margin-top: 14rpx;
+ padding: 0 8rpx;
+ border-top: 0;
+ }
+
+ .store-group-checkout .total-price {
+ font-size: 38rpx;
+ font-weight: 900;
+ }
+
.store-hero-effect {
position: absolute;
left: 0;
diff --git a/package1/components/delivery-time-op/delivery-time-op.vue b/package1/components/delivery-time-op/delivery-time-op.vue
index 882d2f4..840344a 100644
--- a/package1/components/delivery-time-op/delivery-time-op.vue
+++ b/package1/components/delivery-time-op/delivery-time-op.vue
@@ -2,12 +2,13 @@
-
+
{{ title }} x
@@ -15,8 +16,8 @@
{{ item.timezh }}
@@ -91,12 +92,24 @@ export default {
};
},
+ computed: {
+ normalizedContent() {
+ return (this.content || []).map((item, index) => ({
+ ...item,
+ key: item.id || index,
+ }));
+ },
+ },
+
//初始化数据
watch: {
content: {
immediate: true,
handler(newValue, oldValue) {
- this.Days = this.content[0].timelist;
+ this.Days =
+ newValue && newValue[0] && Array.isArray(newValue[0].timelist)
+ ? newValue[0].timelist
+ : [];
},
},
},
diff --git a/package1/order/orderDetail.vue b/package1/order/orderDetail.vue
index 4a3cbba..5245087 100644
--- a/package1/order/orderDetail.vue
+++ b/package1/order/orderDetail.vue
@@ -100,90 +100,94 @@
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 待支付
- {{orderDetail.shopDelivery == 1 ? '等待商家配送接单' : '等待配送员接单'}}
- {{orderDetail.shopDelivery == 1 ? '商家配送已接单' : '配送员已接单'}}
- 等待商家送达中转点
- 待配送员取货
- 待消费
- {{orderDetail.deliveryInfo && orderDetail.deliveryInfo.transferDelivery == 1 ? '中转配送中' : '配送员已取货'}}
- 订单已完成
- 等待同意退款
- 订单已取消
- 订单已退款
- 售后中
- 订单已售后
-
-
-
- 剩余支付时间 {{payCountdownText}}
-
-
-
- 预计{{orderDetail.deliveryInfo.mustFinishTime | formatHourMinute }}送达
-
-
-
- 送至
- {{orderDetail.deliveryInfo.receiverAddress}}
-
-
- 取消订单
+
+
@@ -1427,7 +1431,9 @@
this.refundTypeStatus = 2
this.sellTime = 3
}
- this.arriveTime = this.orderDetail.deliveryInfo.arriveTime ? this.formatTimeText(this.orderDetail.deliveryInfo.arriveTime) : '未到店'
+ if(this.orderDetail.deliveryInfo){
+ this.arriveTime = this.orderDetail.deliveryInfo.arriveTime ? this.formatTimeText(this.orderDetail.deliveryInfo.arriveTime) : '未到店'
+ }
if (this.payData.shopMakeTime != null) {
const date1 = new Date(this.payData.deliveryInfo.acceptTime);
const date2 = new Date(this.payData.shopMakeTime);
@@ -2168,13 +2174,32 @@
box-shadow: 0 18rpx 44rpx rgba(0, 35, 28, 0.06);
}
- .content {
+ .order-detail-fixed-header {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 50;
+ }
+
+ .order-detail-header-content {
position: absolute;
top: 190rpx;
+ left: 0;
+ width: 100%;
+ }
+
+ .content {
+ position: relative;
width: 100%;
padding-bottom: 60rpx;
}
+ .order-detail-content {
+ padding-top: 396rpx;
+ box-sizing: border-box;
+ }
+
.title-sreach {
width: 100%;
display: flex;
@@ -2341,6 +2366,13 @@
border-radius: 36rpx;
}
+ .order-status-card {
+ background:
+ radial-gradient(circle at 94% 4%, rgba(255, 221, 176, 0.2) 0, rgba(255, 221, 176, 0) 170rpx),
+ linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 255, 251, 0.96) 100%);
+ border-radius: 36rpx;
+ }
+
.goods-img {
width: 160rpx;
height: 160rpx;
@@ -2465,8 +2497,8 @@
.order-flow {
width: 95%;
- margin: -4rpx auto 22rpx;
- padding: 22rpx 20rpx;
+ margin: -2rpx auto 12rpx;
+ padding: 16rpx 20rpx;
border-radius: 30rpx;
background: rgba(255, 255, 255, 0.78);
box-shadow: 0 14rpx 34rpx rgba(0, 35, 28, 0.05);
diff --git a/package1/order/orderList.vue b/package1/order/orderList.vue
index 2707a16..029ceb9 100644
--- a/package1/order/orderList.vue
+++ b/package1/order/orderList.vue
@@ -328,6 +328,9 @@
if (this.tab1Checked == 'ershou') {
return allOptions.filter(item => [10, 0, 6, 7, 8, 9, 11, 12].includes(item.value));
}
+ if (this.tab1Checked == 'tuangou') {
+ return allOptions.filter(item => [10, 0, 1, 2, 6, 7, 8, 9, 11, 12].includes(item.value));
+ }
return allOptions.filter(item => ![1, 2].includes(item.value));
},
statusFilterText() {
diff --git a/package1/order/returnOrder.vue b/package1/order/returnOrder.vue
index ab83ebd..4405155 100644
--- a/package1/order/returnOrder.vue
+++ b/package1/order/returnOrder.vue
@@ -507,7 +507,12 @@
let ratio = this.getRefundRatio()
refundAmount = refundAmount - refundAmount * ratio
}
- this.refundShowAmount = Number(refundAmount.toFixed(2))
+ let refundShowAmount = Number(refundAmount.toFixed(2))
+ let totalAmount = this.toAmount(this.orderDetail.totalAmount)
+ if (this.orderDetail.totalAmount != null && refundShowAmount > totalAmount) {
+ refundShowAmount = totalAmount
+ }
+ this.refundShowAmount = refundShowAmount
},
pictureAdd(id, huan) {
let that = this