cfel-base-components 2.6.2 → 2.6.4
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
|
@@ -63,7 +63,7 @@ instance.interceptors.response.use(
|
|
|
63
63
|
})
|
|
64
64
|
// 如果后端在非2xx响应中也返回了业务 errorCode,处理 PRODUCT_NOT_REGISTRY
|
|
65
65
|
const respData = response?.data || {}
|
|
66
|
-
if (respData && respData.errorCode === 'PRODUCT_NOT_REGISTRY') {
|
|
66
|
+
if ((respData && respData.errorCode === 'PRODUCT_NOT_REGISTRY') || respData.errorCode === 'ACCESS_DENIED') {
|
|
67
67
|
if (typeof (window as any).showProductNotRegisteredOverlay === 'function') {
|
|
68
68
|
;(window as any).showProductNotRegisteredOverlay({
|
|
69
69
|
onAction: () => {},
|
|
@@ -11,6 +11,9 @@ interface TreeNode {
|
|
|
11
11
|
children?: TreeNode[]
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
const homeEnabled = window?.g_config?.homeEnabled
|
|
15
|
+
const homeUrl = window?.g_config?.homeUrl
|
|
16
|
+
|
|
14
17
|
export interface LiosLayoutlProps {
|
|
15
18
|
appName?: any
|
|
16
19
|
productCode: string
|
|
@@ -233,11 +236,13 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
233
236
|
<div className="header-logo" style={{ justifyContent: collapsed ? 'center' : '', paddingLeft: collapsed ? '0' : '' }}>
|
|
234
237
|
<div
|
|
235
238
|
onClick={() => {
|
|
236
|
-
|
|
239
|
+
if (homeEnabled && homeUrl) {
|
|
240
|
+
window.open(homeUrl, '_self')
|
|
241
|
+
}
|
|
237
242
|
}}
|
|
238
243
|
>
|
|
239
|
-
{!collapsed && <img className={`logo-base current-logo`} src={logo || logoUrl} />}
|
|
240
|
-
{collapsed && <img className={`logo-sub`} src={subLogo || subLogoUrl} />}
|
|
244
|
+
{!collapsed && <img style={{ cursor: homeEnabled ? 'pointer' : 'default' }} className={`logo-base current-logo`} src={logo || logoUrl} />}
|
|
245
|
+
{collapsed && <img style={{ cursor: homeEnabled ? 'pointer' : 'default' }} className={`logo-sub`} src={subLogo || subLogoUrl} />}
|
|
241
246
|
</div>
|
|
242
247
|
{!collapsed && (
|
|
243
248
|
<div
|