diff --git a/package1/buyFood/buyFood.vue b/package1/buyFood/buyFood.vue
index 82e3f05..605f8b0 100644
--- a/package1/buyFood/buyFood.vue
+++ b/package1/buyFood/buyFood.vue
@@ -296,12 +296,24 @@
立即出餐-(拼团单,拼团成功后立即出餐)
-
-
-
+
+
+
+
+
+ 是
+
+
+
+
+
+ 否
+
+ 如果选择“否”,后续可在订单详情页面再次点击“立即出餐”提示商家出餐
+
用餐方式
@@ -392,6 +404,19 @@
+
+
+
@@ -574,7 +599,6 @@
import addressList from '@/package1/address/addressList.vue'
import { requireLoginToCurrentPage } from '@/utils/authRedirect.js'
import { buildGroupHomeSharePath } from '@/utils/sharePath.js'
- const NOW_MAKE_GUIDE_CACHE_KEY = 'buyFoodNowMakeGuideShown'
export default {
data() {
return {
@@ -588,8 +612,7 @@
deliveryTime: '',
peisongyuan: ''
},
- nowMake:true,
- nowMakeGuideShownInPage: false,
+ nowMake:null,
pageToastText: '',
pageToastTimer: null,
content: [],
@@ -707,8 +730,8 @@
isStoreConsumeOnly() {
return this.shopItem && this.shopItem.storeConsumeOnly == 1;
},
- shouldShowNowMakeGuide() {
- return Number(this.shopItem.merchantType) === 1 && this.isPaotui == false && !this.isStoreGroupOrder && this.nowMake;
+ shouldChooseNowMake() {
+ return this.isPaotui == false && !this.isStoreGroupOrder;
},
highFloorFeeCalc() {
if (this.selected === 'shopDelivery') return 0;
@@ -913,19 +936,17 @@
}
},
methods: {
- nowMakeMethod(){
- this.nowMake = !this.nowMake
- },
- maybeShowNowMakeGuide() {
- if (this.nowMakeGuideShownInPage || !this.shouldShowNowMakeGuide) return;
- if (uni.getStorageSync(NOW_MAKE_GUIDE_CACHE_KEY) === '1') return;
- this.nowMakeGuideShownInPage = true;
- uni.setStorageSync(NOW_MAKE_GUIDE_CACHE_KEY, '1');
- uni.showModal({
- title: '温馨提示',
- content: '如不需要商家立即出餐,可取消勾选“立即出餐”。',
- showCancel: false,
- confirmText: '知道了'
+ checkNowMake(value){
+ this.nowMake = value;
+ },
+ openNowMakePopup() {
+ this.$refs.nowMakePopup.open('center');
+ },
+ confirmNowMake(value) {
+ this.nowMake = value;
+ this.$refs.nowMakePopup.close();
+ this.$nextTick(() => {
+ this.submitOrderToBackend();
});
},
checkPack(type) {
@@ -1181,9 +1202,6 @@
},
switchToStoreMode() {
this.isPaotui = false;
- this.$nextTick(() => {
- this.maybeShowNowMakeGuide();
- });
this.fetchCoupons(true);
},
onPayPopupChange(e) {
@@ -1420,6 +1438,10 @@
})
return;
}
+ if (this.shouldChooseNowMake && this.nowMake === null) {
+ this.openNowMakePopup();
+ return;
+ }
this.submitOrderToBackend();
},
goDetail() {
@@ -2591,7 +2613,8 @@
justify-content: flex-end;
}
- .pack-option {
+ .pack-option,
+ .now-make-option {
display: flex;
align-items: center;
color: $primary;
@@ -2599,6 +2622,22 @@
margin-left: 30rpx;
}
+ .now-make-options {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ }
+
+ .now-make-inline-tip {
+ margin: -6rpx 0 16rpx;
+ border-radius: 18rpx;
+ background: #fff8ef;
+ color: #ff7043;
+ font-size: 22rpx;
+ font-weight: 700;
+ line-height: 34rpx;
+ }
+
.remark-box {
flex: 1;
@@ -2700,6 +2739,70 @@
box-shadow: 0 12rpx 26rpx rgba(11, 155, 115, 0.2);
}
+ .now-make-popup {
+ width: 620rpx;
+ padding: 44rpx 36rpx 34rpx;
+ box-sizing: border-box;
+ border-radius: 32rpx;
+ background: #fff;
+ box-shadow: 0 28rpx 70rpx rgba(0, 35, 28, 0.18);
+ }
+
+ .now-make-popup-title {
+ color: $primary;
+ font-size: 34rpx;
+ font-weight: 900;
+ text-align: center;
+ }
+
+ .now-make-popup-desc {
+ margin-top: 12rpx;
+ color: $muted;
+ font-size: 24rpx;
+ line-height: 36rpx;
+ text-align: center;
+ }
+
+ .now-make-popup-tip {
+ margin-top: 18rpx;
+ padding: 14rpx 18rpx;
+ border-radius: 18rpx;
+ background: #fff8ef;
+ color: #ff7043;
+ font-size: 22rpx;
+ font-weight: 700;
+ line-height: 34rpx;
+ text-align: left;
+ }
+
+ .now-make-popup-actions {
+ display: flex;
+ margin-top: 34rpx;
+ gap: 18rpx;
+ }
+
+ .now-make-popup-cancel,
+ .now-make-popup-confirm {
+ flex: 1;
+ height: 76rpx;
+ border-radius: 999rpx;
+ font-size: 28rpx;
+ font-weight: 800;
+ line-height: 76rpx;
+ text-align: center;
+ }
+
+ .now-make-popup-cancel {
+ background: #f3f6f4;
+ color: $muted;
+ }
+
+ .now-make-popup-confirm {
+ background: linear-gradient(135deg, #0b9b73, #20d6a4);
+ color: #fff;
+ box-shadow: 0 12rpx 26rpx rgba(11, 155, 115, 0.2);
+ }
+
.coupon-row {
border-top: 1rpx solid #f0f3f2;
font-size: 28rpx;