cfel-base-components 2.1.2 → 2.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfel-base-components",
3
- "version": "2.1.2",
3
+ "version": "2.2.0",
4
4
  "description": "cfel-base-components",
5
5
  "main": "/src/index.tsx",
6
6
  "types": "src/index.d.ts",
@@ -2,7 +2,7 @@ import axios, { AxiosRequestHeaders } from 'axios';
2
2
  import { notification } from 'antd';
3
3
 
4
4
 
5
- let UMI_APP_BASEURL:any = window.location.origin || process.env
5
+ let UMI_APP_BASEURL: any = window.location.origin || process.env
6
6
  const instance = axios.create({ baseURL: UMI_APP_BASEURL });
7
7
 
8
8
  instance.interceptors.request.use(
@@ -16,7 +16,7 @@ instance.interceptors.request.use(
16
16
  ...config.params,
17
17
  productCode: (window as any)?.g_config?.productCode,
18
18
  }
19
-
19
+
20
20
  return config;
21
21
  },
22
22
  (error: any) => Promise.reject(error)
@@ -57,7 +57,7 @@ instance.interceptors.response.use(
57
57
  }
58
58
 
59
59
  notification.error({
60
- message: response?.data?.message || CodeMessage[status]
60
+ message: response?.data?.message || CodeMessage[status] || "服务暂不可用,请检查网络"
61
61
  });
62
62
 
63
63
  if (status === 401) {
@@ -1,3 +0,0 @@
1
- {
2
- "typescript.tsdk": "node_modules/typescript/lib"
3
- }
@@ -1,10 +0,0 @@
1
- // @ts-nocheck
2
- // This file is generated by Umi automatically
3
- // DO NOT CHANGE IT MANUALLY!
4
- import React from 'react';
5
- import { HelmetProvider } from '/Users/wujingang/Desktop/workspace/base-components/node_modules/@umijs/renderer-react';
6
- import { context } from './helmetContext';
7
-
8
- export const innerProvider = (container) => {
9
- return React.createElement(HelmetProvider, { context }, container);
10
- }
@@ -1,4 +0,0 @@
1
- // @ts-nocheck
2
- // This file is generated by Umi automatically
3
- // DO NOT CHANGE IT MANUALLY!
4
- export const context = {};