mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-18 22:22:59 +08:00
fix: 修改登录页跳转问题 (#4487)
This commit is contained in:
parent
9edafc13a3
commit
62bead5c50
@ -1489,6 +1489,7 @@ const message = {
|
||||
},
|
||||
license: {
|
||||
community: 'Community Edition: ',
|
||||
community2: 'Community Edition',
|
||||
pro: 'Professional Edition: ',
|
||||
trial: 'Trial Edition',
|
||||
office: 'Official Edition',
|
||||
@ -1514,6 +1515,7 @@ const message = {
|
||||
advice: 'Consultation',
|
||||
indefinitePeriod: 'Indefinite Period',
|
||||
levelUpPro: 'Upgrade to Professional Edition',
|
||||
licenseSync: 'License Sync',
|
||||
knowMorePro: 'Learn More',
|
||||
closeAlert: 'The current page can be closed in the panel settings',
|
||||
introduce: 'Feature Introduction',
|
||||
|
@ -1388,6 +1388,7 @@ const message = {
|
||||
},
|
||||
license: {
|
||||
community: '社區版:',
|
||||
community2: '社區版',
|
||||
pro: '專業版:',
|
||||
trial: '試用版',
|
||||
office: '正式版',
|
||||
@ -1412,6 +1413,7 @@ const message = {
|
||||
advice: '諮詢',
|
||||
indefinitePeriod: '無限期',
|
||||
levelUpPro: '升級專業版',
|
||||
licenseSync: '許可證同步',
|
||||
knowMorePro: '了解更多',
|
||||
closeAlert: '當前頁面可在面板設置中關閉顯示',
|
||||
introduce: '功能介紹',
|
||||
|
@ -1389,6 +1389,7 @@ const message = {
|
||||
},
|
||||
license: {
|
||||
community: '社区版:',
|
||||
community2: '社区版',
|
||||
pro: '专业版:',
|
||||
trial: '试用版',
|
||||
office: '正式版',
|
||||
@ -1413,6 +1414,7 @@ const message = {
|
||||
advice: '咨询',
|
||||
indefinitePeriod: '无限期',
|
||||
levelUpPro: '升级专业版',
|
||||
licenseSync: '许可证同步',
|
||||
knowMorePro: '了解更多',
|
||||
closeAlert: '当前页面可在面板设置中关闭显示',
|
||||
introduce: '功能介绍',
|
||||
|
@ -13,7 +13,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (to.name !== 'entrance' && !globalStore.isLogin) {
|
||||
next({
|
||||
name: 'entrance',
|
||||
params: { code: globalStore.entrance },
|
||||
params: to.params,
|
||||
});
|
||||
NProgress.done();
|
||||
return;
|
||||
|
@ -32,7 +32,7 @@ const screenWidth = ref(null);
|
||||
const getStatus = async () => {
|
||||
const res = await checkIsSafety(globalStore.entrance);
|
||||
if (res.data === 'unpass') {
|
||||
router.replace({ name: 'entrance', params: { code: 0 } });
|
||||
router.replace({ name: 'entrance', params: { code: globalStore.entrance } });
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
<template #main>
|
||||
<el-row :gutter="20" class="mt-5; mb-10">
|
||||
<el-col :xs="24" :sm="24" :md="15" :lg="15" :xl="15">
|
||||
<div class="descriptions" v-if="hasLicense()">
|
||||
<div class="descriptions" v-if="hasLicense">
|
||||
<el-descriptions :column="1" direction="horizontal" size="large" border>
|
||||
<el-descriptions-item :label="$t('license.authorizationId')">
|
||||
{{ license.licenseName || '-' }}
|
||||
@ -48,7 +48,7 @@
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<CardWithHeader :header="$t('home.overview')" height="160px" v-if="!hasLicense()">
|
||||
<CardWithHeader :header="$t('home.overview')" height="160px" v-if="!hasLicense">
|
||||
<template #body>
|
||||
<div class="h-app-card">
|
||||
<el-row>
|
||||
@ -56,7 +56,7 @@
|
||||
<span>{{ $t('setting.license') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<span>{{ $t('license.community') }}</span>
|
||||
<span>{{ $t('license.community2') }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -113,6 +113,7 @@ import { GlobalStore } from '@/store';
|
||||
const loading = ref();
|
||||
const licenseRef = ref();
|
||||
const globalStore = GlobalStore();
|
||||
const hasLicense = ref();
|
||||
|
||||
const license = reactive({
|
||||
licenseName: '',
|
||||
@ -165,9 +166,11 @@ const search = async () => {
|
||||
license.status = res.data.status;
|
||||
globalStore.isProductPro =
|
||||
res.data.status === 'Enable' || res.data.status === 'Lost01' || res.data.status === 'Lost02';
|
||||
if (!globalStore.isProductPro || res.data.status === 'Lost03') {
|
||||
if (res.data.status === '') {
|
||||
hasLicense.value = false;
|
||||
return;
|
||||
}
|
||||
hasLicense.value = true;
|
||||
if (globalStore.isProductPro) {
|
||||
globalStore.productProExpires = Number(res.data.productPro);
|
||||
}
|
||||
@ -187,10 +190,6 @@ const search = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
const hasLicense = () => {
|
||||
return globalStore.isProductPro;
|
||||
};
|
||||
|
||||
const showSync = () => {
|
||||
return license.status.indexOf('Lost') !== -1 || license.status === 'Disable';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user