From fd70f63fc905e6d44907ba2464a4055d019c2248 Mon Sep 17 00:00:00 2001 From: yangsy Date: Sun, 4 Jan 2026 14:43:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E9=80=89=E6=8B=A9=E9=80=BB=E8=BE=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/request/biz/other/ndm-switch.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/apis/request/biz/other/ndm-switch.ts b/src/apis/request/biz/other/ndm-switch.ts index 0ea79ba..9e39491 100644 --- a/src/apis/request/biz/other/ndm-switch.ts +++ b/src/apis/request/biz/other/ndm-switch.ts @@ -14,7 +14,7 @@ import { unwrapResponse } from '@/utils'; export const pageSwitchApi = async (pageQuery: PageParams, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch/page`; const resp = await client.post>(endpoint, pageQuery, { signal }); @@ -24,7 +24,7 @@ export const pageSwitchApi = async (pageQuery: PageParams, o export const detailSwitchApi = async (id: string, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch/detail`; const resp = await client.get(endpoint, { params: { id }, signal }); @@ -34,7 +34,7 @@ export const detailSwitchApi = async (id: string, options?: { stationCode?: Stat export const saveSwitchApi = async (saveVO: NdmSwitchSaveVO, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch`; const resp = await client.post(endpoint, saveVO, { signal }); @@ -44,7 +44,7 @@ export const saveSwitchApi = async (saveVO: NdmSwitchSaveVO, options?: { station export const updateSwitchApi = async (updateVO: NdmSwitchUpdateVO, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch`; const resp = await client.put(endpoint, updateVO, { signal }); @@ -54,7 +54,7 @@ export const updateSwitchApi = async (updateVO: NdmSwitchUpdateVO, options?: { s export const deleteSwitchApi = async (ids: string[], options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch`; const resp = await client.delete(endpoint, ids, { signal }); @@ -64,7 +64,7 @@ export const deleteSwitchApi = async (ids: string[], options?: { stationCode?: S export const exportSwitchApi = async (pageQuery: PageParams, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch/defaultExportByTemplate`; const resp = await client.post(endpoint, pageQuery, { responseType: 'blob', retRaw: true, signal }); @@ -86,7 +86,7 @@ export const importSwitchApi = async (file: File, options?: { stationCode?: Stat export const probeSwitchApi = async (ids: string[], options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; - const client = stationCode ? ndmClient : ndmClient; + const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSwitch/probeByIds`; const resp = await client.post(endpoint, ids, { signal });