feat: uniapp 适配aj-captcha

This commit is contained in:
xingyu4j
2022-08-06 00:57:46 +08:00
parent af2b1eb25f
commit baf5d87d32
13 changed files with 1896 additions and 201 deletions

View File

@ -42,10 +42,9 @@ const user = {
Login({ commit }, userInfo) {
const username = userInfo.username.trim()
const password = userInfo.password
const code = userInfo.code
const uuid = userInfo.uuid
const captchaVerification = userInfo.captchaVerification
return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => {
login(username, password, captchaVerification).then(res => {
res = res.data;
// 设置 token
setToken(res)
@ -83,7 +82,6 @@ const user = {
LogOut({ commit, state }) {
return new Promise((resolve, reject) => {
logout(state.token).then(() => {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
removeToken()