@bit-sun/business-component 2.4.1 → 2.4.3

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
@@ -749,14 +749,13 @@ function handleRequestAuthHeader(config) {
749
749
  * 获取当前组件服务项目
750
750
  * */
751
751
  var getCurrentUseProject = function getCurrentUseProject() {
752
- var project = 'BitSun';
753
- var hostname = window.location.hostname;
754
- 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) {
755
- project = 'YingJia';
756
- }
757
- 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) {
758
- project = 'GuoYao';
759
- }
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
+ // }
760
759
  return project;
761
760
  };
762
761
  /*
@@ -857,7 +856,7 @@ function handleError(response, needBackError) {
857
856
  * @param {*} res 响应体
858
857
  * */
859
858
  var judgeIsRequestError = function judgeIsRequestError(res) {
860
- if (!res || (res === null || res === void 0 ? void 0 : res.status) && res.status !== '0' || (res === null || res === void 0 ? void 0 : res.code) && (res.code !== '000000' || res.code !== '0')) {
859
+ if (!res || (res === null || res === void 0 ? void 0 : res.status) && res.status !== '0' || (res === null || res === void 0 ? void 0 : res.code) && res.code !== '000000' && res.code !== '0') {
861
860
  return true;
862
861
  }
863
862
  return false;
package/dist/index.js CHANGED
@@ -768,14 +768,13 @@ function handleRequestAuthHeader(config) {
768
768
  * 获取当前组件服务项目
769
769
  * */
770
770
  var getCurrentUseProject = function getCurrentUseProject() {
771
- var project = 'BitSun';
772
- var hostname = window.location.hostname;
773
- 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) {
774
- project = 'YingJia';
775
- }
776
- 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) {
777
- project = 'GuoYao';
778
- }
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
+ // }
779
778
  return project;
780
779
  };
781
780
  /*
@@ -876,7 +875,7 @@ function handleError(response, needBackError) {
876
875
  * @param {*} res 响应体
877
876
  * */
878
877
  var judgeIsRequestError = function judgeIsRequestError(res) {
879
- if (!res || (res === null || res === void 0 ? void 0 : res.status) && res.status !== '0' || (res === null || res === void 0 ? void 0 : res.code) && (res.code !== '000000' || res.code !== '0')) {
878
+ if (!res || (res === null || res === void 0 ? void 0 : res.status) && res.status !== '0' || (res === null || res === void 0 ? void 0 : res.code) && res.code !== '000000' && res.code !== '0') {
880
879
  return true;
881
880
  }
882
881
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -60,10 +60,10 @@ const handleCommonHeader = () => {
60
60
  case 'GuoYao':
61
61
  commonHeaders = {
62
62
  'sso-sessionid': getGuoyaoshukeSessionId(),
63
- 'gksk-account-id': getGuoyaoshukeAccountId(),
64
- 'gksk-employee-id': getGuoyaoshukeEmployeeId(),
65
- 'gksk-tenant-id': getCurrentTenantId(),
66
- 'gksk-user-token': getGuoyaoshukeToken()
63
+ // 'gksk-account-id': getGuoyaoshukeAccountId(),
64
+ // 'gksk-employee-id': getGuoyaoshukeEmployeeId(),
65
+ 'Gksk-Tenant-Id': getCurrentTenantId(),
66
+ 'Gksk-Access-Token': getGuoyaoshukeToken()
67
67
  }
68
68
  break;
69
69
  default:
@@ -149,7 +149,7 @@ export function handleError(response: object, needBackError?: boolean) {
149
149
  * @param {*} res 响应体
150
150
  * */
151
151
  export const judgeIsRequestError = (res: any) => {
152
- if (!res || (res?.status && res.status !== '0') || (res?.code && (res.code !== '000000' || res.code !== '0'))) {
152
+ if (!res || (res?.status && res.status !== '0') || (res?.code && (res.code !== '000000' && res.code !== '0'))) {
153
153
  return true;
154
154
  }
155
155
  return false;