From 9782256a8470882be940ea6dc7e17e3810416966 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com>
Date: Wed, 11 Dec 2024 17:30:55 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E8=AF=BE=E4=B8=8B=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/Instead.js | 37 ++--
.../Instead/components/transfertoPinpin.vue | 182 ++++++++++++++++++
src/views/tool/Instead/index.vue | 38 +++-
3 files changed, 237 insertions(+), 20 deletions(-)
create mode 100644 src/views/tool/Instead/components/transfertoPinpin.vue
diff --git a/src/api/Instead.js b/src/api/Instead.js
index 296c793..9b9970e 100644
--- a/src/api/Instead.js
+++ b/src/api/Instead.js
@@ -1,10 +1,10 @@
// 代客下单
import request from "@/utils/request";
//就餐形式,默认堂食后付费
-const useType='dine-in-after'
-function getUseType(){
- const type=localStorage.getItem("useType")
- return type?type:useType
+const useType = 'dine-in-after'
+function getUseType() {
+ const type = localStorage.getItem("useType")
+ return type ? type : useType
}
// 购物车-临时菜添加
@@ -12,9 +12,9 @@ export function $temporaryDishes(data) {
return request({
url: '/api/place/temporaryDishes',
method: "post",
- data:{
+ data: {
shopId: localStorage.getItem("shopId"),
- useType:getUseType(),
+ useType: getUseType(),
...data
}
});
@@ -24,12 +24,27 @@ export function $updatePrice(data) {
return request({
url: '/api/place/updatePrice',
method: "put",
- data:{
+ data: {
shopId: localStorage.getItem("shopId"),
...data
}
});
}
+/**
+ * 购物车-转桌/并桌
+ */
+export function placeswitch(data) {
+ return request({
+ url: `/api/place/switch`,
+ method: "put",
+ data: {
+ shopId: localStorage.getItem("shopId"),
+ useType: localStorage.getItem("useType"),
+ ...data
+ }
+ });
+}
+
// 团购券-获取可使用团购券列表
@@ -37,7 +52,7 @@ export function $thirdPartyCoupon(data) {
return request({
url: '/api/thirdPartyCoupon/list',
method: "get",
- params:{
+ params: {
shopId: localStorage.getItem("shopId"),
...data
}
@@ -48,7 +63,7 @@ export function $checkCoupon(data) {
return request({
url: '/api/place/checkCoupon',
method: "post",
- data:{
+ data: {
shopId: localStorage.getItem("shopId"),
...data
}
@@ -59,8 +74,8 @@ export function $waitCall(data) {
return request({
url: '/api/place/waitCall',
method: "put",
- data:{
- useType:getUseType(),
+ data: {
+ useType: getUseType(),
shopId: localStorage.getItem("shopId"),
...data
}
diff --git a/src/views/tool/Instead/components/transfertoPinpin.vue b/src/views/tool/Instead/components/transfertoPinpin.vue
new file mode 100644
index 0000000..1839e51
--- /dev/null
+++ b/src/views/tool/Instead/components/transfertoPinpin.vue
@@ -0,0 +1,182 @@
+
+ 第{{ orderItem.placeNum }}次下单商品
+