From 422f79125a3bdccc1e6444c8624451d0decb3dc6 Mon Sep 17 00:00:00 2001 From: litian <2804272236@qq.com> Date: 星期三, 01 一月 2025 18:06:19 +0800 Subject: [PATCH] 测试 --- 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