ecinc-cloud-mappaio 9.7.48 → 9.7.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/ecmappaio.common.js
CHANGED
|
@@ -57840,19 +57840,19 @@ service.interceptors.response.use(function (response) {
|
|
|
57840
57840
|
var $scope = window.$wapp || window.$mapp;
|
|
57841
57841
|
if ($scope && $scope.customErrorHander) {
|
|
57842
57842
|
$scope.customErrorHander(error);
|
|
57843
|
-
} else if (error.response && error.response.status === 401 && location.href.toLowerCase().indexOf('login') === -1 && error.config.url.indexOf('http:') === -1 && error.config.url.indexOf('https:') === -1) {
|
|
57843
|
+
} else if (error.response && (error.response.status === 401 || error.response.data && error.response.data.status === 401) && location.href.toLowerCase().indexOf('login') === -1 && error.config.url.indexOf('http:') === -1 && error.config.url.indexOf('https:') === -1) {
|
|
57844
57844
|
store/* default */.A.dispatch('user/resetToken').then(function () {
|
|
57845
57845
|
var errmsg = window.$tx('request.status401');
|
|
57846
57846
|
if (error.response.data && error.response.data.message) {
|
|
57847
57847
|
errmsg = error.response.data.message;
|
|
57848
57848
|
}
|
|
57849
57849
|
var ignoreUrls = ['login', 'getUserRolePermissions', 'getUiStyleConfig', 'queryUiFontSize', 'homepage/allm', 'getLastMsgCount', 'mpp/h5app/querydata'];
|
|
57850
|
-
if (
|
|
57850
|
+
if (window.sessionTimeoutHandler) {
|
|
57851
|
+
window.sessionTimeoutHandler(error);
|
|
57852
|
+
} else if (!ignoreUrls.some(function (u) {
|
|
57851
57853
|
return error.config.url.toLowerCase().indexOf(u.toLowerCase()) !== -1;
|
|
57852
57854
|
})) {
|
|
57853
|
-
if (window.
|
|
57854
|
-
window.sessionTimeoutHandler(error);
|
|
57855
|
-
} else if (window.vType === 'wapp') {
|
|
57855
|
+
if (window.vType === 'wapp') {
|
|
57856
57856
|
//认证会话已过期,请重新登录。
|
|
57857
57857
|
window.$alert(errmsg, window.$tx('common.operationTip'), {
|
|
57858
57858
|
type: 'error',
|
package/lib/ecmappaio.umd.js
CHANGED
|
@@ -57858,19 +57858,19 @@ service.interceptors.response.use(function (response) {
|
|
|
57858
57858
|
var $scope = window.$wapp || window.$mapp;
|
|
57859
57859
|
if ($scope && $scope.customErrorHander) {
|
|
57860
57860
|
$scope.customErrorHander(error);
|
|
57861
|
-
} else if (error.response && error.response.status === 401 && location.href.toLowerCase().indexOf('login') === -1 && error.config.url.indexOf('http:') === -1 && error.config.url.indexOf('https:') === -1) {
|
|
57861
|
+
} else if (error.response && (error.response.status === 401 || error.response.data && error.response.data.status === 401) && location.href.toLowerCase().indexOf('login') === -1 && error.config.url.indexOf('http:') === -1 && error.config.url.indexOf('https:') === -1) {
|
|
57862
57862
|
store/* default */.A.dispatch('user/resetToken').then(function () {
|
|
57863
57863
|
var errmsg = window.$tx('request.status401');
|
|
57864
57864
|
if (error.response.data && error.response.data.message) {
|
|
57865
57865
|
errmsg = error.response.data.message;
|
|
57866
57866
|
}
|
|
57867
57867
|
var ignoreUrls = ['login', 'getUserRolePermissions', 'getUiStyleConfig', 'queryUiFontSize', 'homepage/allm', 'getLastMsgCount', 'mpp/h5app/querydata'];
|
|
57868
|
-
if (
|
|
57868
|
+
if (window.sessionTimeoutHandler) {
|
|
57869
|
+
window.sessionTimeoutHandler(error);
|
|
57870
|
+
} else if (!ignoreUrls.some(function (u) {
|
|
57869
57871
|
return error.config.url.toLowerCase().indexOf(u.toLowerCase()) !== -1;
|
|
57870
57872
|
})) {
|
|
57871
|
-
if (window.
|
|
57872
|
-
window.sessionTimeoutHandler(error);
|
|
57873
|
-
} else if (window.vType === 'wapp') {
|
|
57873
|
+
if (window.vType === 'wapp') {
|
|
57874
57874
|
//认证会话已过期,请重新登录。
|
|
57875
57875
|
window.$alert(errmsg, window.$tx('common.operationTip'), {
|
|
57876
57876
|
type: 'error',
|