@bit-sun/business-component 2.4.3 → 2.4.4

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/dist/index.esm.js CHANGED
@@ -719,14 +719,6 @@ function getEekaToken() {
719
719
  function getGuoyaoshukeSessionId() {
720
720
  return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.sessionId) || '';
721
721
  }
722
- function getGuoyaoshukeAccountId() {
723
- var _resposne$accountPers;
724
- return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$accountPers = resposne$1.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
725
- }
726
- function getGuoyaoshukeEmployeeId() {
727
- var _resposne$employeeRes;
728
- return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$employeeRes = resposne$1.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
729
- }
730
722
  function getGuoyaoshukeToken() {
731
723
  return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.token) || '';
732
724
  }
@@ -749,13 +741,14 @@ function handleRequestAuthHeader(config) {
749
741
  * 获取当前组件服务项目
750
742
  * */
751
743
  var getCurrentUseProject = function getCurrentUseProject() {
752
- var project = 'GuoYao';
753
- // if(hostname?.indexOf('omni')>-1 || hostname?.indexOf('eeka')>-1 || hostname?.indexOf('koradior')>-1) {
754
- // project = 'YingJia'
755
- // }
756
- // if(hostname?.indexOf('guoyaoshuke')>-1 || hostname?.indexOf('10.31.249.136')>-1) {
757
- // project = 'GuoYao'
758
- // }
744
+ var project = 'BitSun';
745
+ var hostname = window.location.hostname;
746
+ if ((hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('omni')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('eeka')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('koradior')) > -1) {
747
+ project = 'YingJia';
748
+ }
749
+ if ((hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('guoyaoshuke')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('10.31.249.136')) > -1) {
750
+ project = 'GuoYao';
751
+ }
759
752
  return project;
760
753
  };
761
754
  /*
@@ -784,10 +777,10 @@ var handleCommonHeader = function handleCommonHeader() {
784
777
  case 'GuoYao':
785
778
  commonHeaders = {
786
779
  'sso-sessionid': getGuoyaoshukeSessionId(),
787
- 'gksk-account-id': getGuoyaoshukeAccountId(),
788
- 'gksk-employee-id': getGuoyaoshukeEmployeeId(),
789
- 'gksk-tenant-id': getCurrentTenantId(),
790
- 'gksk-user-token': getGuoyaoshukeToken()
780
+ // 'gksk-account-id': getGuoyaoshukeAccountId(),
781
+ // 'gksk-employee-id': getGuoyaoshukeEmployeeId(),
782
+ 'Gksk-Tenant-Id': getCurrentTenantId(),
783
+ 'Gksk-Access-Token': getGuoyaoshukeToken()
791
784
  };
792
785
  break;
793
786
  default:
package/dist/index.js CHANGED
@@ -738,14 +738,6 @@ function getEekaToken() {
738
738
  function getGuoyaoshukeSessionId() {
739
739
  return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.sessionId) || '';
740
740
  }
741
- function getGuoyaoshukeAccountId() {
742
- var _resposne$accountPers;
743
- return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$accountPers = resposne$1.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
744
- }
745
- function getGuoyaoshukeEmployeeId() {
746
- var _resposne$employeeRes;
747
- return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$employeeRes = resposne$1.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
748
- }
749
741
  function getGuoyaoshukeToken() {
750
742
  return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.token) || '';
751
743
  }
@@ -768,13 +760,14 @@ function handleRequestAuthHeader(config) {
768
760
  * 获取当前组件服务项目
769
761
  * */
770
762
  var getCurrentUseProject = function getCurrentUseProject() {
771
- var project = 'GuoYao';
772
- // if(hostname?.indexOf('omni')>-1 || hostname?.indexOf('eeka')>-1 || hostname?.indexOf('koradior')>-1) {
773
- // project = 'YingJia'
774
- // }
775
- // if(hostname?.indexOf('guoyaoshuke')>-1 || hostname?.indexOf('10.31.249.136')>-1) {
776
- // project = 'GuoYao'
777
- // }
763
+ var project = 'BitSun';
764
+ var hostname = window.location.hostname;
765
+ if ((hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('omni')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('eeka')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('koradior')) > -1) {
766
+ project = 'YingJia';
767
+ }
768
+ if ((hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('guoyaoshuke')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('10.31.249.136')) > -1) {
769
+ project = 'GuoYao';
770
+ }
778
771
  return project;
779
772
  };
780
773
  /*
@@ -803,10 +796,10 @@ var handleCommonHeader = function handleCommonHeader() {
803
796
  case 'GuoYao':
804
797
  commonHeaders = {
805
798
  'sso-sessionid': getGuoyaoshukeSessionId(),
806
- 'gksk-account-id': getGuoyaoshukeAccountId(),
807
- 'gksk-employee-id': getGuoyaoshukeEmployeeId(),
808
- 'gksk-tenant-id': getCurrentTenantId(),
809
- 'gksk-user-token': getGuoyaoshukeToken()
799
+ // 'gksk-account-id': getGuoyaoshukeAccountId(),
800
+ // 'gksk-employee-id': getGuoyaoshukeEmployeeId(),
801
+ 'Gksk-Tenant-Id': getCurrentTenantId(),
802
+ 'Gksk-Access-Token': getGuoyaoshukeToken()
810
803
  };
811
804
  break;
812
805
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",