@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 +12 -19
- package/dist/index.js +12 -19
- package/package.json +1 -1
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 = '
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
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
|
-
'
|
|
790
|
-
'
|
|
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 = '
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
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
|
-
'
|
|
809
|
-
'
|
|
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:
|