diff --git a/src/apis/paths/document.ts b/src/apis/paths/document.ts index 1bfeced03ceca2712c8065dbe8afb3b46253fad1..db22030735dbb652b9df2545e9e49e6b3f7754d2 100644 --- a/src/apis/paths/document.ts +++ b/src/apis/paths/document.ts @@ -9,15 +9,13 @@ // See the Mulan PSL v2 for more details. import { witchainDGet } from 'src/apis/server'; import type { FcResponse } from 'src/apis/server'; -import { getWitchainDAPIPrefix } from 'src/utils/tools'; /** * 获取文档解析方法列表 * @returns Promise<[any, FcResponse | undefined]> */ export const getParseMethodList = (): Promise<[any, FcResponse | undefined]> => { - const apiPrefix = getWitchainDAPIPrefix(); - return witchainDGet(`${apiPrefix}/other/parse_method`); + return witchainDGet(`/wtd/other/parse_method`); }; /** diff --git a/src/utils/tools.ts b/src/utils/tools.ts index d27aa9926dc7d036611f0e2f2e7cc57ebba435bb..063cfc43e18a0b7a2ccaea9954df126adc1fb5d0 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -155,16 +155,3 @@ export async function getWitchainDProxyUrl(): Promise { const witchainDUrl = import.meta.env.WITCHAIND_PROXY_URL; return typeof witchainDUrl === 'string' && witchainDUrl ? witchainDUrl : ''; } - -/** - * 获取 WitchainD API 路径前缀 - * 根据环境返回正确的API路径前缀 - * - 开发环境:/witchaind/api - * - 生产环境:/wtd/api - */ -export function getWitchainDAPIPrefix(): string { - // 开发环境使用 /witchaind/api,生产环境使用 /wtd/api - const isDevelopment = window.location.hostname === 'localhost' || - import.meta.env.MODE === 'development'; - return isDevelopment ? '/witchaind/api' : '/wtd/api'; -} diff --git a/src/views/dialogue/components/DialogueSession.vue b/src/views/dialogue/components/DialogueSession.vue index ae007a0162b4dd1fec634a7e76f15b46af18c971..a27329108dbe96bc31e2bba9f7a9c51f7675610f 100644 --- a/src/views/dialogue/components/DialogueSession.vue +++ b/src/views/dialogue/components/DialogueSession.vue @@ -902,8 +902,7 @@ const downLoadSourceFile = (file: any) => { // 根据环境动态获取API前缀 const isDevelopment = window.location.hostname === 'localhost' || import.meta.env.MODE === 'development'; - const apiPrefix = isDevelopment ? '/witchaind/api' : '/wtd/api'; - const url = `${window.origin}${apiPrefix}/doc/download?docId=${file.documentId}`; + const url = `${window.origin}/wtd/doc/download?docId=${file.documentId}`; downloadFun(url); };