From 53c71572f88a86514a41f0a8f489fccfcaeed6e2 Mon Sep 17 00:00:00 2001 From: user1 <10901603+no-distractions1@user.noreply.gitee.com> Date: 星期三, 19 六月 2024 11:31:48 +0800 Subject: [PATCH] 艺术戏剧(连线题验证) --- src/assets/methods/resources.js | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/assets/methods/resources.js b/src/assets/methods/resources.js index 7711436..bd860ff 100644 --- a/src/assets/methods/resources.js +++ b/src/assets/methods/resources.js @@ -1,5 +1,22 @@ -const getResourcePath = (md5) => { - return process.env.VUE_APP_API_URL + '/file/api/ApiDownload?md5=' + md5 -} +import fileApi from "@/assets/js/middleGround/api/file"; +export const getResourcePath = async (md5, appRefCode = "jingshieke") => { + let path = ""; + await fileApi + .getAliVod({ + md5, + appRefCode, + }) + .then((res) => { + if (res?.data != "" && res?.data != undefined) { + path = res.data; + } else { + path = process.env.VUE_APP_API_URL + "/file/api/ApiDownload?md5=" + md5; + } + }); + return path; +}; +const MT = { + getResourcePath, +}; -export default getResourcePath \ No newline at end of file +export default MT; -- Gitblit v1.9.1