src/app/core/net/default.interceptor.ts | ●●●●● patch | view | raw | blame | history |
src/app/core/net/default.interceptor.ts
@@ -14,6 +14,7 @@ import { Subject } from 'rxjs/Subject'; import { error } from 'protractor'; import { debug } from 'util'; import {Location} from '@angular/common'; /** * 默认HTTP拦截器,其注册细节见 `app.module.ts` @@ -68,7 +69,9 @@ break; case 401: // 未登录状态码 // this.goTo('/passport/login'); this.unLoginHandle.next(<HttpErrorResponse>event); if (location.hash && !location.hash.endsWith('login')) { this.unLoginHandle.next(<HttpErrorResponse>event); } break; case 403: case 404: