Commit 0b0ad5c8 authored by Morson's avatar Morson

修改登入提醒

parent f25f861e
...@@ -105,18 +105,10 @@ export default { ...@@ -105,18 +105,10 @@ export default {
if (res && util.getToken()) { if (res && util.getToken()) {
that.goBackPage() that.goBackPage()
} else { } else {
uni.showToast({
title: '授权失败,请重新授权',
icon: 'none'
});
this.setLoginStatus() this.setLoginStatus()
} }
}).catch(res => { }).catch(res => {
uni.hideLoading() uni.hideLoading()
uni.showToast({
title: res.message,
icon: 'none'
});
this.setLoginStatus() this.setLoginStatus()
}) })
}, },
...@@ -141,9 +133,13 @@ export default { ...@@ -141,9 +133,13 @@ export default {
return login.signup(params); return login.signup(params);
}).then(res => { }).then(res => {
uni.hideLoading() uni.hideLoading()
if (util.getToken()) { if (res && util.getToken()) {
that.goBackPage() that.goBackPage()
} else { } else {
uni.showToast({
title: '授权失败,请重新授权',
icon: 'none'
});
this.setLoginStatus(false) this.setLoginStatus(false)
} }
}).catch(res => { }).catch(res => {
......
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