更新客下单支付订单
This commit is contained in:
@@ -317,3 +317,14 @@ export function $delOrder(data) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 支付订单
|
||||||
|
export function $payOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/place/pay',
|
||||||
|
method: "put",
|
||||||
|
data:{
|
||||||
|
shopId: localStorage.getItem("shopId"),
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -825,6 +825,7 @@ import {
|
|||||||
$getCacheOrder,
|
$getCacheOrder,
|
||||||
$delOrder,
|
$delOrder,
|
||||||
$setUser,
|
$setUser,
|
||||||
|
$payOrder
|
||||||
} from "@/api/table";
|
} from "@/api/table";
|
||||||
import { tbShopCategoryGet } from "@/api/shop";
|
import { tbShopCategoryGet } from "@/api/shop";
|
||||||
//判断商品是否可以下单
|
//判断商品是否可以下单
|
||||||
@@ -1247,7 +1248,7 @@ export default {
|
|||||||
orderId: this.createOrder.data.id,
|
orderId: this.createOrder.data.id,
|
||||||
payType: this.order.payType,
|
payType: this.order.payType,
|
||||||
});
|
});
|
||||||
const res = await $clearCart({
|
const res = await $payOrder({
|
||||||
tableId: this.table.tableId,
|
tableId: this.table.tableId,
|
||||||
masterId: this.masterId,
|
masterId: this.masterId,
|
||||||
orderId: this.createOrder.data.id,
|
orderId: this.createOrder.data.id,
|
||||||
@@ -1257,7 +1258,7 @@ export default {
|
|||||||
},
|
},
|
||||||
payOrderSuccess() {
|
payOrderSuccess() {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: "更新成功",
|
title: "支付成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|||||||
Reference in New Issue
Block a user