🎨 微改

*侧边栏酒馆 → 帖子
*完善对于 protocol 的判断
This commit is contained in:
BTMuli
2023-12-14 00:32:03 +08:00
parent cc73997da0
commit 833bffba4f
2 changed files with 3 additions and 3 deletions

View File

@@ -30,7 +30,7 @@
<img src="/platforms/mhy/mys.webp" alt="mihoyo" class="side-icon" />
</template>
</v-list-item>
<v-list-item title="酒馆" value="posts" :link="true" href="/posts">
<v-list-item title="帖子" value="posts" :link="true" href="/posts">
<template #prepend>
<img src="/source/UI/posts.png" alt="posts" class="side-icon" />
</template>

View File

@@ -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<boolean | string> {
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();