From f8078b0196beaeeeee1539ee5458734c985b7ee3 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 18 May 2021 14:33:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20topBar=E5=A4=B4=E9=83=A8=E7=8E=B0?= =?UTF-8?q?=E5=AE=9Elic=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layout/components/Licbar.vue | 5 ++++- frontend/src/store/getters.js | 1 + frontend/src/store/modules/lic.js | 8 +++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/layout/components/Licbar.vue b/frontend/src/layout/components/Licbar.vue index 66575df2fe..4cc2b023d1 100644 --- a/frontend/src/layout/components/Licbar.vue +++ b/frontend/src/layout/components/Licbar.vue @@ -1,6 +1,6 @@ @@ -22,6 +22,9 @@ export default { }, licstatus() { return this.$store.state.lic.validate + }, + licMsg() { + return this.$store.state.lic.licMsg } }, diff --git a/frontend/src/store/getters.js b/frontend/src/store/getters.js index c3159803c6..e7030857aa 100644 --- a/frontend/src/store/getters.js +++ b/frontend/src/store/getters.js @@ -23,6 +23,7 @@ const getters = { dialogWidgetMap: state => state.application.dialogWidgetMap, drawWidgetMap: state => state.application.drawWidgetMap, validate: state => state.lic.validate, + licMsg: state => state.lic.licMsg, uiInfo: state => state.user.uiInfo } export default getters diff --git a/frontend/src/store/modules/lic.js b/frontend/src/store/modules/lic.js index bce435be97..64f5ee8254 100644 --- a/frontend/src/store/modules/lic.js +++ b/frontend/src/store/modules/lic.js @@ -1,11 +1,15 @@ import { validateLic } from '@/api/system/lic' const state = { - validate: true + validate: true, + licMsg: null } const mutations = { SET_VALIDATE: (state, data) => { state.validate = data + }, + SET_LIC_MSG: (state, msg) => { + state.licMsg = msg } } @@ -19,9 +23,11 @@ const actions = { validateLic().then(response => { const { data } = response commit('SET_VALIDATE', true) + commit('SET_LIC_MSG', null) resolve(data) }).catch(error => { commit('SET_VALIDATE', false) + commit('SET_LIC_MSG', error.response.data.message) reject(error) }) })