From 833bffba4f063489870d4165375ccf843bbd0c57 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Thu, 14 Dec 2023 00:32:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E5=BE=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *侧边栏酒馆 → 帖子 *完善对于 protocol 的判断 --- src/components/app/t-sidebar.vue | 2 +- src/utils/linkParser.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/app/t-sidebar.vue b/src/components/app/t-sidebar.vue index 84c4fa11..9007335c 100644 --- a/src/components/app/t-sidebar.vue +++ b/src/components/app/t-sidebar.vue @@ -30,7 +30,7 @@ mihoyo - + diff --git a/src/utils/linkParser.ts b/src/utils/linkParser.ts index 9f1abf8f..0c700629 100644 --- a/src/utils/linkParser.ts +++ b/src/utils/linkParser.ts @@ -10,6 +10,7 @@ import showConfirm from "../components/func/confirm"; /** * @function parseLink + * @since Beta v0.3.8 * @description 处理链接 * @param {string} link - 链接 * @param {boolean} useInner - 是否采用内置 JSBridge 打开 @@ -19,9 +20,8 @@ export async function parseLink( link: string, useInner: boolean = false, ): Promise { - console.warn("parseLink", link); const url = new URL(link); - if (url.protocol !== "https:") { + if (url.protocol !== "https:" && url.protocol !== "http:") { if (url.protocol === "mihoyobbs:") { if (url.pathname.startsWith("//article/")) { const postId = url.pathname.split("/").pop();