From 83237bd824ebfede01cff2abe7084115c2e1958c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E8=AA=89=E7=A8=8B?= <2659568239@qq.com> Date: Wed, 21 Feb 2024 16:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B0=83=E8=AF=951?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/InitialSystem/PowerOnAuth/index.tsx | 5 ++++- src/pages/InstallExe/exeDialog/CodeManage.tsx | 6 +++++- src/pages/InstallExe/exeDialog/CoreArea.tsx | 6 +++++- src/pages/InstallExe/exeDialog/DutyArea.tsx | 6 +++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/pages/InitialSystem/PowerOnAuth/index.tsx b/src/pages/InitialSystem/PowerOnAuth/index.tsx index 292bbd1..71d5d91 100644 --- a/src/pages/InitialSystem/PowerOnAuth/index.tsx +++ b/src/pages/InitialSystem/PowerOnAuth/index.tsx @@ -53,6 +53,9 @@ const PowerOnAuth: FC = ({ }) => { } }, []) + const getName = () => { + return urlParams?.fileType == 'offLine' ? '离线版' : '在线版' + } // 在指定的目录下安装快捷方式 const installSuccess = async () => { @@ -62,7 +65,7 @@ const PowerOnAuth: FC = ({ }) => { headers: { 'Content-Type': 'application/json' }, mode: "cors", body: JSON.stringify({ - folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`, + folderPath: `${DEV.FILE_URL}/${getName()}/${countType[urlParams?.fileType]}`, shortcutName: '重启服务', shortcutURL: `${DEV.LOCAL_URL}/restartService/${urlParams?.fileType}` }), diff --git a/src/pages/InstallExe/exeDialog/CodeManage.tsx b/src/pages/InstallExe/exeDialog/CodeManage.tsx index dd52e0a..9160b36 100644 --- a/src/pages/InstallExe/exeDialog/CodeManage.tsx +++ b/src/pages/InstallExe/exeDialog/CodeManage.tsx @@ -52,6 +52,10 @@ const CodeManage: FC = ({ setActive((e) => { return e + 1 }) } + const getName = () => { + return urlParams?.fileType == 'offLine' ? '离线版' : '在线版' + } + // 在指定的目录下安装快捷方式 const installSuccess = async () => { try { @@ -60,7 +64,7 @@ const CodeManage: FC = ({ headers: { 'Content-Type': 'application/json' }, mode: "cors", body: JSON.stringify({ - folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`, + folderPath: `${DEV.FILE_URL}/${getName()}/${countType[urlParams?.fileType]}`, shortcutName: '专用核心密码综合管理系统', shortcutURL: `${DEV.LOCAL_URL}/initialSystem/${urlParams?.fileType}` }), diff --git a/src/pages/InstallExe/exeDialog/CoreArea.tsx b/src/pages/InstallExe/exeDialog/CoreArea.tsx index 8a1313c..e2cb199 100644 --- a/src/pages/InstallExe/exeDialog/CoreArea.tsx +++ b/src/pages/InstallExe/exeDialog/CoreArea.tsx @@ -62,6 +62,10 @@ const CoreArea: FC = ({ setActive((e) => { return e + 1 }) } + const getName = () => { + return urlParams?.fileType == 'offLine' ? '离线版' : '在线版' + } + // 在指定的目录下安装快捷方式 const installSuccess = async () => { try { @@ -70,7 +74,7 @@ const CoreArea: FC = ({ headers: { 'Content-Type': 'application/json' }, mode: "cors", body: JSON.stringify({ - folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`, + folderPath: `${DEV.FILE_URL}/${getName()}/${countType[urlParams?.fileType]}`, shortcutName: '核心区客户端', shortcutURL: `${DEV.LOCAL_URL}/coreSystemEntrance/${urlParams?.fileType}?sysType=${encodeURIComponent(sysType[urlParams?.fileType] + 'hx')}` }), diff --git a/src/pages/InstallExe/exeDialog/DutyArea.tsx b/src/pages/InstallExe/exeDialog/DutyArea.tsx index 45f3c5e..0ba8b5b 100644 --- a/src/pages/InstallExe/exeDialog/DutyArea.tsx +++ b/src/pages/InstallExe/exeDialog/DutyArea.tsx @@ -62,6 +62,10 @@ const DutyArea: FC = ({ setActive((e) => { return e + 1 }) } + const getName = () => { + return urlParams?.fileType == 'offLine' ? '离线版' : '在线版' + } + // 在指定的目录下安装快捷方式 const installSuccess = async () => { try { @@ -70,7 +74,7 @@ const DutyArea: FC = ({ headers: { 'Content-Type': 'application/json' }, mode: "cors", body: JSON.stringify({ - folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`, + folderPath: `${DEV.FILE_URL}/${getName()}/${countType[urlParams?.fileType]}`, shortcutName: '执勤区客户端', shortcutURL: `${DEV.LOCAL_URL}/coreSystemEntrance/${urlParams?.fileType}?sysType=${encodeURIComponent(sysType[urlParams?.fileType] + 'zq')}` }),