From 7ceca3b917e91203c90583b31bf6e0336e0f4bfc Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 10 Oct 2025 18:13:38 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=EF=BC=8C=E6=9C=AC=E5=9C=B0?=
=?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E9=93=BE=E6=8E=A5=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=EF=BC=8C=E4=B8=BA=E8=A7=A3=E5=86=B3=E9=83=A8=E5=88=86=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E8=87=AA=E5=8A=A8=E6=B7=BB=E5=8A=A0=E4=BA=86=E9=83=A8?=
=?UTF-8?q?=E5=88=86=E8=B7=AF=E7=94=B1=E5=89=8D=E7=BC=80=E5=AF=BC=E8=87=B4?=
=?UTF-8?q?404=EF=BC=8C=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E5=89=8D?=
=?UTF-8?q?=E7=BC=80=E5=A2=9E=E5=8A=A0/?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.location | 4 +-
README.md | 4 +-
src/api/account/shop.ts | 168 +++++++++---------
src/api/config.ts | 10 +-
src/store/modules/carts.ts | 12 +-
.../tool/Instead/components/carts/list.vue | 23 ++-
6 files changed, 118 insertions(+), 103 deletions(-)
diff --git a/.env.location b/.env.location
index f6b1adf..8c2f9de 100644
--- a/.env.location
+++ b/.env.location
@@ -8,13 +8,13 @@ VITE_APP_PORT=3000
# VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 测试
# VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式
-VITE_APP_API_URL=http://192.168.1.31/ # 本地
+VITE_APP_API_URL=http://192.168.1.42/ # 本地
# WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws
# VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss
# VITE_APP_WS_ENDPOINT=wss://czgeatws.sxczgkj.com/wss # 正式
-VITE_APP_WS_ENDPOINT=ws://192.168.1.31:2348 # 本地
+VITE_APP_WS_ENDPOINT=ws://192.168.1.42:2348 # 本地
# 启用 Mock 服务
diff --git a/README.md b/README.md
index 2784dc8..1b7a09c 100644
--- a/README.md
+++ b/README.md
@@ -34,8 +34,8 @@ vscode如果无代码提示
映射地址
-1. 上传.zip文件解压到服务器的 /home/web下
-2. cd到/home/web下
+1. ***cd /usr/share/nginx/html***
+2. 上传.zip文件服务器的 /usr/share/nginx/html下
3. 执行命令
```unzip -o dist.zip```
diff --git a/src/api/account/shop.ts b/src/api/account/shop.ts
index 14ad0b6..387b3fc 100644
--- a/src/api/account/shop.ts
+++ b/src/api/account/shop.ts
@@ -1,9 +1,9 @@
import request from "@/utils/request";
-const baseURL = "account/admin/shopInfo";
+const baseURL = "/account/admin/shopInfo";
const ShopApi = {
/** 获取店铺列表*/
- getList(params : PageQuery) {
+ getList(params: PageQuery) {
return request({
url: `${baseURL}`,
method: "get",
@@ -11,48 +11,48 @@ const ShopApi = {
});
},
/** 获取店铺分店列表*/
- getOtherShopList(params : PageQuery) {
+ getOtherShopList(params: PageQuery) {
return request({
url: `${baseURL}/otherShop`,
method: "get",
params: params,
});
},
- getBranchList(params : PageQuery) {
+ getBranchList(params: PageQuery) {
return request({
url: `${baseURL}/branchList`,
method: "get",
params: params,
});
},
- getBranchChange(id : PageQuery) {
+ getBranchChange(id: PageQuery) {
return request({
url: `${baseURL}/change/${id}`,
method: "post",
});
},
- add(data : ShopInfoEditDTO) {
+ add(data: ShopInfoEditDTO) {
return request({
url: `${baseURL}`,
method: "post",
data,
});
},
- edit(data : ShopInfoEditDTO) {
+ edit(data: ShopInfoEditDTO) {
return request({
url: `${baseURL}`,
method: "put",
data,
});
},
- get(params : getRequest) {
+ get(params: getRequest) {
return request({
url: `${baseURL}/detail`,
method: "get",
params
});
},
- delete(params : any) {
+ delete(params: any) {
return request({
url: `${baseURL}`,
method: "delete",
@@ -66,39 +66,39 @@ export interface getRequest {
/**
* 店铺id,可不传,不传递则为获取当前用户店铺
*/
- id ?: string | number;
- [property : string] : any;
+ id?: string | number;
+ [property: string]: any;
}
/**
* ShopInfoEditDTO
*/
export interface ShopInfoEditDTO {
- accountName ?: null | string;
- accountPwd ?: null | string;
- activateCode ?: null | string;
- address ?: null | string;
- chainName ?: null | string;
- detail ?: null | string;
- frontImg ?: null | string;
- id : number | null;
- lat ?: null | string;
- lng ?: null | string;
- logo ?: null | string;
- phone ?: null | string;
- profiles ?: null | string;
- roleId ?: number | null;
- shopName ?: null | string;
- shopType ?: null | string;
- [property : string] : any;
+ accountName?: null | string;
+ accountPwd?: null | string;
+ activateCode?: null | string;
+ address?: null | string;
+ chainName?: null | string;
+ detail?: null | string;
+ frontImg?: null | string;
+ id: number | null;
+ lat?: null | string;
+ lng?: null | string;
+ logo?: null | string;
+ phone?: null | string;
+ profiles?: null | string;
+ roleId?: number | null;
+ shopName?: null | string;
+ shopType?: null | string;
+ [property: string]: any;
}
export interface PageQuery {
- page : number;
- shopName ?: string;
- size : number;
- status ?: number;
- [property : string] : any;
+ page: number;
+ shopName?: string;
+ size: number;
+ status?: number;
+ [property: string]: any;
}
@@ -109,193 +109,193 @@ export interface ShopInfo {
/**
* 详细地址
*/
- address ?: null | string;
+ address?: null | string;
/**
* 项目分类
*/
- article ?: null | string;
+ article?: null | string;
/**
* 背景图
*/
- backImg ?: null | string;
+ backImg?: null | string;
/**
* 开票系统账号
*/
- bindAccount ?: null | string;
+ bindAccount?: null | string;
/**
* 台桌预订短信
*/
- bookingSms ?: null | string;
+ bookingSms?: null | string;
/**
* 营业时间(周结束)
*/
- businessEndDay ?: null | string;
+ businessEndDay?: null | string;
/**
* 营业时间(周开始)
*/
- businessStartDay ?: null | string;
+ businessStartDay?: null | string;
/**
* 营业时间
*/
- businessTime ?: null | string;
+ businessTime?: null | string;
/**
* 连锁店扩展店名
*/
- chainName ?: null | string;
+ chainName?: null | string;
/**
* 市
*/
- cities ?: null | string;
+ cities?: null | string;
/**
* 积分群体 all-所有 vip-仅针对会员
*/
- consumeColony ?: null | string;
+ consumeColony?: null | string;
/**
* 联系人姓名
*/
- contactName ?: null | string;
+ contactName?: null | string;
/**
* 封面图
*/
- coverImg ?: null | string;
- createTime ?: null | string;
+ coverImg?: null | string;
+ createTime?: null | string;
/**
* 店铺简介
*/
- detail ?: null | string;
+ detail?: null | string;
/**
* 区/县
*/
- districts ?: null | string;
+ districts?: null | string;
/**
* 就餐模式 堂食 dine-in 外带 take-out
*/
- eatModel ?: null | string;
+ eatModel?: null | string;
/**
* 到期时间
*/
- expireTime ?: null | string;
+ expireTime?: null | string;
/**
* 门头照
*/
- frontImg ?: null | string;
+ frontImg?: null | string;
/**
* 使用系统用户 sys_user id
*/
- id ?: number | null;
+ id?: number | null;
/**
* 是否开启会员余额支付
*/
- isAccountPay ?: number | null;
+ isAccountPay?: number | null;
/**
* 是否允许会员自定义金额 1 允许 0 不允许
*/
- isCustomAmount ?: number | null;
+ isCustomAmount?: number | null;
/**
* 是否开启会员充值密码 1 启用 0 禁用
*/
- isMemberInPwd ?: number | null;
+ isMemberInPwd?: number | null;
/**
* 是否启用会员价 0否1是
*/
- isMemberPrice ?: number | null;
+ isMemberPrice?: number | null;
/**
* 是否开启会员退款密码 1 启用 0 禁用
*/
- isMemberReturnPwd ?: number | null;
+ isMemberReturnPwd?: number | null;
/**
* 是否开启退款密码 1 启用 0 禁用
*/
- isReturnPwd ?: number | null;
+ isReturnPwd?: number | null;
/**
* 是否免除桌位费 0否1是
*/
- isTableFee ?: number | null;
+ isTableFee?: number | null;
/**
* 经纬度
*/
- lat ?: null | string;
+ lat?: null | string;
/**
* 经纬度
*/
- lng ?: null | string;
+ lng?: null | string;
/**
* 店铺logo
*/
- logo ?: null | string;
+ logo?: null | string;
/**
* 主店id
*/
- mainId ?: number | null;
+ mainId?: number | null;
/**
* 0停业 1,正常营业 2,网上售卖
*/
- onSale ?: number | null;
+ onSale?: number | null;
/**
* 操作密码
*/
- operationPwd ?: null | string;
+ operationPwd?: null | string;
/**
* 店铺收款码
*/
- paymentQrcode ?: null | string;
+ paymentQrcode?: null | string;
/**
* 联系电话
*/
- phone ?: null | string;
+ phone?: null | string;
/**
* trial试用版,release正式
*/
- profiles ?: null | string;
+ profiles?: null | string;
/**
* 省
*/
- provinces ?: null | string;
- registerType ?: null | string;
+ provinces?: null | string;
+ registerType?: null | string;
/**
* 数电发票类型
*/
- sdType ?: null | string;
+ sdType?: null | string;
/**
* 店铺名称
*/
- shopName ?: null | string;
+ shopName?: null | string;
/**
* 商家二维码
*/
- shopQrcode ?: null | string;
+ shopQrcode?: null | string;
/**
* 店铺类型 单店--only 连锁店--chain--加盟店join (对应原来 type)
*/
- shopType ?: null | string;
+ shopType?: null | string;
/**
* 小程序码(零点八零首页)
*/
- smallQrcode ?: null | string;
+ smallQrcode?: null | string;
/**
* -1 平台禁用 0-过期,1正式营业,
*/
- status ?: number | null;
+ status?: number | null;
/**
* 店铺口号
*/
- subTitle ?: null | string;
+ subTitle?: null | string;
/**
* 桌位费
*/
- tableFee ?: number | null;
+ tableFee?: number | null;
/**
* 商家标签
*/
- tag ?: null | string;
+ tag?: null | string;
/**
* 税率
*/
- taxAmount ?: null | string;
+ taxAmount?: null | string;
/**
* 管理 0否 1是, 1 为直接管理 可切换店铺 0 不可以切换
*/
- tubeType ?: number | null;
- updateTime ?: null | string;
- [property : string] : any;
+ tubeType?: number | null;
+ updateTime?: null | string;
+ [property: string]: any;
}
\ No newline at end of file
diff --git a/src/api/config.ts b/src/api/config.ts
index 96f6d21..a62ca2f 100644
--- a/src/api/config.ts
+++ b/src/api/config.ts
@@ -4,8 +4,8 @@
// 商品,耗材相关:
// 系统相关:
-export const Account_BaseUrl = "account";
-export const Order_BaseUrl = "order";
-export const Product_BaseUrl = "product";
-export const System_BaseUrl = "system";
-export const Market_BaseUrl = "market";
+export const Account_BaseUrl = "/account";
+export const Order_BaseUrl = "/order";
+export const Product_BaseUrl = "/product";
+export const System_BaseUrl = "/system";
+export const Market_BaseUrl = "/market";
diff --git a/src/store/modules/carts.ts b/src/store/modules/carts.ts
index d102570..f8538ba 100644
--- a/src/store/modules/carts.ts
+++ b/src/store/modules/carts.ts
@@ -94,7 +94,7 @@ export const useCartsStore = defineStore("carts", () => {
const vipUser = ref<{ id?: string | number, isVip?: boolean }>({});
function changeUser(user: any) {
vipUser.value = user;
- userPoints.value = 0;
+ payParamsInit()
}
// 就餐类型
@@ -382,10 +382,10 @@ export const useCartsStore = defineStore("carts", () => {
}
function changeSelCart(cart: CartsState) {
- console.log(cart)
if (!cart.id) {
return
}
+
if (cart.placeNum) {
selPlaceNum.value = cart.placeNum
isOldOrder.value = true
@@ -395,11 +395,7 @@ export const useCartsStore = defineStore("carts", () => {
})
return
}
- if (cart.is_gift) {
- isSelGift.value = true
- } else {
- isSelGift.value = false
- }
+
if (cart.is_gift) {
isSelGift.value = true
@@ -408,7 +404,9 @@ export const useCartsStore = defineStore("carts", () => {
} else {
isSelGift.value = false
+ isOldOrder.value = false
selListIndex.value = list.value.findIndex((item: CartsState) => item.id === cart.id);
+ console.log('selListIndex.value', selListIndex.value)
}
}
diff --git a/src/views/tool/Instead/components/carts/list.vue b/src/views/tool/Instead/components/carts/list.vue
index 0323f85..c79cb02 100644
--- a/src/views/tool/Instead/components/carts/list.vue
+++ b/src/views/tool/Instead/components/carts/list.vue
@@ -125,9 +125,7 @@
更多支付
@@ -257,6 +255,25 @@ function itemClick(item) {
function changeNumber(step, item) {
carts.changeNumber(step * 1, item);
}
+const disabledMorePay = computed(() => {
+ if (!carts.isLinkFinshed) {
+ return true;
+ }
+ if (props.showOrder) {
+ return true;
+ }
+ if (Array.isArray(carts.oldOrder.detailMap)) {
+ if (carts.oldOrder.detailMap.length && !props.showOrder) {
+ return true;
+ }
+ } else {
+ if (carts.isEmpty && JSON.stringify(carts.oldOrder.detailMap) === "{}") {
+ return true;
+ }
+ }
+
+ return false;
+});
defineExpose({
carts,