From 4e7b097b308ed2417f1b5e12888382ff61b8060a Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Fri, 27 Feb 2026 14:02:33 +0800 Subject: [PATCH] =?UTF-8?q?getFileUrl=E5=9C=B0=E5=9D=80=E4=BC=98=E5=85=88?= =?UTF-8?q?=E4=BB=8E=E6=9C=8D=E5=8A=A1=E5=99=A8=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/index.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index 62155a5..09f7e10 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,3 +1,4 @@ +import { request } from "@cqsjjb/jjb-common-lib/http.js"; import dayjs from "dayjs"; import { ID_NUMBER } from "../regular"; @@ -554,6 +555,15 @@ export function normalizeEmptyHtml(html) { /** * 获取文件url */ -export function getFileUrl() { - return process.env.app["fileUrl"]; +export async function getFileUrl() { + if (window.fileUrl) + return window.fileUrl; + try { + const { data } = await request("/basicInfo/imgFiles/getImagePath", "get"); + window.fileUrl = data; + return data || process.env.app["fileUrl"]; + } + catch { + return process.env.app["fileUrl"]; + } }