Commit 556890fa authored by 杨思琦's avatar 杨思琦

fix: 默认图标修改

parent a5075c71
Pipeline #67561 passed with stages
...@@ -114,9 +114,9 @@ ...@@ -114,9 +114,9 @@
"@wisdom-map/arcgismap": "1.4.0-124", "@wisdom-map/arcgismap": "1.4.0-124",
"@wisdom-map/basemap": "1.1.0-24", "@wisdom-map/basemap": "1.1.0-24",
"@wisdom-map/util": "^1.0.28-0", "@wisdom-map/util": "^1.0.28-0",
"@wisdom-utils/components": "0.1.287", "@wisdom-utils/components": "0.1.288",
"@wisdom-utils/runtime": "0.0.38", "@wisdom-utils/runtime": "0.0.38",
"@wisdom-utils/utils": "0.1.327", "@wisdom-utils/utils": "0.1.328",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"antd": "4.21.2", "antd": "4.21.2",
"compression": "1.7.4", "compression": "1.7.4",
......
...@@ -21,22 +21,19 @@ const App = props => { ...@@ -21,22 +21,19 @@ const App = props => {
const metaSecurity = /https/.test(window.location.protocol) ? ( const metaSecurity = /https/.test(window.location.protocol) ? (
<meta httpEquiv="Content-Security-Policy" content="upgrade-insecure-requests" /> <meta httpEquiv="Content-Security-Policy" content="upgrade-insecure-requests" />
) : null; ) : null;
const shortcut =
props?.global?.shortcutIcon?.indexOf('CityTemp') > -1
? props?.global?.shortcutIcon
: `civweb4/${props?.global?.shortcutIcon}`;
return ( return (
<> <>
<Helmet title={`${(props.global && props.global.title) || defaultSetting.title}`}> <Helmet title={`${(props.global && props.global.title) || defaultSetting.title}`}>
<title>{`${(props.global && props.global.title) || defaultSetting.title}`}</title> <title>{`${(props.global && props.global.title) || defaultSetting.title}`}</title>
{/* <link rel='shortcut icon' {/* <link rel='shortcut icon'
href={`${window.location.origin}/web4/${props.global && props.global.shortcutIcon}`} /> */} href={`${window.location.origin}/web4/${props.global && props.global.shortcutIcon}`} /> */}
<link {props?.global?.shortcutIcon && <link rel="shortcut icon" href={`${window.location.origin}/${shortcut}`} />}
rel="shortcut icon"
href={
props.global && props.global.shortcutIcon
? `${window.location.origin}/civweb4/${props.global.shortcutIcon}`
: defaultSetting.logo
}
/>
{metaSecurity} {metaSecurity}
<meta name="description" content={`${(props.global && props.global.title) || defaultSetting.title}`} /> {props?.global?.title && <meta name="description" content={`${props.global.title}`} />}
</Helmet> </Helmet>
<Router basename={config.base || pkg.name.toLocaleLowerCase() || ''}> <Router basename={config.base || pkg.name.toLocaleLowerCase() || ''}>
<Switch> <Switch>
......
...@@ -505,12 +505,12 @@ class Login { ...@@ -505,12 +505,12 @@ class Login {
}); });
const { layers = [] } = this.globalConfig.mapsettings || {}; const { layers = [] } = this.globalConfig.mapsettings || {};
if (layers.length === 0) { if (layers && layers.length === 0) {
widgetIndex !== -1 && this.globalConfig.uiwidgets.splice(widgetIndex, 1); widgetIndex !== -1 && this.globalConfig.uiwidgets.splice(widgetIndex, 1);
return Promise.resolve(this.globalConfig.mapsettings); return Promise.resolve(this.globalConfig.mapsettings);
} }
const layer = layers[0]; const layer = layers && layers[0] ? layers[0] : {};
if (!layer.id) { if (!layer.id) {
layer.layerType = 'dynamic'; layer.layerType = 'dynamic';
...@@ -518,7 +518,7 @@ class Login { ...@@ -518,7 +518,7 @@ class Login {
layer.layerType = 'PipenetLayer'; layer.layerType = 'PipenetLayer';
} }
if (layers.length > 1 && widgetIndex === -1) { if (layers && layers.length > 1 && widgetIndex === -1) {
this.globalConfig.uiwidgets.push({ this.globalConfig.uiwidgets.push({
bottom: isScale ? MAX_BOTTOM + 70 : MAX_BOTTOM + 35, bottom: isScale ? MAX_BOTTOM + 70 : MAX_BOTTOM + 35,
config: '', config: '',
...@@ -1119,4 +1119,4 @@ class Login { ...@@ -1119,4 +1119,4 @@ class Login {
} }
} }
export default Login; export default Login;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment