增加jwt主动失效功能(next:多点登录限制

This commit is contained in:
pixel
2019-12-28 18:32:47 +08:00
parent 22820d9983
commit 7e3870490f
11 changed files with 114 additions and 10 deletions
+7
View File
@@ -1,4 +1,5 @@
import { login } from '@/api/user'
import { jsonInBlacklist } from '@/api/jwt'
import router from '@/router/index'
export const user = {
namespaced: true,
@@ -52,6 +53,12 @@ export const user = {
router.push({ path: '/layout/dashbord' })
}
}
},
async LoginOut({ commit }) {
const res = await jsonInBlacklist()
if (res.success) {
commit("LoginOut")
}
}
},
getters: {