|
|
@ -259,9 +259,9 @@ |
|
|
</view> |
|
|
</view> |
|
|
<uni-icons type="right" size="14" color="#999" style="margin-left:10rpx;"></uni-icons> |
|
|
<uni-icons type="right" size="14" color="#999" style="margin-left:10rpx;"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
<view class="fee-row" v-if="isPaotui"> |
|
|
<view class="fee-row" v-if="packageFee > 0"> |
|
|
<view class="fee-label"> |
|
|
<view class="fee-label"> |
|
|
打包费 |
|
|
餐盒费 |
|
|
</view> |
|
|
</view> |
|
|
<view class="fee-value"> |
|
|
<view class="fee-value"> |
|
|
¥{{packageFee.toFixed(2)}} |
|
|
¥{{packageFee.toFixed(2)}} |
|
|
@ -269,12 +269,20 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="fee-row" v-if="isPaotui"> |
|
|
<view class="fee-row" v-if="isPaotui"> |
|
|
<view class="fee-label"> |
|
|
<view class="fee-label"> |
|
|
配送费 <text class="fee-tip" v-if="isFaceToFace">(均摊 | 如超过2人,每多一人配送费总额增加0.5)</text> |
|
|
配送费 |
|
|
</view> |
|
|
</view> |
|
|
<view class="fee-value"> |
|
|
<view class="fee-value"> |
|
|
¥{{deliveryFeeCalc.toFixed(2)}} |
|
|
¥{{deliveryFeeCalc.toFixed(2)}} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="fee-row" v-if="isPaotui && isFaceToFace"> |
|
|
|
|
|
<view class="fee-label"> |
|
|
|
|
|
<text class="fee-tip">如指定配送员,2人团以上,每多一人配送费总额增加0.5</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="fee-value"> |
|
|
|
|
|
配送费均摊 |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
<view class="fee-row" v-if="isPaotui ==false && !isStoreGroupOrder"> |
|
|
<view class="fee-row" v-if="isPaotui ==false && !isStoreGroupOrder"> |
|
|
<view class="fee-label" style="color: #ff5722;font-size: 24rpx;padding: 14rpx 0 18rpx;"> |
|
|
<view class="fee-label" style="color: #ff5722;font-size: 24rpx;padding: 14rpx 0 18rpx;"> |
|
|
立即出餐-(拼团单,拼团成功后立即出餐) |
|
|
立即出餐-(拼团单,拼团成功后立即出餐) |
|
|
@ -290,13 +298,13 @@ |
|
|
用餐方式 |
|
|
用餐方式 |
|
|
</view> |
|
|
</view> |
|
|
<view class="pack-options"> |
|
|
<view class="pack-options"> |
|
|
<view class="pack-option" @tap="isPack = 0"> |
|
|
<view class="pack-option" @tap="checkPack(0)"> |
|
|
<view :class="isPack === 0 ? 'radio-check' : 'radio-no-check'"> |
|
|
<view :class="isPack === 0 ? 'radio-check' : 'radio-no-check'"> |
|
|
<uni-icons v-if="isPack === 0" type="checkmarkempty" size="14"></uni-icons> |
|
|
<uni-icons v-if="isPack === 0" type="checkmarkempty" size="14"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
堂食 |
|
|
堂食 |
|
|
</view> |
|
|
</view> |
|
|
<view class="pack-option" @tap="isPack = 1"> |
|
|
<view class="pack-option" @tap="checkPack(1)"> |
|
|
<view :class="isPack === 1 ? 'radio-check' : 'radio-no-check'"> |
|
|
<view :class="isPack === 1 ? 'radio-check' : 'radio-no-check'"> |
|
|
<uni-icons v-if="isPack === 1" type="checkmarkempty" size="14"></uni-icons> |
|
|
<uni-icons v-if="isPack === 1" type="checkmarkempty" size="14"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
@ -537,6 +545,8 @@ |
|
|
<script> |
|
|
<script> |
|
|
import deliveryTimeOp from '@/package1/components/delivery-time-op/delivery-time-op.vue' |
|
|
import deliveryTimeOp from '@/package1/components/delivery-time-op/delivery-time-op.vue' |
|
|
import addressList from '@/package1/address/addressList.vue' |
|
|
import addressList from '@/package1/address/addressList.vue' |
|
|
|
|
|
import { requireLoginToCurrentPage } from '@/utils/authRedirect.js' |
|
|
|
|
|
import { buildGroupHomeSharePath } from '@/utils/sharePath.js' |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -618,7 +628,6 @@ |
|
|
this.isPaotui = false; |
|
|
this.isPaotui = false; |
|
|
this.nowMake = false; |
|
|
this.nowMake = false; |
|
|
this.isPack = 0; |
|
|
this.isPack = 0; |
|
|
this.totalPackageFee = 0; |
|
|
|
|
|
} |
|
|
} |
|
|
if (this.supportShopDelivery) { |
|
|
if (this.supportShopDelivery) { |
|
|
this.selected = 'shopDelivery'; |
|
|
this.selected = 'shopDelivery'; |
|
|
@ -655,6 +664,7 @@ |
|
|
return 0; |
|
|
return 0; |
|
|
}, |
|
|
}, |
|
|
packageFee() { |
|
|
packageFee() { |
|
|
|
|
|
if (!this.isPaotui && this.isPack !== 1) return 0; |
|
|
if (this.totalPackageFee > 0) return this.totalPackageFee; |
|
|
if (this.totalPackageFee > 0) return this.totalPackageFee; |
|
|
let fee = 0; |
|
|
let fee = 0; |
|
|
if (this.isGroupBuy && this.groupItem && this.groupItem.item) { |
|
|
if (this.isGroupBuy && this.groupItem && this.groupItem.item) { |
|
|
@ -708,7 +718,7 @@ |
|
|
if(this.isPaotui==true){ |
|
|
if(this.isPaotui==true){ |
|
|
return this.goodsAmountCalc + this.packageFee + this.deliveryFeeCalc; |
|
|
return this.goodsAmountCalc + this.packageFee + this.deliveryFeeCalc; |
|
|
}else{ |
|
|
}else{ |
|
|
return this.goodsAmountCalc; |
|
|
return this.goodsAmountCalc + this.packageFee; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
deliveryDurationMinutes() { |
|
|
deliveryDurationMinutes() { |
|
|
@ -763,15 +773,18 @@ |
|
|
if (this.isPaymentSuccessGroupInitiate) { |
|
|
if (this.isPaymentSuccessGroupInitiate) { |
|
|
let groupId = this.createdOrderInfo.groupInfo.id; |
|
|
let groupId = this.createdOrderInfo.groupInfo.id; |
|
|
let targetMembers = this.groupItem?.groupRule?.groupCount || 2; |
|
|
let targetMembers = this.groupItem?.groupRule?.groupCount || 2; |
|
|
let shopItemStr = encodeURIComponent(JSON.stringify(this.shopItem)); |
|
|
|
|
|
let isFTF = this.isFaceToFace ? 1 : 0; |
|
|
let isFTF = this.isFaceToFace ? 1 : 0; |
|
|
|
|
|
let shopId = this.createdOrderInfo.shopId || this.shopItem.id || this.shopItem.shopId || ''; |
|
|
let sceneQuery = this.isStoreGroupOrder ? '&orderScene=storeGroup' : ''; |
|
|
|
|
|
let path = `/package2/group/groupBuySingle?type=shop&item=${shopItemStr}&groupId=${groupId}&targetMembers=${targetMembers}&isFaceToFace=${isFTF}${sceneQuery}`; |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
title: '我发起了一个拼团,快来一起拼单吧!', |
|
|
title: '我发起了一个拼团,快来一起拼单吧!', |
|
|
path: path, |
|
|
path: buildGroupHomeSharePath({ |
|
|
|
|
|
shopId: shopId, |
|
|
|
|
|
groupId: groupId, |
|
|
|
|
|
targetMembers: targetMembers, |
|
|
|
|
|
isFaceToFace: isFTF, |
|
|
|
|
|
orderScene: this.isStoreGroupOrder ? 'storeGroup' : '' |
|
|
|
|
|
}), |
|
|
imageUrl:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/62c9aa038b2541ad9c400a76ddae7ef8.png' |
|
|
imageUrl:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/62c9aa038b2541ad9c400a76ddae7ef8.png' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -788,6 +801,11 @@ |
|
|
nowMakeMethod(){ |
|
|
nowMakeMethod(){ |
|
|
this.nowMake = !this.nowMake |
|
|
this.nowMake = !this.nowMake |
|
|
}, |
|
|
}, |
|
|
|
|
|
checkPack(type) { |
|
|
|
|
|
if (this.isPack === type) return; |
|
|
|
|
|
this.isPack = type; |
|
|
|
|
|
this.fetchCoupons(); |
|
|
|
|
|
}, |
|
|
formatCommissionValue(value) { |
|
|
formatCommissionValue(value) { |
|
|
let amount = parseFloat(value); |
|
|
let amount = parseFloat(value); |
|
|
if (isNaN(amount) || amount < 0.1) { |
|
|
if (isNaN(amount) || amount < 0.1) { |
|
|
@ -940,6 +958,7 @@ |
|
|
return arr.join(','); |
|
|
return arr.join(','); |
|
|
}, |
|
|
}, |
|
|
submitPay() { |
|
|
submitPay() { |
|
|
|
|
|
if (!requireLoginToCurrentPage()) return; |
|
|
if (this.currentOrderId) { |
|
|
if (this.currentOrderId) { |
|
|
uni.redirectTo({ |
|
|
uni.redirectTo({ |
|
|
url: '/package1/order/orderDetail?id=' + this.currentOrderId |
|
|
url: '/package1/order/orderDetail?id=' + this.currentOrderId |
|
|
@ -1223,11 +1242,11 @@ |
|
|
|
|
|
|
|
|
let deliveryType = this.isStoreGroupOrder ? 2 : (this.isPaotui ? 1 : 2); |
|
|
let deliveryType = this.isStoreGroupOrder ? 2 : (this.isPaotui ? 1 : 2); |
|
|
let payload = { |
|
|
let payload = { |
|
|
userId: uni.getStorageSync('id') || 'test-user123', |
|
|
userId: uni.getStorageSync('id'), |
|
|
shopId: this.shopItem.id, |
|
|
shopId: this.shopItem.id, |
|
|
deliveryType: deliveryType, |
|
|
deliveryType: deliveryType, |
|
|
isPack: this.isStoreGroupOrder ? 0 : (this.isPaotui ? 1 : this.isPack), |
|
|
isPack: this.isStoreGroupOrder ? 0 : (this.isPaotui ? 1 : this.isPack), |
|
|
packageFee: this.isPaotui && !this.isStoreGroupOrder ? this.packageFee : 0, |
|
|
packageFee: this.packageFee, |
|
|
remark: this.remark, |
|
|
remark: this.remark, |
|
|
items: items, |
|
|
items: items, |
|
|
receiverName: this.formData.address ? this.formData.address.receiverName : '', |
|
|
receiverName: this.formData.address ? this.formData.address.receiverName : '', |
|
|
|