mirror of
https://github.com/gkd-kit/docs.git
synced 2024-11-16 04:22:20 +08:00
feat: add r=3 for redirect
This commit is contained in:
parent
c7e88aa73a
commit
bbcacf04ac
|
@ -4,7 +4,7 @@ import DefaultTheme from 'vitepress/theme';
|
||||||
import components from '../components';
|
import components from '../components';
|
||||||
import './custom.css';
|
import './custom.css';
|
||||||
|
|
||||||
// 兼容旧链接
|
// 兼容旧链接/短链重定向
|
||||||
if (!import.meta.env.SSR) {
|
if (!import.meta.env.SSR) {
|
||||||
const u = location.href.substring(location.origin.length);
|
const u = location.href.substring(location.origin.length);
|
||||||
if (location.pathname.startsWith('/selector/')) {
|
if (location.pathname.startsWith('/selector/')) {
|
||||||
|
@ -21,9 +21,10 @@ if (!import.meta.env.SSR) {
|
||||||
location.href = '/guide/snapshot#how-to-upload';
|
location.href = '/guide/snapshot#how-to-upload';
|
||||||
} else if (r === '2') {
|
} else if (r === '2') {
|
||||||
location.href = '/guide/faq#restriction';
|
location.href = '/guide/faq#restriction';
|
||||||
|
} else if (r === '3') {
|
||||||
|
location.href = '/guide/faq#adb_failed';
|
||||||
}
|
}
|
||||||
}
|
} else if (u === '/guide/faq#fail_setting_secure_settings') {
|
||||||
if (u === '/guide/faq#fail_setting_secure_settings') {
|
|
||||||
location.hash = 'adb_failed';
|
location.hash = 'adb_failed';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user