This commit is contained in:
parent
b7ce6a681a
commit
14f23ddcc3
@ -293,7 +293,7 @@
|
|||||||
reservation_type: 1,
|
reservation_type: 1,
|
||||||
server_user_id: 0,
|
server_user_id: 0,
|
||||||
table_number: 1, //酒店
|
table_number: 1, //酒店
|
||||||
banquet_date: '', //酒店
|
banquet_date: null, //酒店
|
||||||
},
|
},
|
||||||
matchedItems_sp: [],
|
matchedItems_sp: [],
|
||||||
showDatePicker: false
|
showDatePicker: false
|
||||||
@ -343,6 +343,9 @@
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/banquet/order/detail?order_id=${res.data.order_id}`
|
url: `/pages/banquet/order/detail?order_id=${res.data.order_id}`
|
||||||
});
|
});
|
||||||
|
}else if (res.code === 0) {
|
||||||
|
uni.$u.toast('请求错误,请从新下单!');
|
||||||
|
this.goBack();
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
}
|
}
|
||||||
@ -447,7 +450,12 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 返回上一级
|
||||||
|
goBack() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1 // delta 表示返回的页面数,1 表示返回上一级
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,10 +169,14 @@
|
|||||||
<view>4.在此,感谢您对此平台以及厨师们的支持,您的支持就是我们前进的最大动力。</view>
|
<view>4.在此,感谢您对此平台以及厨师们的支持,您的支持就是我们前进的最大动力。</view>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<view class="pb-4" />
|
|
||||||
<wd-button plain hairline custom-style="width: calc(100vw - 120rpx);" @click="payOrder(1)">确定支付</wd-button>
|
|
||||||
<view class="pb-2" />
|
<view class="pb-2" />
|
||||||
<wd-button hairline custom-style="width: calc(100vw - 120rpx);" @click="payOrder(2)">取消订单</wd-button>
|
<wd-button plain hairline custom-style="width: calc(100vw - 120rpx);" @click="payOrder(2)">取消订单</wd-button>
|
||||||
|
<view class="pb-2" />
|
||||||
|
<wd-button hairline custom-style="width: calc(100vw - 120rpx);" @click="payOrder(1)">确定支付</wd-button>
|
||||||
|
<view class="pb-2" />
|
||||||
|
<wd-button hairline custom-style="width: calc(100vw - 120rpx);" @click="goBackHome()">返回首页</wd-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</wd-card>
|
</wd-card>
|
||||||
<view class="p-2"></view>
|
<view class="p-2"></view>
|
||||||
@ -180,10 +184,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { useColPickerData, useModal } from '@/hooks'
|
import {
|
||||||
import { defineComponent } from "vue";
|
useColPickerData,
|
||||||
import { CommonApi, UserApi } from "@/api";
|
useModal
|
||||||
const { colPickerData, findChildrenByCode } = useColPickerData()
|
} from '@/hooks'
|
||||||
|
import {
|
||||||
|
defineComponent
|
||||||
|
} from "vue";
|
||||||
|
import {
|
||||||
|
CommonApi,
|
||||||
|
UserApi
|
||||||
|
} from "@/api";
|
||||||
|
const {
|
||||||
|
colPickerData,
|
||||||
|
findChildrenByCode
|
||||||
|
} = useColPickerData()
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -215,7 +230,9 @@ export default defineComponent({
|
|||||||
payOrder(type) {
|
payOrder(type) {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
//支付订单
|
//支付订单
|
||||||
CommonApi.commonPost('/api/banquet/order/pay', { order_id: this.order_id }).catch((res) => {
|
CommonApi.commonPost('/api/banquet/order/pay', {
|
||||||
|
order_id: this.order_id
|
||||||
|
}).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
wx.requestPayment({
|
wx.requestPayment({
|
||||||
"timeStamp": res.data.timeStamp,
|
"timeStamp": res.data.timeStamp,
|
||||||
@ -241,7 +258,9 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//取消订单
|
//取消订单
|
||||||
CommonApi.commonPost('/api/banquet/order/cancel', { order_id: this.order_id }).catch((res) => {
|
CommonApi.commonPost('/api/banquet/order/cancel', {
|
||||||
|
order_id: this.order_id
|
||||||
|
}).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
} else {
|
} else {
|
||||||
@ -267,7 +286,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
// //购物车验证
|
// //购物车验证
|
||||||
getOrderDetail() {
|
getOrderDetail() {
|
||||||
CommonApi.commonGet('/api/banquet/order/detail', { order_id: this.order_id }).catch((res) => {
|
CommonApi.commonGet('/api/banquet/order/detail', {
|
||||||
|
order_id: this.order_id
|
||||||
|
}).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
this.matchedItems_sp = res.data.order_info;
|
this.matchedItems_sp = res.data.order_info;
|
||||||
this.orderInfo = res.data.order;
|
this.orderInfo = res.data.order;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user