perf(X-Pack): 还原至社区版后重新登录

This commit is contained in:
fit2cloud-chenyw
2025-04-21 16:50:14 +08:00
committed by fit2cloud-chenyw
parent 0591c03ca4
commit dc090cb25d
5 changed files with 11 additions and 6 deletions

View File

@@ -2464,7 +2464,7 @@ export default {
Professional: 'Professional Edition',
Embedded: 'Embedded Edition',
support: 'Get technical support',
update_success: 'Update successful',
update_success: 'Update successful, please log in again',
serial_no: 'Serial number',
remark: 'Remark',
back_community: 'Revert to Community Edition',

View File

@@ -2394,7 +2394,7 @@ export default {
Professional: '專業版',
Embedded: '嵌入式版',
support: '取得技術支援',
update_success: '更新成功',
update_success: '更新成功,請重新登錄',
serial_no: '序號',
remark: '備註',
back_community: '還原至社區版',

View File

@@ -2400,7 +2400,7 @@ export default {
Professional: '专业版',
Embedded: '嵌入式版',
support: '获取技术支持',
update_success: '更新成功',
update_success: '更新成功,请重新登录',
serial_no: '序列号',
remark: '备注',
back_community: '还原至社区版',

View File

@@ -9,7 +9,8 @@ import { ElMessage, ElMessageBox } from 'element-plus-secondary'
import { useI18n } from '@/hooks/web/useI18n'
import { useEmitt } from '@/hooks/web/useEmitt'
import { useCache } from '@/hooks/web/useCache'
import { logoutApi } from '@/api/login'
import { logoutHandler } from '@/utils/logout'
const dialogVisible = ref(false)
const { wsCache } = useCache('localStorage')
const { t } = useI18n()
@@ -70,13 +71,17 @@ const back2Community = () => {
.then(() => {
revertApi().then(() => {
ElMessage.success(t('about.update_success'))
window.location.reload()
logout()
})
})
.catch(e => {
console.error(e)
})
}
const logout = async () => {
await logoutApi()
logoutHandler()
}
const getLicenseInfo = () => {
validateHandler({}, res => {
const info = getLicense(res.data)