diff --git a/pages/login/index.js b/pages/login/index.js index 3bec633..319c82a 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -142,11 +142,7 @@ Page({ storage.put('Authorization', result.data.token) app.globalData.token = result.data.token this.data.form.tmpAuthToken = result.data.tmpAuthToken - if(e.currentTarget.id == 'btn-login'){ - this.registAccount() - } else { - this.fetchUserInfo() - } + this.fetchUserInfo(result.data.token) }).catch(error => { if(error.data && error.data.tmpAuthToken){ this.data.form.tmpAuthToken = error.data.tmpAuthToken