From 2978c58b42108bebe23e649fa76c7fb9bfe382d2 Mon Sep 17 00:00:00 2001 From: xudan Date: Mon, 20 Oct 2025 18:42:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(map-converter):=20=E4=BF=AE=E5=A4=8D=20API?= =?UTF-8?q?=20=E8=B7=AF=E5=BE=84=EF=BC=8C=E8=B0=83=E6=95=B4=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=89=A9=E5=B1=95=E5=90=8D=E5=A4=84=E7=90=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/map-converter.service.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/services/map-converter.service.ts b/src/services/map-converter.service.ts index 68058bf..20f32d9 100644 --- a/src/services/map-converter.service.ts +++ b/src/services/map-converter.service.ts @@ -1,4 +1,5 @@ import axios from 'axios'; + import { decodeTextFile } from './utils'; export type ProcessJsonListItem = { @@ -22,8 +23,8 @@ export async function collectOriginalProperties( const currentScenesArray: any[] = Array.isArray(currentFloorScenes) ? currentFloorScenes : currentFloorScenes - ? [currentFloorScenes] - : []; + ? [currentFloorScenes] + : []; const list = await Promise.all( floorImportList.map(async (_floor, idx) => { @@ -65,7 +66,11 @@ export async function buildProcessJsonListPayload( const content = await decodeTextFile(file); if (!content) throw new Error(`楼层 ${floor.name} 的文件 ${file?.name} 读取为空`); placeholders.push(content); - const ext = String(file?.name || '').toLowerCase().split('.').pop() || ''; + const ext = + String(file?.name || '') + .toLowerCase() + .split('.') + .pop() || ''; exts.push(ext); } @@ -109,7 +114,7 @@ export async function buildProcessJsonListPayload( export async function postProcessJsonList(payload: ProcessJsonListItem[]): Promise { const client = axios.create(); - const url = '/api/map-converter/process-json-list'; + const url = '/vwedApi/api/map-converter/process-json-list'; const response = await client.post(url, payload, { responseType: 'blob' }); const contentType = (response.headers?.['content-type'] || '').toString().toLowerCase();