fix: 代客下单问题修复,本地测试服链接修改,为解决部分接口自动添加了部分路由前缀导致404,部分接口前缀增加/
This commit is contained in:
@@ -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 服务
|
||||
|
||||
@@ -34,8 +34,8 @@ vscode如果无代码提示
|
||||
映射地址
|
||||
<https://fv901fw8033.vicp.fun/>
|
||||
|
||||
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```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import request from "@/utils/request";
|
||||
const baseURL = "account/admin/shopInfo";
|
||||
const baseURL = "/account/admin/shopInfo";
|
||||
|
||||
const ShopApi = {
|
||||
/** 获取店铺列表*/
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// 商品,耗材相关:<https://tapi.cashier.sxczgkj.cn/product/>
|
||||
// 系统相关:<https://tapi.cashier.sxczgkj.cn/system/>
|
||||
|
||||
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";
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,9 +125,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:disabled="
|
||||
!carts.isLinkFinshed || showOrder || (carts.oldOrder.detailMap.length && !showOrder)
|
||||
"
|
||||
:disabled="disabledMorePay"
|
||||
@click="createOrder('more-pay')"
|
||||
>
|
||||
更多支付
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user