From 94685c44c1712508e0a2b3ac2613f50daf64e7d3 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 17 六月 2024 19:24:17 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout

---
 src/assets/methods/resources.js |   37 ++++++++++++++++++++-----------------
 1 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/src/assets/methods/resources.js b/src/assets/methods/resources.js
index 83b3237..bd860ff 100644
--- a/src/assets/methods/resources.js
+++ b/src/assets/methods/resources.js
@@ -1,19 +1,22 @@
-import fileApi from '@/assets/js/middleGround/api/file'
-export const getResourcePath = (md5,appRefCode = "jingshieke") => {
-  fileApi.getAliVod({
-    md5,appRefCode
-  }).then(res => {
-    console.log('path',res);
-    if(res.data) {
-      return res.data
-    } else {
-      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
-}
+  getResourcePath,
+};
 
-export default MT
\ No newline at end of file
+export default MT;

--
Gitblit v1.9.1