|
@@ -50,23 +50,23 @@ function tryHideFullScreenLoading() {
|
|
|
|
|
|
// request interceptor
|
|
|
service.interceptors.request.use(
|
|
|
- (config) => {
|
|
|
- if (window.location.hash !== "#/dashboard") {
|
|
|
- showFullScreenLoading();
|
|
|
- }
|
|
|
- const token = localStorage.getItem("token");
|
|
|
- token && (config.headers.Authorization = token);
|
|
|
- // token && (config.headers.token = token);
|
|
|
- return config;
|
|
|
- },
|
|
|
- (error) => {
|
|
|
- if (window.location.hash !== "#/dashboard") {
|
|
|
- tryHideFullScreenLoading();
|
|
|
- }
|
|
|
- // do something with request error
|
|
|
- console.log(error); // for debug
|
|
|
- return Promise.reject(error);
|
|
|
+ (config) => {
|
|
|
+ if (window.location.hash !== "#/dashboard"&&window.location.hash !=='#/streamRadio/index') {
|
|
|
+ showFullScreenLoading();
|
|
|
+ }
|
|
|
+ const token = localStorage.getItem("token");
|
|
|
+ token && (config.headers.Authorization = token);
|
|
|
+ // token && (config.headers.token = token);
|
|
|
+ return config;
|
|
|
+ },
|
|
|
+ (error) => {
|
|
|
+ if (window.location.hash !== "#/dashboard") {
|
|
|
+ tryHideFullScreenLoading();
|
|
|
}
|
|
|
+ // do something with request error
|
|
|
+ console.log(error); // for debug
|
|
|
+ return Promise.reject(error);
|
|
|
+ }
|
|
|
);
|
|
|
|
|
|
// response interceptor
|
|
@@ -170,4 +170,4 @@ service.interceptors.response.use(
|
|
|
}
|
|
|
);
|
|
|
|
|
|
-export default service;
|
|
|
+export default service;
|