From 3405a42d4434bb77026c029ed20f2898ba665107 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 11 Jan 2018 09:25:50 +0800
Subject: [PATCH] 框架升级
---
src/app/core/net/default.interceptor.ts | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/app/core/net/default.interceptor.ts b/src/app/core/net/default.interceptor.ts
index 646fd59..7fa1f36 100644
--- a/src/app/core/net/default.interceptor.ts
+++ b/src/app/core/net/default.interceptor.ts
@@ -7,8 +7,7 @@
import { ErrorObservable } from 'rxjs/observable/ErrorObservable';
import { catchError } from 'rxjs/operators';
import { map, mergeMap } from 'rxjs/operators';
-
-import { environment } from '../../../environments/environment';
+import { environment } from '@env/environment';
/**
* ������HTTP������������������������������ `app.module.ts`
@@ -27,13 +26,12 @@
// TIPS������TOKEN��������������� `@delon/auth` ������
// Document: http://ng-alain.com/docs/auth
-
// ���������������������������
let url = req.url;
+
if (!url.startsWith('https://') && !url.startsWith('http://')) {
url = environment.SERVER_URL + url;
}
-
const newReq = req.clone({
url: url
});
--
Gitblit v1.8.0