getFileUrl地址优先从服务器获取
parent
eda80e69ca
commit
4e7b097b30
|
|
@ -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"];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue