mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-08 01:20:07 +08:00
fix: 解决 ssl 启用和端口修改跳转问题 (#1030)
This commit is contained in:
parent
43652b2a54
commit
2ae1db4730
@ -31,6 +31,8 @@ import { MsgSuccess } from '@/utils/message';
|
|||||||
import { updatePort } from '@/api/modules/setting';
|
import { updatePort } from '@/api/modules/setting';
|
||||||
import { ElMessageBox, FormInstance } from 'element-plus';
|
import { ElMessageBox, FormInstance } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
|
import { GlobalStore } from '@/store';
|
||||||
|
const globalStore = GlobalStore();
|
||||||
|
|
||||||
interface DialogProps {
|
interface DialogProps {
|
||||||
serverPort: number;
|
serverPort: number;
|
||||||
@ -66,9 +68,10 @@ const onSavePort = async (formEl: FormInstance | undefined) => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
|
globalStore.isLogin = false;
|
||||||
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}:${form.serverPort}/`, '_self');
|
window.open(`${href.split('//')[0]}//${ip}:${form.serverPort}/${globalStore.entrance}`, '_self');
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
@ -112,6 +112,8 @@ import { DownloadByPath } from '@/api/modules/files';
|
|||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { ElMessageBox, FormInstance } from 'element-plus';
|
import { ElMessageBox, FormInstance } from 'element-plus';
|
||||||
import { Setting } from '@/api/interface/setting';
|
import { Setting } from '@/api/interface/setting';
|
||||||
|
import { GlobalStore } from '@/store';
|
||||||
|
const globalStore = GlobalStore();
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const drawerVisiable = ref();
|
const drawerVisiable = ref();
|
||||||
@ -207,8 +209,10 @@ const onSaveSSL = async (formEl: FormInstance | undefined) => {
|
|||||||
await updateSSL(param).then(() => {
|
await updateSSL(param).then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
let href = window.location.href;
|
let href = window.location.href;
|
||||||
|
globalStore.isLogin = false;
|
||||||
let address = href.split('://')[1];
|
let address = href.split('://')[1];
|
||||||
window.open(`https://${address}/`, '_self');
|
address = address.replaceAll('settings/safe', globalStore.entrance);
|
||||||
|
window.open(`https://${address}`, '_self');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user