闫增涛
2024-06-05 23ebc0d9ee7d4b06916478f84b411d0406f11a3a
src/assets/methods/resources.js
@@ -1,6 +1,22 @@
import config from "../js/config"
const getResourcePath = (md5) => {
  return  config.requestCtx + '/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
export default MT;