|
@@ -84,14 +84,14 @@ const actions = {
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
console.log(response)
|
|
console.log(response)
|
|
|
// const { data } = response
|
|
// const { data } = response
|
|
|
-
|
|
|
|
|
- // if (!data) {
|
|
|
|
|
- // reject('验证失败,请重新登录。')
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ const data = response[0][0]
|
|
|
|
|
+ if (!data) {
|
|
|
|
|
+ reject('验证失败,请重新登录。')
|
|
|
|
|
+ }
|
|
|
// console.log(response)
|
|
// console.log(response)
|
|
|
- // commit('SET_USERINFO', response.data)
|
|
|
|
|
- // resolve(data)
|
|
|
|
|
- resolve()
|
|
|
|
|
|
|
+ commit('SET_USERINFO', data)
|
|
|
|
|
+ resolve(data)
|
|
|
|
|
+ // resolve()
|
|
|
})
|
|
})
|
|
|
.catch(error => {
|
|
.catch(error => {
|
|
|
reject(error)
|
|
reject(error)
|