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

fix: 默认图标修改

parent a5075c71
Pipeline #67561 passed with stages
......@@ -114,9 +114,9 @@
"@wisdom-map/arcgismap": "1.4.0-124",
"@wisdom-map/basemap": "1.1.0-24",
"@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/utils": "0.1.327",
"@wisdom-utils/utils": "0.1.328",
"animate.css": "^4.1.1",
"antd": "4.21.2",
"compression": "1.7.4",
......
......@@ -21,22 +21,19 @@ const App = props => {
const metaSecurity = /https/.test(window.location.protocol) ? (
<meta httpEquiv="Content-Security-Policy" content="upgrade-insecure-requests" />
) : null;
const shortcut =
props?.global?.shortcutIcon?.indexOf('CityTemp') > -1
? props?.global?.shortcutIcon
: `civweb4/${props?.global?.shortcutIcon}`;
return (
<>
<Helmet title={`${(props.global && props.global.title) || defaultSetting.title}`}>
<title>{`${(props.global && props.global.title) || defaultSetting.title}`}</title>
{/* <link rel='shortcut icon'
href={`${window.location.origin}/web4/${props.global && props.global.shortcutIcon}`} /> */}
<link
rel="shortcut icon"
href={
props.global && props.global.shortcutIcon
? `${window.location.origin}/civweb4/${props.global.shortcutIcon}`
: defaultSetting.logo
}
/>
{props?.global?.shortcutIcon && <link rel="shortcut icon" href={`${window.location.origin}/${shortcut}`} />}
{metaSecurity}
<meta name="description" content={`${(props.global && props.global.title) || defaultSetting.title}`} />
{props?.global?.title && <meta name="description" content={`${props.global.title}`} />}
</Helmet>
<Router basename={config.base || pkg.name.toLocaleLowerCase() || ''}>
<Switch>
......
......@@ -505,12 +505,12 @@ class Login {
});
const { layers = [] } = this.globalConfig.mapsettings || {};
if (layers.length === 0) {
if (layers && layers.length === 0) {
widgetIndex !== -1 && this.globalConfig.uiwidgets.splice(widgetIndex, 1);
return Promise.resolve(this.globalConfig.mapsettings);
}
const layer = layers[0];
const layer = layers && layers[0] ? layers[0] : {};
if (!layer.id) {
layer.layerType = 'dynamic';
......@@ -518,7 +518,7 @@ class Login {
layer.layerType = 'PipenetLayer';
}
if (layers.length > 1 && widgetIndex === -1) {
if (layers && layers.length > 1 && widgetIndex === -1) {
this.globalConfig.uiwidgets.push({
bottom: isScale ? MAX_BOTTOM + 70 : MAX_BOTTOM + 35,
config: '',
......@@ -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