component-shipinlv 0.0.27 → 0.0.29

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.
@@ -163,7 +163,7 @@ declare const Tool: {
163
163
  setTimeOffset(serverTime: number): void;
164
164
  getTime(): number;
165
165
  h5Pay(query: Pay.H5PayQuery): void;
166
- notification(type: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
166
+ notification(type: "info" | "error" | "success" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
167
167
  notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
168
168
  notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
169
169
  notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
@@ -8,7 +8,7 @@ var envData = function envData() {
8
8
  return ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.WebBaseConfig) === null || _window2 === void 0 ? void 0 : _window2.currentEnv) || currentEnv;
9
9
  };
10
10
  var getApiUrl = function getApiUrl() {
11
- var _ref, _domain;
11
+ var _domain;
12
12
  var apiName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
13
13
  var apiEnv = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
14
14
  // 允许 http
@@ -20,7 +20,9 @@ var getApiUrl = function getApiUrl() {
20
20
  apiName = apiName.replace(/^\//, '');
21
21
  var env = getApiEnv(apiEnv || envData());
22
22
  var ApiUrlsItem = ApiUrls();
23
- var domain = (_ref = ApiUrlsItem[env] || ApiUrlsItem.prod) === null || _ref === void 0 ? void 0 : _ref.api;
23
+ var itemData = ApiUrlsItem[env] || ApiUrlsItem.prod;
24
+ // 高优先级;
25
+ var domain = (itemData === null || itemData === void 0 ? void 0 : itemData.authApi) || (itemData === null || itemData === void 0 ? void 0 : itemData.api);
24
26
 
25
27
  // 删除最后一个 /
26
28
  domain = ((_domain = domain) === null || _domain === void 0 ? void 0 : _domain.replace(/\/$/, '')) || '';
@@ -53,9 +55,9 @@ export var getEnv = function getEnv() {
53
55
  return getApiEnv(env);
54
56
  };
55
57
  export var getWsUrl = function getWsUrl() {
56
- var _ref2;
58
+ var _ref;
57
59
  var env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
58
60
  env = getEnv(env);
59
- return (_ref2 = ApiUrls()[env] || ApiUrls().prod) === null || _ref2 === void 0 ? void 0 : _ref2.ws;
61
+ return (_ref = ApiUrls()[env] || ApiUrls().prod) === null || _ref === void 0 ? void 0 : _ref.ws;
60
62
  };
61
63
  export default getApiUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -40,7 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "peerDependencies": {
43
- "antd": "^18.x",
43
+ "antd": "^5.x",
44
44
  "react": ">=18.x",
45
45
  "react-dom": ">=18.x"
46
46
  },