wangfukang 3 weeks ago
parent
commit
1014f27763
  1. 20
      package1/buyFood/buyFood.vue
  2. 65
      package1/group/groupBuySingle.vue

20
package1/buyFood/buyFood.vue

@ -229,6 +229,17 @@
{{deliveryFeeCalc.toFixed(2)}} {{deliveryFeeCalc.toFixed(2)}}
</view> </view>
</view> </view>
<view class="fee-row" v-if="isPaotui ==false">
<view class="fee-label" style="color: #ff5722;font-size: 24rpx;padding: 14rpx 0 18rpx;">
立即出餐-(拼团单拼团成功后立即出餐)
</view>
<view class="fee-value">
<view :class="nowMake ? 'radio-check' : 'radio-no-check'">
<uni-icons type="checkmarkempty" @tap="nowMakeMethod" size="12"></uni-icons>
</view>
</view>
</view>
<view class="fee-row"> <view class="fee-row">
<view class="fee-label"> <view class="fee-label">
备注 备注
@ -264,7 +275,7 @@
<view class="bottom-placeholder"></view> <view class="bottom-placeholder"></view>
<view class="buy-bottom"> <view class="buy-bottom">
<view class="bottom-btn" @tap="submitPay"> <view class="bottom-btn" @tap="submitPay">
立即支付 立即支付{{nowMake && isPaotui == false ? '-即刻出餐' : ''}}
</view> </view>
</view> </view>
</view> </view>
@ -429,6 +440,7 @@
deliveryTime: '', deliveryTime: '',
peisongyuan: '' peisongyuan: ''
}, },
nowMake:true,
content: [], content: [],
remark:'', remark:'',
selected: 'buzhiding', selected: 'buzhiding',
@ -616,6 +628,9 @@
uni.removeStorageSync('pendingAssignWorker'); uni.removeStorageSync('pendingAssignWorker');
}, },
methods: { methods: {
nowMakeMethod(){
this.nowMake = !this.nowMake
},
initAddress() { initAddress() {
let cachedAddress = uni.getStorageSync('selectedAddress'); let cachedAddress = uni.getStorageSync('selectedAddress');
if (cachedAddress) { if (cachedAddress) {
@ -979,6 +994,9 @@
uni.showLoading({ uni.showLoading({
title: '创建订单中...' title: '创建订单中...'
}); });
if(this.nowMake && deliveryType == 2){
payload.userRequireMake = 1
}
payload.regionId = JSON.parse(uni.getStorageSync('area')).id payload.regionId = JSON.parse(uni.getStorageSync('area')).id
this.tui.request("/mall/order/create", "POST", payload, false, false).then(res => { this.tui.request("/mall/order/create", "POST", payload, false, false).then(res => {
uni.hideLoading(); uni.hideLoading();

65
package1/group/groupBuySingle.vue

@ -486,7 +486,7 @@
<!-- 支付弹出层 --> <!-- 支付弹出层 -->
<uni-popup ref="payPopup" background-color="#fff"> <uni-popup ref="payPopup" background-color="#fff">
<view class="pay-popup" <view class="pay-popup"
style="height: 580rpx;background: #fff;border-radius: 40rpx 40rpx 0 0;padding-top: 40rpx;"> style="height: auto;background: #fff;border-radius: 40rpx 40rpx 0 0;padding-top: 40rpx;">
<view class="content" style="height: 100%;margin-top:0"> <view class="content" style="height: 100%;margin-top:0">
<view class="box1"> <view class="box1">
<view style="display: flex;align-items: center;justify-content: center;height: 70rpx;"> <view style="display: flex;align-items: center;justify-content: center;height: 70rpx;">
@ -499,10 +499,10 @@
</view> </view>
<view style="height: 40rpx;text-align: center;color: #777;"> <view style="height: 40rpx;text-align: center;color: #777;">
<text v-if="groupId != '' && isFaceToFaceGroup">配送费(均摊) {{tuanzhangOrder.deliveryFee}} <text v-if="groupId != '' && isFaceToFaceGroup && groupdeliveryType == 1">配送费(均摊) {{tuanzhangOrder.deliveryFee}}
</text> </text>
<text v-if="groupdeliveryType == 1"> 打包费 {{currentItem.lunchBox}} </text> <text v-if="groupdeliveryType == 1 && currentItem.lunchBox > 0"> 打包费 {{currentItem.lunchBox}} </text>
</view> </view>
<view style="height: 40rpx;text-align: center;color: #ff5722;" v-if="selectedCoupon"> <view style="height: 40rpx;text-align: center;color: #ff5722;" v-if="selectedCoupon">
优惠券抵扣 -{{selectedCoupon.discountAmount.toFixed(2)}} 优惠券抵扣 -{{selectedCoupon.discountAmount.toFixed(2)}}
@ -511,6 +511,23 @@
若拼团失败将会为您自动退款 若拼团失败将会为您自动退款
</view> </view>
</view> </view>
<view class="box1" style="display: flex;padding: 40rpx;" v-if="groupdeliveryType == 2">
<view style="flex: 1;">
<view style="height: 42rpx;line-height: 42rpx;display: flex;">
<!-- <img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4c8e0cc311db4d38ab43e019673c4b8c.png"
alt="" style="width: 42rpx;height: 42rpx;margin-right: 20rpx;" /> -->
<text style="font-size: 30rpx;font-weight: 700;">立即出餐</text>
</view>
<view style="color: #777;width: 500rpx;">
拼团单拼团成功后立即出餐
</view>
</view>
<view style="width: 36rpx;padding-top: 20rpx;">
<view :class="nowMake ? 'radio-check' : 'radio-no-check'">
<uni-icons type="checkmarkempty" @tap="nowMakeMethod" size="12"></uni-icons>
</view>
</view>
</view>
<view class="box1" style="display: flex;padding: 40rpx;"> <view class="box1" style="display: flex;padding: 40rpx;">
<view style="flex: 1;"> <view style="flex: 1;">
<view style="height: 42rpx;line-height: 42rpx;display: flex;"> <view style="height: 42rpx;line-height: 42rpx;display: flex;">
@ -530,7 +547,7 @@
<view class="btn" <view class="btn"
style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));width: 90%;height: 100rpx;border-radius: 100rpx;text-align: center;font-size: 28rpx;font-weight: 700;line-height: 100rpx;margin: 40rpx auto;" style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));width: 90%;height: 100rpx;border-radius: 100rpx;text-align: center;font-size: 28rpx;font-weight: 700;line-height: 100rpx;margin: 40rpx auto;"
@tap="wxPayment"> @tap="wxPayment">
确认付款 确认付款{{nowMake && groupdeliveryType == 2 ? '-即刻出餐' : ''}}
</view> </view>
</view> </view>
</view> </view>
@ -627,6 +644,7 @@
remark: '', remark: '',
}, },
productId: '', productId: '',
nowMake:true,
productItem: [], productItem: [],
tuanzhangOrder: {}, tuanzhangOrder: {},
cartItems: [], cartItems: [],
@ -820,6 +838,9 @@
} }
}, },
methods: { methods: {
nowMakeMethod(){
this.nowMake = !this.nowMake
},
// touchmovegoods-list // touchmovegoods-list
onPageTouchMove(e) { onPageTouchMove(e) {
@ -1620,11 +1641,16 @@
if (!this.currentOrderId || !this.backendTotalAmount) return; if (!this.currentOrderId || !this.backendTotalAmount) return;
let amountInCents = Math.round(this.backendTotalAmount * 100); let amountInCents = Math.round(this.backendTotalAmount * 100);
let userRequireMake = 0
if(this.nowMake && this.groupdeliveryType == 2){
userRequireMake = 1
}
this.tui.request("/api/wechat/pay/unified-order", "POST", { this.tui.request("/api/wechat/pay/unified-order", "POST", {
openid: uni.getStorageSync('miniProgramOpenid') || 'test-openid', openid: uni.getStorageSync('miniProgramOpenid') || 'test-openid',
amount: amountInCents, amount: amountInCents,
description: '商城订单', description: '商城订单',
userRequireMake:userRequireMake,
outTradeNo: this.currentOrderId outTradeNo: this.currentOrderId
}, false, false).then((res) => { }, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -1765,6 +1791,26 @@
padding: 16rpx 24rpx; padding: 16rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.radio-check {
background: linear-gradient(90deg, #e3ff96, #a6ffea);
width: 42rpx;
height: 42rpx;
border-radius: 42rpx;
text-align: center;
line-height: 42rpx;
margin: 0 18rpx 0 0;
box-shadow: 0 6rpx 16rpx rgba(49, 224, 183, 0.22);
}
.radio-no-check {
width: 42rpx;
height: 42rpx;
border-radius: 42rpx;
border: 2rpx solid #e8eeee;
margin: 0 18rpx 0 0;
background: #fff;
}
.title-search { .title-search {
display: flex; display: flex;
@ -1969,7 +2015,10 @@
height: 100%; height: 100%;
border-radius: 20rpx; border-radius: 20rpx;
} }
.fee-value {
color: #00231C;
font-weight: 800;
}
.goods-top { .goods-top {
@ -2864,6 +2913,12 @@
font-weight: 900; font-weight: 900;
line-height: 34rpx; line-height: 34rpx;
} }
.fee-label {
flex: 1;
color: #6f7f79;
font-weight: 700;
}
.popup-rally-sub, .popup-rally-sub,
.join-popup-sub { .join-popup-sub {

Loading…
Cancel
Save