|
@@ -74,6 +74,7 @@ var loginPage = new Vue({
|
|
|
}else {
|
|
|
clearTimeout(timer); //清理定时任务
|
|
|
if(response.code == 0){
|
|
|
+ var _userIdentity = response.data.userIdentity;
|
|
|
_self.userData = {
|
|
|
account: response.data.account,
|
|
|
email: response.data.email,
|
|
@@ -89,6 +90,17 @@ var loginPage = new Vue({
|
|
|
token: response.data.token
|
|
|
};
|
|
|
_self.setStorages( _self.userData);
|
|
|
+ // 登录成功页面跳转
|
|
|
+ var beforePath = localStorage.getItem("loginBeforePath");
|
|
|
+ if(_userIdentity == 4 || _userIdentity ==2){
|
|
|
+ window.location.href = '/user/dashboard.html';
|
|
|
+ }else if(_userIdentity == 3){
|
|
|
+ window.location.href = '/supplier/dashboard.html';
|
|
|
+ }else if (beforePath) {
|
|
|
+ window.location.href = beforePath;
|
|
|
+ }else {
|
|
|
+ window.location.href = '/index.html';
|
|
|
+ }
|
|
|
}else if(response.code == -4){
|
|
|
window.location.href = 'binding.html';
|
|
|
}
|