From 78d8b2478a0de9c5bb1ed5f70cff0b4639fa4b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sat, 18 Oct 2025 12:15:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(layout):=E4=BC=98=E5=8C=96API=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E9=85=8D=E7=BD=AE=E9=80=BB=E8=BE=91-=20=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=AF=B9API=5FBASE=5FURL=E5=B8=B8=E9=87=8F=E7=9A=84?= =?UTF-8?q?=E4=BE=9D=E8=B5=96-=20=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=BC=98=E5=85=88=E4=BD=BF=E7=94=A8=E8=BF=9C=E7=A8=8B=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84ApiUrl=20-=20=E7=AE=80=E5=8C=96=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=B7=A5=E5=85=B7=E4=B8=ADAPI=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91=20-=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=86=97=E4=BD=99=E7=9A=84=E8=AE=A2=E5=8D=95=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/header-tools.vue | 4 +--- src/utils/request.ts | 2 +- src/views/sdy/shopDealerOrder/index.vue | 29 ------------------------- 3 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/layout/components/header-tools.vue b/src/layout/components/header-tools.vue index 2dfe6d5..3e58727 100644 --- a/src/layout/components/header-tools.vue +++ b/src/layout/components/header-tools.vue @@ -153,7 +153,6 @@ import { useSiteStore } from '@/store/modules/site'; import Qrcode from "@/components/QrCode/index.vue"; import {AppInfo} from "@/api/cms/cmsWebsite/model"; import {getCmsWebsiteFieldByCode} from "@/api/cms/cmsWebsiteField"; -import {API_BASE_URL} from "@/config/setting"; // 是否开启响应式布局 const themeStore = useThemeStore(); @@ -247,8 +246,7 @@ const reload = () => { }); } // 检查是否启动自定义接口 - if(!localStorage.getItem('ApiUrl')){ - localStorage.setItem('ApiUrl', `${API_BASE_URL}`) + if(import.meta.env.PROD){ getCmsWebsiteFieldByCode('ApiUrl').then(res => { if(res){ localStorage.setItem('ApiUrl', `${res.value}`); diff --git a/src/utils/request.ts b/src/utils/request.ts index 1285742..bca94d7 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -19,7 +19,7 @@ const getBaseUrl = (): string => { try { // 如果store中没有,则尝试从localStorage获取 const ApiUrl = localStorage.getItem('ApiUrl'); - if (ApiUrl && import.meta.env.PROD) { + if (ApiUrl) { return ApiUrl; } } catch (error) { diff --git a/src/views/sdy/shopDealerOrder/index.vue b/src/views/sdy/shopDealerOrder/index.vue index 66bb726..ff2d5a8 100644 --- a/src/views/sdy/shopDealerOrder/index.vue +++ b/src/views/sdy/shopDealerOrder/index.vue @@ -262,35 +262,6 @@ const reload = (where?: ShopDealerOrderParam) => { tableRef?.value?.reload({where: where}); }; -/* 结算单个订单 */ -// const settleOrder = (row: ShopDealerOrder) => { -// const totalCommission = (parseFloat(row.firstMoney || '0') + -// parseFloat(row.secondMoney || '0') + -// parseFloat(row.thirdMoney || '0')).toFixed(2); -// -// Modal.confirm({ -// title: '确认结算', -// content: `确定要结算此订单吗?总佣金金额:¥${totalCommission}`, -// icon: createVNode(DollarOutlined), -// okText: '确认结算', -// okType: 'primary', -// cancelText: '取消', -// onOk: () => { -// const hide = message.loading('正在结算...', 0); -// // 这里调用结算API -// updateSdyDealerOrder({ -// ...row, -// isSettled: 1 -// }) -// setTimeout(() => { -// hide(); -// message.success('结算成功'); -// reload(); -// }, 1000); -// } -// }); -// }; - /* 批量结算 */ const batchSettle = () => { if (!selection.value.length) {