From 9221f38b32b80d8194d571ea1ac758393c451a06 Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Tue, 12 May 2026 12:15:51 +0800
Subject: [PATCH 1/5] 1
---
pages/index/index.vue | 192 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 174 insertions(+), 18 deletions(-)
diff --git a/pages/index/index.vue b/pages/index/index.vue
index e27a6b3..eda8630 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -459,12 +459,29 @@
备注:{{item.remark}}
-
-
-
-
- 拒绝接单
+
+
+
+
+ 向右滑动抢单
+ 继续滑动确认
+ 松手接单
+
+
+ 接
+
+
+
+ 拒绝接单
+
@@ -707,7 +724,16 @@
isputArea: false,
checkYongjin: false,
getshopArea: [],
- putshopArea: []
+ putshopArea: [],
+ swipeOrder: {
+ id: '',
+ index: -1,
+ startX: 0,
+ startProgress: 0,
+ progress: 0,
+ trackWidth: 0,
+ confirmed: false
+ }
}
},
components: {
@@ -873,6 +899,65 @@
this.productData = item;
this.$refs.productPopup.open()
},
+ getSwipeProgress(item, index) {
+ if (this.swipeOrder.id === item.id && this.swipeOrder.index === index) {
+ return this.swipeOrder.progress
+ }
+ return 0
+ },
+ isSwipeOrderActive(item, index) {
+ return this.swipeOrder.id === item.id && this.swipeOrder.index === index && this.swipeOrder.progress > 0
+ },
+ startSwipeOrder(event, item, index) {
+ const touch = event.touches && event.touches[0]
+ if (!touch) return
+ this.swipeOrder = {
+ id: item.id,
+ index,
+ startX: touch.clientX,
+ startProgress: 0,
+ progress: 0,
+ trackWidth: 0,
+ confirmed: false
+ }
+ this.$nextTick(() => {
+ uni.createSelectorQuery().in(this).select('#swipe-order-' + item.id).boundingClientRect((rect) => {
+ if (rect && this.swipeOrder.id === item.id && this.swipeOrder.index === index) {
+ this.swipeOrder.trackWidth = rect.width
+ }
+ }).exec()
+ })
+ },
+ moveSwipeOrder(event) {
+ const touch = event.touches && event.touches[0]
+ if (!touch || this.swipeOrder.id === '') return
+ const trackWidth = this.swipeOrder.trackWidth || uni.getSystemInfoSync().windowWidth * 0.86
+ const deltaX = Math.max(0, touch.clientX - this.swipeOrder.startX)
+ const progress = Math.min(100, Math.round(deltaX / (trackWidth * 0.72) * 100))
+ this.swipeOrder.progress = progress
+ },
+ endSwipeOrder(item, index) {
+ if (this.swipeOrder.id !== item.id || this.swipeOrder.index !== index) return
+ if (this.swipeOrder.progress >= 92 && !this.swipeOrder.confirmed) {
+ this.swipeOrder.confirmed = true
+ this.swipeOrder.progress = 100
+ this.getOrder(item, index)
+ return
+ }
+ this.resetSwipeOrder()
+ },
+ resetSwipeOrder() {
+ this.swipeOrder = {
+ id: '',
+ index: -1,
+ startX: 0,
+ startProgress: 0,
+ progress: 0,
+ trackWidth: 0,
+ confirmed: false
+ }
+ },
+ noop() {},
getOrder(item, index) {
let that = this
@@ -889,6 +974,7 @@
that.tui.request("/mall/delivery/accept", "POST", data, false, true).then((res) => {
that.loadStatus = 'nomore';
if (res.code == 200) {
+ that.resetSwipeOrder();
if (!uni.getStorageSync('worker') && res.result != null) {
uni.setStorageSync('worker', res.result)
}
@@ -910,6 +996,7 @@
}, 2000)
that.$forceUpdate();
} else {
+ that.resetSwipeOrder();
that.tui.toast(res.message);
return;
}
@@ -1947,7 +2034,6 @@
.list-1 {
width: 98%;
- max-height: 640rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(253, 255, 250, 0.96) 100%);
border: 1px solid rgba(255, 255, 255, 0.86);
border-radius: 34rpx;
@@ -2150,19 +2236,89 @@
}
.qiangdan-btn {
- width: 95%;
+ width: 100%;
height: 100rpx;
- margin: 20rpx auto;
- transition: transform 0.18s ease;
+ border-radius: 999rpx;
+ background: linear-gradient(135deg, rgba(246, 255, 252, 0.98) 0%, rgba(235, 255, 249, 0.96) 100%);
+ border: 1px solid rgba(166, 255, 234, 0.72);
+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 12rpx 26rpx rgba(0, 35, 28, 0.06);
+ position: relative;
+ overflow: hidden;
+ }
- &:active {
- transform: scale(0.97);
- }
+ .qiangdan-progress {
+ height: 100%;
+ border-radius: 999rpx;
+ background: linear-gradient(90deg, rgba(166, 255, 234, 0.42) 0%, rgba(108, 226, 202, 0.78) 100%);
+ transition: width 0.16s ease-out;
+ }
- img {
- width: 100%;
- height: 100%;
- background-size: 100%;
+ .qiangdan-text {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #2a665b;
+ font-size: 28rpx;
+ font-weight: 900;
+ letter-spacing: 2rpx;
+ }
+
+ .qiangdan-thumb {
+ width: 82rpx;
+ height: 82rpx;
+ border-radius: 50%;
+ position: absolute;
+ left: 0;
+ top: 9rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: rgba(255, 255, 255, 0.96);
+ border: 1px solid rgba(166, 255, 234, 0.9);
+ box-shadow: 0 10rpx 22rpx rgba(0, 35, 28, 0.12);
+ color: #1b7a69;
+ font-size: 28rpx;
+ font-weight: 900;
+ transition: left 0.16s ease-out, transform 0.16s ease-out;
+ }
+
+ .dispatch-action-box {
+ width: 95%;
+ margin: 20rpx auto 24rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ }
+
+ .dispatch-action-box--single {
+ margin-bottom: 20rpx;
+ }
+
+ .reject-order-btn {
+ min-width: 220rpx;
+ height: 58rpx;
+ margin-top: 14rpx;
+ padding: 0 34rpx;
+ border-radius: 999rpx;
+ border: 1px solid rgba(255, 108, 96, 0.5);
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 244, 241, 0.96) 100%);
+ box-shadow: 0 8rpx 18rpx rgba(255, 108, 96, 0.12);
+ box-sizing: border-box;
+ color: #e45c50;
+ font-size: 24rpx;
+ font-weight: 800;
+ line-height: 58rpx;
+ text-align: center;
+ transition: transform 0.18s ease, box-shadow 0.18s ease;
+
+ &:active {
+ transform: scale(0.96);
+ box-shadow: 0 4rpx 10rpx rgba(255, 108, 96, 0.1);
}
}
From e75d3a43544e2f036e067f641e4c35d4503e131b Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Tue, 12 May 2026 12:17:26 +0800
Subject: [PATCH 2/5] 1
---
pages/index/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/index/index.vue b/pages/index/index.vue
index bbdeb4e..8d05cc2 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -503,7 +503,7 @@
-
+
+ class="tab-bg" />
-
-
-
+
+
+
+ class="tab-bg" />
-
-
-
+ class="tab-bg" />
+
+
+
@@ -41,105 +41,98 @@
-
- 请选择收货地址
+
+ 请选择收货地址
+
-
-
+
+
{{formData.address.areaName || ''}}{{formData.address.floor ? formData.address.floor + '层' : ''}}{{formData.address.roomNum || ''}}
{{formData.address.receiverName || ''}}
-
+
更换地址
-
+ :class="{'time1-active': formData.isImmediately}">
+
立即送出
-
+
预计{{immediateTimeStr}}送达
-
+ :class="{'time1-active': formData.isImmediately==false}">
+
预约配送
-
-
+
+
{{formData.deliveryTime}}
-
+
选择时间 >
-
-
-
+
+
+
配送员
-
+
指定配送员,如配送员拒绝接单或者下线,订单进入抢单大厅
-
+
不指定配送员超过10分钟没有人接单,会发送短信通知
-
-
-
+
+
+
不指定
-
- 佣金 ¥
-
+
+ 佣金 ¥
+
-
-
+
+
指定配送员
-
+
{{ assignedWorker ? assignedWorker.workerName + ' ' + assignedWorker.mobile : '配送员' }}
-
+
因您的收货楼层在3楼以上,将额外收取配送费 ¥{{highFloorFeeCalc}}
-
+
{{shopItem.shopName || '未知道商家'}}
-
@@ -154,7 +147,7 @@
-
+
X{{cartItem.quantity}}
@@ -165,7 +158,7 @@
-
@@ -180,12 +173,11 @@
-
+
X1
-
+
拼团
¥{{groupItem.groupRule.groupPrice}}
@@ -193,86 +185,83 @@
-
-
-
-
-
-
- {{cartItem.productName}}
+
+
+
+
-
-
- {{getSpecDisplayString(cartItem.specs)}}
+
+
+ {{cartItem.productName}}
-
-
-
- X{{cartItem.quantity}}
+
+
+ {{getSpecDisplayString(cartItem.specs)}}
+
-
- ¥{{cartItem.attributeListPrice | sliceMsg}}
+
+
+ X{{cartItem.quantity}}
+
+
+ ¥{{cartItem.attributeListPrice | sliceMsg}}
+
-
+
-
-
-
+
+
+
打包费
-
+
¥{{packageFee.toFixed(2)}}
-
-
- 配送费 (均摊 | 如超过2人,每多一人配送费总额增加0.5)
+
+
+ 配送费 (均摊 | 如超过2人,每多一人配送费总额增加0.5)
-
+
¥{{deliveryFeeCalc.toFixed(2)}}
-
-
+
+
备注
-
-
+
-
-
+
+
优惠券
-
+
-¥{{selectedCoupon.discountAmount.toFixed(2)}}
-
+
有 {{availableCoupons.length}} 张可用
-
+
无可用券
-
-
+
+
合计
-
+
¥{{totalAmountCalc.toFixed(2)}}
-
+
立即支付
@@ -387,34 +376,33 @@
-
-
+