From 51e410a4bec7b021de805acb3206b0b5ee171b41 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Mon, 19 Aug 2024 17:15:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E8=AF=BE=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E6=9C=AC=E5=9C=B0=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 +- src/api/table.js | 24 ++- src/views/table/components/table-diancan.vue | 186 +++++++++++++------ 4 files changed, 158 insertions(+), 56 deletions(-) diff --git a/.env.development b/.env.development index 6ab192b..e76c640 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ ENV = 'development' # VUE_APP_BASE_API = 'http://192.168.2.42:8000' # VUE_APP_BASE_API = 'http://192.168.2.133:8000' # 测试 -VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn' +VUE_APP_BASE_API = 'http://t361017w45.qicp.vip/' # 生产 # VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn' # VUE_APP_BASE_API = 'http://192.168.2.96:8000' diff --git a/.env.production b/.env.production index 04cb80a..8de7729 100644 --- a/.env.production +++ b/.env.production @@ -3,7 +3,7 @@ ENV = 'production' # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http # 测试 -VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn' +VUE_APP_BASE_API = 'http://t361017w45.qicp.vip/' # 生产 # VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn' # VUE_APP_BASE_API = 'http://192.168.2.98:8000' diff --git a/src/api/table.js b/src/api/table.js index c9396f2..672a4f7 100644 --- a/src/api/table.js +++ b/src/api/table.js @@ -286,7 +286,7 @@ export function $cacheOrder(data) { */ export function $getCacheOrder(data) { return request({ - url: `/api/place/car`, + url: `/api/place/pending/cart`, method: "get", params:{ shopId: localStorage.getItem("shopId"), @@ -295,3 +295,25 @@ export function $getCacheOrder(data) { }); } +// 会员点单/取消会员点单 +export function $setUser(data) { + return request({ + url: `/api/place/updateVip`, + method: "delete", + data:{ + shopId: localStorage.getItem("shopId"), + ...data + } + }); +} +// 删除订单 +export function $delOrder(data) { + return request({ + url: `/api/place/order`, + method: "put", + data:{ + shopId: localStorage.getItem("shopId"), + ...data + } + }); +} \ No newline at end of file diff --git a/src/views/table/components/table-diancan.vue b/src/views/table/components/table-diancan.vue index 80276de..147868f 100644 --- a/src/views/table/components/table-diancan.vue +++ b/src/views/table/components/table-diancan.vue @@ -67,11 +67,17 @@