宴席2.0
Some checks are pending
deploy / deploy (push) Waiting to run

This commit is contained in:
sjeam 2025-08-15 14:53:07 +08:00
parent 3f4b19fcf6
commit 77ced33f14
3 changed files with 10 additions and 25 deletions

View File

@ -281,7 +281,7 @@
public_name: '',
},
server_user_id: 0,
order_id: 0,//id
address_string: '',
banquetType: this.getBanquetType(),
propShowOrder: false,
@ -348,6 +348,7 @@
addOrder() {
CommonApi.commonPost('/api/banquet/order/createOrder', this.orderInfo).catch((res) => {
if (res.code === 1) {
this.order_id = res.data.order_id;
this.propShowOrder = true;
} else {
uni.$u.toast(res.msg);
@ -356,10 +357,10 @@
},
//
payOrder(order_id) {
payOrder() {
CommonApi.commonPost('/api/banquet/order/pay', {
order_id: order_id
order_id: this.order_id
}).catch((res) => {
if (res.code === 1) {
wx.requestPayment({

View File

@ -192,6 +192,7 @@
<wd-textarea readonly auto-height label="备注" v-model="orderInfo.remark" placeholder="请填写备注" /> -->
<view class="pb-4" />
<wd-button plain hairline custom-style="width: calc(100vw - 100rpx);" @click="payOrder(1)">确定支付</wd-button>
<view class="pb-2" />
<wd-button hairline custom-style="width: calc(100vw - 100rpx);" @click="payOrder(2)">取消订单</wd-button>
</wd-cell-group>
</wd-form>
@ -273,18 +274,6 @@ export default defineComponent({
// },
// //
// addOrder () {
// CommonApi.commonPost('/api/banquet/order/createOrder', this.orderInfo).catch((res) => {
// if (res.code === 1) {
// this.payOrder(res.data.order_id);
// this.propShowOrder = true;
// } else {
// uni.$u.toast(res.msg);
// }
// });
// },
//
payOrder (type) {
@ -293,9 +282,7 @@ export default defineComponent({
CommonApi.commonPost('/api/banquet/order/pay', { order_id: this.order_id }).catch((res) => {
if (res.code === 1) {
// this.payOrder(res.data.order_id);
// this.propShowOrder = true;
console.log(res.data);
wx.requestPayment({
"timeStamp": res.data.timeStamp,
@ -322,10 +309,7 @@ export default defineComponent({
//
CommonApi.commonPost('/api/banquet/order/cancel', { order_id: this.order_id }).catch((res) => {
if (res.code === 1) {
// this.payOrder(res.data.order_id);
// this.propShowOrder = true;
console.log(res.data);
// this.close();
uni.$u.toast(res.msg);
} else {
uni.$u.toast(res.msg);
}

View File

@ -53,10 +53,10 @@ body {
</view>
</z-paging>
<up-button class="" style="" text="返回首页" type="primary" color="#59CB56" shape="circle" size="normal"
<!-- <up-button class="" style="" text="返回首页" type="primary" color="#59CB56" shape="circle" size="normal"
custom-style="width:calc(100vw - 50rpx)" @click="goBackHome">
</up-button>
<!-- </view> -->
</up-button> -->
</view>
</template>