|
@@ -11,11 +11,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}]);
|
|
}]);
|
|
|
app.factory('httpInterceptor', ['$window', '$q', function ($window, $q) {
|
|
app.factory('httpInterceptor', ['$window', '$q', function ($window, $q) {
|
|
|
var httpInterceptor = {
|
|
var httpInterceptor = {
|
|
|
- 'responseError': function (response) {
|
|
|
|
|
|
|
+ responseError: function (response) {
|
|
|
if (response.status == 401) {// UNAUTHORIZED
|
|
if (response.status == 401) {// UNAUTHORIZED
|
|
|
- // window.location.href = response.data.loginUrl || 'index';
|
|
|
|
|
// window.location.href = window.location.origin + window.location.pathname + '/login';
|
|
// window.location.href = window.location.origin + window.location.pathname + '/login';
|
|
|
- window.location.reload();
|
|
|
|
|
|
|
+ // window.location.reload();
|
|
|
|
|
+ window.location.href = response.data.loginUrl || 'index';
|
|
|
return $q.reject(response);
|
|
return $q.reject(response);
|
|
|
}
|
|
}
|
|
|
return $q.reject(response);
|
|
return $q.reject(response);
|