Commit 28510980 authored by 杨思琦's avatar 杨思琦

fix: 首页img路径修改

parent dfd8f5f4
Pipeline #60432 waiting for manual action with stages
import React , {useEffect} from 'react';
import React, { useEffect } from 'react';
import { Helmet } from 'react-helmet';
import { connect } from 'react-redux';
......@@ -16,20 +16,28 @@ const config = require('../../../config/config');
const App = props => {
useEffect(() => {
event.emit('loading' , props.loading);
}, [props.loading])
event.emit('loading', props.loading);
}, [props.loading]);
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;
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={`${window.location.origin}/web4/${props.global && props.global.shortcutIcon}`} /> */}
<link
rel="shortcut icon"
href={
props.global && props.global.shortcutIcon
? `${window.location.origin}/web4/${props.global.shortcutIcon}`
: defaultSetting.logo
}
/>
{metaSecurity}
<meta name='description' content={`${(props.global && props.global.title) || defaultSetting.title}`} />
<meta name="description" content={`${(props.global && props.global.title) || defaultSetting.title}`} />
</Helmet>
<Router basename={config.base || pkg.name.toLocaleLowerCase() || ''}>
<Switch>
......@@ -45,7 +53,7 @@ const App = props => {
</Router>
</>
);
}
};
const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']),
......
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