Commit 396df4f2 authored by peco's avatar peco

fix : 登录判断返回状态

parent 553e7aed
...@@ -85,12 +85,12 @@ export default { ...@@ -85,12 +85,12 @@ export default {
} }
} }
let res = await info.url let res = await info.url
const { Status, Result } = res.data
if (Status === 'true') {
this.$u.vuex('vuex_token', `${res.token_type} ${res.access_token}`) this.$u.vuex('vuex_token', `${res.token_type} ${res.access_token}`)
this.$u.toast(info.msg) this.$u.toast(info.msg)
this.removeUserStorage() this.removeUserStorage()
this.saveUserStorage(res.data.Result) this.saveUserStorage(res.data.Result)
// 登录成功后返回来源页面 // 登录成功后返回来源页面
let timer = setTimeout(() => { let timer = setTimeout(() => {
const backUrl = uni.getStorageSync('back_url') || '/pages/index/index' const backUrl = uni.getStorageSync('back_url') || '/pages/index/index'
...@@ -100,6 +100,9 @@ export default { ...@@ -100,6 +100,9 @@ export default {
}) })
clearTimeout(timer) clearTimeout(timer)
}, 500) }, 500)
} else {
this.$u.toast(res.data.Msg)
}
} else { } else {
console.log('验证失败'); console.log('验证失败');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment