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
package/src/apiRequest/config.ts
CHANGED
|
@@ -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 =
|
|
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) {
|
package/.vscode/settings.json
DELETED
package/src/.umi/core/helmet.ts
DELETED
|
@@ -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
|
-
}
|