cfel-base-components 2.1.1 → 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) {
|
|
@@ -29,6 +29,10 @@ export interface LiosLayoutlProps {
|
|
|
29
29
|
availableAmount: string,
|
|
30
30
|
currency: string
|
|
31
31
|
}
|
|
32
|
+
amountInfo?: {
|
|
33
|
+
residueNum: string,
|
|
34
|
+
currencyCode: string
|
|
35
|
+
}
|
|
32
36
|
myWalletInfoAction?: Function,
|
|
33
37
|
logoutUrl?: string,
|
|
34
38
|
switchTenantUrl?: string,
|
|
@@ -54,6 +58,7 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
54
58
|
defaultOpenKeys,
|
|
55
59
|
productList,
|
|
56
60
|
myWalletInfo,
|
|
61
|
+
amountInfo,
|
|
57
62
|
myWalletInfoAction,
|
|
58
63
|
isHideHeader
|
|
59
64
|
} = props
|
|
@@ -77,6 +82,11 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
77
82
|
currency
|
|
78
83
|
} = myWalletInfo || {}
|
|
79
84
|
|
|
85
|
+
const {
|
|
86
|
+
residueNum,
|
|
87
|
+
currencyCode
|
|
88
|
+
} = amountInfo || {}
|
|
89
|
+
|
|
80
90
|
const [openKeys, setOpenKeys] = useState<any>(defaultOpenKeys || []);
|
|
81
91
|
// const [currentProduct, setCurrentProduct] = useState<any>({});
|
|
82
92
|
|
|
@@ -154,6 +164,16 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
154
164
|
{availableAmount || '加载中...'}
|
|
155
165
|
</div>
|
|
156
166
|
</div>
|
|
167
|
+
{
|
|
168
|
+
amountInfo &&
|
|
169
|
+
<div className='lios-li'>
|
|
170
|
+
<div className='lios-key'>抵用金余额</div>
|
|
171
|
+
<div className='lios-value'><span>{currencyText(currencyCode)}</span>
|
|
172
|
+
{residueNum || '加载中...'}
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
}
|
|
176
|
+
|
|
157
177
|
</div>
|
|
158
178
|
}
|
|
159
179
|
{
|