Commit e9ece060 by Chao Sun

判断寿险登录

parent 046a3931
...@@ -50,6 +50,7 @@ export class LoginComponent implements OnInit, OnDestroy { ...@@ -50,6 +50,7 @@ export class LoginComponent implements OnInit, OnDestroy {
this.authService.isLoggedIn = true; this.authService.isLoggedIn = true;
const lifeCustomerInfo = { ...response.data, mobileNo: this.userInfo.mobileNo, commonResult: null }; const lifeCustomerInfo = { ...response.data, mobileNo: this.userInfo.mobileNo, commonResult: null };
if (lifeCustomerInfo['customerId'] && lifeCustomerInfo['practitionerId']) { if (lifeCustomerInfo['customerId'] && lifeCustomerInfo['practitionerId']) {
if (response['data']['practitionerTypeId'] == 28) {
localStorage.setItem('lifeCustomerInfo', JSON.stringify(lifeCustomerInfo)); localStorage.setItem('lifeCustomerInfo', JSON.stringify(lifeCustomerInfo));
//如果有openId跳页由后端判断,没有的话根据登录次数前端判断跳页 //如果有openId跳页由后端判断,没有的话根据登录次数前端判断跳页
if (response['data']['getOpenIdUrl']) { if (response['data']['getOpenIdUrl']) {
...@@ -74,23 +75,11 @@ export class LoginComponent implements OnInit, OnDestroy { ...@@ -74,23 +75,11 @@ export class LoginComponent implements OnInit, OnDestroy {
this.router.navigateByUrl(this.redirect); this.router.navigateByUrl(this.redirect);
} }
} }
// if (response['data']['loginTimes'] > 0) { } else {
// this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my'; this.openPopInfo('仅供寿险经纪人登录!');
// this.router.navigateByUrl(this.redirect); return;
// // if (response['data']['getOpenIdUrl']) { }
// // window.location.href = response['data']['getOpenIdUrl'];
// // } else {
// // this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
// // this.router.navigateByUrl(this.redirect);
// // }
// } else {
// this.router.navigateByUrl('/thanks')
// // if (response['data']['getOpenIdUrl']) {
// // window.location.href = response['data']['getOpenIdUrl'];
// // } else {
// // this.router.navigateByUrl('/thanks')
// // }
// }
} else { } else {
this.openPopInfo('暂无查询资格'); this.openPopInfo('暂无查询资格');
} }
......
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