登录接口
This commit is contained in:
@@ -43,7 +43,9 @@ export default {
|
||||
async loginApi () {
|
||||
try {
|
||||
let res = await loginApi(this.loginname, encrypt(this.password))
|
||||
this.$store.dispatch('userInfo', JSON.stringify(res))
|
||||
let obj = {}
|
||||
obj = Object.assign({}, res.user.user, {token: res.token})
|
||||
this.$store.dispatch('userInfo', JSON.stringify(obj))
|
||||
this.$router.push('/home')
|
||||
this.disabled = false
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user