feat: 更新重定向路径,将 '/root/home/' 修改为 '/root/center/'

This commit is contained in:
xiongxiao
2026-03-19 16:49:37 +08:00
committed by cnb
parent 07efc4e468
commit 2000b474a0
3 changed files with 4 additions and 4 deletions

View File

@@ -10,11 +10,11 @@ import { getUserConfig } from '@/modules/fm-manager/index.ts';
export const rediretHome = async (req: http.IncomingMessage, res: http.ServerResponse) => { export const rediretHome = async (req: http.IncomingMessage, res: http.ServerResponse) => {
const user = await getLoginUser(req); const user = await getLoginUser(req);
if (!user?.token) { if (!user?.token) {
res.writeHead(302, { Location: '/root/home/' }); res.writeHead(302, { Location: '/root/center/' });
res.end(); res.end();
return; return;
} }
let redirectURL = '/root/home/'; let redirectURL = '/root/center/';
try { try {
const token = user.token; const token = user.token;
const resConfig = await getUserConfig(token); const resConfig = await getUserConfig(token);

View File

@@ -28,7 +28,7 @@ export const defaultKeys = [
{ {
key: 'user.json', key: 'user.json',
description: '用户配置', description: '用户配置',
data: { key: 'user', version: '1.0.0', redirectURL: '/root/home/' }, data: { key: 'user', version: '1.0.0', redirectURL: '/root/center/' },
}, },
{ {
key: 'life.json', key: 'life.json',

View File

@@ -48,7 +48,7 @@ app
<script> <script>
const redirect = new URL('${reqUrl}', window.location.origin); const redirect = new URL('${reqUrl}', window.location.origin);
const encodeRedirect = encodeURIComponent(redirect.toString()); const encodeRedirect = encodeURIComponent(redirect.toString());
const toPage = new URL('/root/home/?user-check=true&redirect='+encodeRedirect, window.location.origin); const toPage = new URL('/root/center/login/?user-check=true&redirect='+encodeRedirect, window.location.origin);
setTimeout(() => { setTimeout(() => {
window.location.href = toPage.toString(); window.location.href = toPage.toString();
}, 1000); }, 1000);