mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🔧 完善链接识别
This commit is contained in:
@@ -103,11 +103,21 @@
|
|||||||
"windows": ["mhy_client"],
|
"windows": ["mhy_client"],
|
||||||
"enableTauriAPI": true
|
"enableTauriAPI": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"domain": "qaa.miyoushe.com",
|
||||||
|
"windows": ["mhy_client"],
|
||||||
|
"enableTauriAPI": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"domain": "webstatic.mihoyo.com",
|
"domain": "webstatic.mihoyo.com",
|
||||||
"windows": ["mhy_client"],
|
"windows": ["mhy_client"],
|
||||||
"enableTauriAPI": true
|
"enableTauriAPI": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"domain": "bbs.mihoyo.com",
|
||||||
|
"windows": ["mhy_client"],
|
||||||
|
"enableTauriAPI": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"domain": "api-takumi-record.mihoyo.com",
|
"domain": "api-takumi-record.mihoyo.com",
|
||||||
"windows": ["mhy_client"],
|
"windows": ["mhy_client"],
|
||||||
|
|||||||
@@ -259,6 +259,18 @@ watch(curSortLabel, async (newVal) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function toNav(path: string): Promise<void> {
|
async function toNav(path: string): Promise<void> {
|
||||||
|
const link = new URL(path);
|
||||||
|
const mysList = [
|
||||||
|
"https://act.mihoyo.com",
|
||||||
|
"https://webstatic.mihoyo.com",
|
||||||
|
"https://bbs.mihoyo.com",
|
||||||
|
"https://qaa.miyoushe.com",
|
||||||
|
];
|
||||||
|
// 如果不在上面的域名里面,就直接打开
|
||||||
|
if (!mysList.includes(link.origin)) {
|
||||||
|
window.open(path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// todo 记忆宽屏竖屏
|
// todo 记忆宽屏竖屏
|
||||||
const modeConfirm = await showConfirm({
|
const modeConfirm = await showConfirm({
|
||||||
title: "是否采用宽屏模式打开?",
|
title: "是否采用宽屏模式打开?",
|
||||||
|
|||||||
Reference in New Issue
Block a user