fix: web书籍部分图片加载失败

This commit is contained in:
Xwite
2023-04-16 20:13:45 +08:00
parent 3aafda8ac0
commit 20fc74078e
12 changed files with 61 additions and 63 deletions
+1 -5
View File
@@ -1,7 +1,7 @@
import { formatDate } from "@vueuse/shared";
export const isLegadoUrl = (/** @type {string} */ url) =>
/,\s*\s*\{/.test(url) ||
/,\s*\{/.test(url) ||
!(
url.startsWith("http") ||
url.startsWith("data:") ||
@@ -11,10 +11,6 @@ export const isLegadoUrl = (/** @type {string} */ url) =>
* @param {string} src
*/
export function getImageFromLegado(src) {
//返回阅读代理的图片链接 已经代理的或者dataurl返回传入值
if (!isLegadoUrl(src)) {
return src;
}
return (
(import.meta.env.VITE_API || location.origin) +
"/image?path=" +