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