From 8d88ed812c2d3bc4a01829073c7f5e0f9de80504 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 26 Mar 2024 14:08:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20License=20=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=88=A4=E6=96=AD=20(#4309)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layout/index.vue | 3 ++- frontend/src/views/setting/license/index.vue | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/layout/index.vue b/frontend/src/layout/index.vue index 36e8e4188..a9511046f 100644 --- a/frontend/src/layout/index.vue +++ b/frontend/src/layout/index.vue @@ -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) => { diff --git a/frontend/src/views/setting/license/index.vue b/frontend/src/views/setting/license/index.vue index 366d0cca7..7dd635ae0 100644 --- a/frontend/src/views/setting/license/index.vue +++ b/frontend/src/views/setting/license/index.vue @@ -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 = () => {