From 0de743f6fd8cb64b67c9f0c3279769d60c53b09d Mon Sep 17 00:00:00 2001
From: litian <2804272236@qq.com>
Date: 星期三, 22 一月 2025 16:37:39 +0800
Subject: [PATCH] tuoyujigou

---
 src/assets/methods/resources.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/assets/methods/resources.js b/src/assets/methods/resources.js
index 74e4315..17a5fbb 100644
--- a/src/assets/methods/resources.js
+++ b/src/assets/methods/resources.js
@@ -1,5 +1,6 @@
 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 = "jingshieke") => {
   let path = "";
   await fileApi
@@ -8,8 +9,8 @@
       appRefCode,
     })
     .then((res) => {
-      if (res?.data != "" && res?.data != undefined) {
-        path = res.data;
+      if (res != "" && res != undefined) {
+        path = res;
       } else {
         path = process.env.VUE_APP_API_URL + "/file/api/ApiDownload?md5=" + md5;
       }
@@ -18,6 +19,7 @@
 };
 // 鑾峰彇鏀惰棌鐨勮祫婧�
 export const getCollectResource = async (key) => {
+  if(!localStorage.getItem(tokenKey)) return []
   let list = []
   await identityApi
   .getUserKey({

--
Gitblit v1.9.1