ecinc-cloud-mappaio 9.0.57 → 9.0.58

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.
@@ -38341,6 +38341,8 @@ service.interceptors.request.use(function (config) {
38341
38341
  domain = domain.substring(0, domain.length - 1);
38342
38342
  }
38343
38343
  config.headers['apigw'] = domain + "/apigw";
38344
+ } else if (window.productCode && location.href.indexOf('productCode') === -1) {
38345
+ config.headers['productCode'] = window.productCode;
38344
38346
  }
38345
38347
  return config;
38346
38348
  }, function (error) {
@@ -38352,8 +38354,7 @@ service.interceptors.request.use(function (config) {
38352
38354
  service.interceptors.response.use(function (response) {
38353
38355
  return response.data;
38354
38356
  }, function (error) {
38355
- var token = window.$auth.getToken();
38356
- if (token && error.response && error.response.status === 401 && location.href.toLowerCase().indexOf('login') === -1 && error.config.url.indexOf('http:') === -1 && error.config.url.indexOf('https:') === -1) {
38357
+ 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) {
38357
38358
  store["a" /* default */].dispatch('user/resetToken').then(function () {
38358
38359
  if (window.vType === 'wapp') {
38359
38360
  window.$alert('认证会话已过期,请重新登录。', '操作提示', {
@@ -38389,7 +38390,11 @@ service.interceptors.response.use(function (response) {
38389
38390
  if (location.href.indexOf('#') !== -1 && location.href.indexOf('login') === -1) {
38390
38391
  redirect += '?redirect=' + location.href.split('#')[1];
38391
38392
  }
38392
- window.location = '#/login' + redirect;
38393
+ if (window.flutter_inappwebview) {
38394
+ window.location = '#/loginFail';
38395
+ } else {
38396
+ window.location = '#/login' + redirect;
38397
+ }
38393
38398
  window.location.reload();
38394
38399
  } else {
38395
38400
  window.close();
@@ -38350,6 +38350,8 @@ service.interceptors.request.use(function (config) {
38350
38350
  domain = domain.substring(0, domain.length - 1);
38351
38351
  }
38352
38352
  config.headers['apigw'] = domain + "/apigw";
38353
+ } else if (window.productCode && location.href.indexOf('productCode') === -1) {
38354
+ config.headers['productCode'] = window.productCode;
38353
38355
  }
38354
38356
  return config;
38355
38357
  }, function (error) {
@@ -38361,8 +38363,7 @@ service.interceptors.request.use(function (config) {
38361
38363
  service.interceptors.response.use(function (response) {
38362
38364
  return response.data;
38363
38365
  }, function (error) {
38364
- var token = window.$auth.getToken();
38365
- if (token && error.response && error.response.status === 401 && location.href.toLowerCase().indexOf('login') === -1 && error.config.url.indexOf('http:') === -1 && error.config.url.indexOf('https:') === -1) {
38366
+ 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) {
38366
38367
  store["a" /* default */].dispatch('user/resetToken').then(function () {
38367
38368
  if (window.vType === 'wapp') {
38368
38369
  window.$alert('认证会话已过期,请重新登录。', '操作提示', {
@@ -38398,7 +38399,11 @@ service.interceptors.response.use(function (response) {
38398
38399
  if (location.href.indexOf('#') !== -1 && location.href.indexOf('login') === -1) {
38399
38400
  redirect += '?redirect=' + location.href.split('#')[1];
38400
38401
  }
38401
- window.location = '#/login' + redirect;
38402
+ if (window.flutter_inappwebview) {
38403
+ window.location = '#/loginFail';
38404
+ } else {
38405
+ window.location = '#/login' + redirect;
38406
+ }
38402
38407
  window.location.reload();
38403
38408
  } else {
38404
38409
  window.close();