袁野 7 months ago
parent 1613c5ea2b
commit 9dce39875e
  1. 4
      src/app/utils/Interceptor.service.ts

@ -6,15 +6,15 @@ import {catchError, finalize} from 'rxjs/operators';
import {mergeMap} from 'rxjs/operators'; import {mergeMap} from 'rxjs/operators';
import {Observable} from 'rxjs'; import {Observable} from 'rxjs';
import {NzMessageService} from "ng-zorro-antd/message"; import {NzMessageService} from "ng-zorro-antd/message";
import {LocalStorageService} from "./localStorage.service";
import {USER_TOKEN} from "../data/login/localStorage.namespace"; import {USER_TOKEN} from "../data/login/localStorage.namespace";
import {BrowserStorageService} from "./localStorage.service";
@Injectable() @Injectable()
export class InterceptorService implements HttpInterceptor { export class InterceptorService implements HttpInterceptor {
constructor( constructor(
private message: NzMessageService, private message: NzMessageService,
private storage: LocalStorageService, private storage: BrowserStorageService,
) { ) {
} }
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {

Loading…
Cancel
Save