mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🎨 微改
*侧边栏酒馆 → 帖子 *完善对于 protocol 的判断
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user