mirror of
https://github.com/dataease/dataease.git
synced 2026-05-22 21:38:32 +08:00
fix: topBar头部现实lic错误信息
This commit is contained in:
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user