fix: 修改 License 状态判断 (#4309)

This commit is contained in:
ssongliu 2024-03-26 14:08:07 +08:00 committed by GitHub
parent aa93a6d373
commit 8d88ed812c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -75,7 +75,8 @@ const loadDataFromDB = async () => {
const loadProductProFromDB = async () => {
const res = await getLicense();
globalStore.isProductPro = res.data.status === 'Enable';
globalStore.isProductPro =
res.data.status === 'Enable' || res.data.status === 'Lost01' || res.data.status === 'Lost02';
};
const updateDarkMode = async (event: MediaQueryListEvent) => {

View File

@ -163,10 +163,12 @@ const search = async () => {
.then((res) => {
loading.value = false;
license.status = res.data.status;
globalStore.isProductPro = res.data.status === 'Enable';
if (res.data.status !== 'Enable') {
globalStore.isProductPro =
res.data.status === 'Enable' || res.data.status === 'Lost01' || res.data.status === 'Lost02';
if (!globalStore.isProductPro || res.data.status === 'Lost03') {
return;
}
console.log('csdcasd');
license.licenseName = res.data.licenseName;
license.assigneeName = res.data.assigneeName;
license.trial = res.data.trial;
@ -184,7 +186,7 @@ const search = async () => {
};
const hasLicense = () => {
return license.status === 'Enable';
return globalStore.isProductPro;
};
const showSync = () => {