From 6501ef9497ac80bdbb8601a856d8130a8d867062 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期三, 11 六月 2025 11:04:32 +0800 Subject: [PATCH] 样式修改 --- src/assets/methods/resources.js | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/assets/methods/resources.js b/src/assets/methods/resources.js index 2178480..85b748e 100644 --- a/src/assets/methods/resources.js +++ b/src/assets/methods/resources.js @@ -1,15 +1,31 @@ import fileApi from "@/assets/js/middleGround/api/file"; import identityApi from "../js/middleGround/api/identity"; import { tokenKey } from "../js/config"; -export const getResourcePath = async (md5, appRefCode = "tourismWebsite") => { - const res = fileApi.getAliVod({ +export const getResourcePath = async (md5, appRefCode = "jingshieke") => { + // const res = fileApi.getAliVod({ + // md5, + // appRefCode, + // }); + + // return res.data != "" && res.data != undefined + // ? res.data + // : process.env.VUE_APP_API_URL + "/file/api/ApiDownload?md5=" + md5; + + // 鐩存帴鍘婚樋閲屼簯鑾峰彇 + const res = await fileApi.getAliVod({ md5, appRefCode, }); - return res.data != "" && res.data != undefined - ? res.data - : process.env.VUE_APP_API_URL + "/file/api/ApiDownload?md5=" + md5; + + if (typeof res === "string" && res.includes("http")) { + return res; + } else if (typeof res === "object" && res.data != "") { + return res.data; + } else { + return process.env.VUE_APP_API_URL + "/file/api/ApiDownload?md5=" + md5; + } }; + //涓婁紶璧勬簮 export const uploadFilePath = async (fileData) => { const res = fileApi.upload(fileData); @@ -39,7 +55,7 @@ getResourcePath, getCollectResource, setCollectResource, - uploadFilePath + uploadFilePath, }; export default MT; -- Gitblit v1.9.1