登录加入验证码

This commit is contained in:
zhengjie
2019-06-10 16:55:16 +08:00
parent 66bec88af4
commit 963e854c71
3 changed files with 48 additions and 8 deletions

View File

@@ -30,9 +30,11 @@ const user = {
Login({ commit }, userInfo) {
const username = userInfo.username
const password = userInfo.password
const code = userInfo.code
const uuid = userInfo.uuid
const rememberMe = userInfo.rememberMe
return new Promise((resolve, reject) => {
login(username, password).then(res => {
login(username, password, code, uuid).then(res => {
setToken(res.token, rememberMe)
commit('SET_TOKEN', res.token)
setUserInfo(res.user, commit)