mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 23:05:46 +08:00
feat: 去掉浏览器路径中的 1panel
This commit is contained in:
parent
7abba4a02d
commit
207da61520
@ -71,7 +71,7 @@ export const routes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory('/1panel/'),
|
history: createWebHistory('/'),
|
||||||
routes: routes as RouteRecordRaw[],
|
routes: routes as RouteRecordRaw[],
|
||||||
strict: false,
|
strict: false,
|
||||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||||
|
@ -231,7 +231,7 @@ const onSavePort = async (formEl: FormInstance | undefined, key: string, val: an
|
|||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
let href = window.location.href;
|
let href = window.location.href;
|
||||||
let ip = href.split('//')[1].split(':')[0];
|
let ip = href.split('//')[1].split(':')[0];
|
||||||
window.open(`${href.split('//')[0]}//${ip}:${val}/1panel/login`, '_self');
|
window.open(`${href.split('//')[0]}//${ip}:${val}/login`, '_self');
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -239,7 +239,6 @@ const onSavePort = async (formEl: FormInstance | undefined, key: string, val: an
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleMFA = async () => {
|
const handleMFA = async () => {
|
||||||
console.log('dawdwda');
|
|
||||||
if (form.mfaStatus === 'enable') {
|
if (form.mfaStatus === 'enable') {
|
||||||
const res = await getMFA();
|
const res = await getMFA();
|
||||||
otp.secret = res.data.secret;
|
otp.secret = res.data.secret;
|
||||||
|
Loading…
Reference in New Issue
Block a user