Commit 65883695 authored by 邓晓峰's avatar 邓晓峰

fix: 修复运营商js注入

parent 7304072e
Pipeline #48952 passed with stages
in 2 minutes 33 seconds
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
export function genActiveRule(routerPrefix) { export function genActiveRule(routerPrefix) {
return location => { return location => {
debugger
return location.pathname.startsWith(routerPrefix) return location.pathname.startsWith(routerPrefix)
}; };
} }
......
...@@ -14,7 +14,7 @@ server { ...@@ -14,7 +14,7 @@ server {
# Type your domain name below # Type your domain name below
server_name example.com; server_name example.com;
gzip on;
return 301 https://$server_name$request_uri; return 301 https://$server_name$request_uri;
} }
......
// import 'whatwg-fetch'; import 'whatwg-fetch';
import './public-path'; import './public-path';
import '!file-loader?name=[name].[ext]!./images/favicon.ico'; import '!file-loader?name=[name].[ext]!./images/favicon.ico';
import './global.less'; import './global.less';
......
...@@ -37,7 +37,6 @@ class NoticeIconView extends Component { ...@@ -37,7 +37,6 @@ class NoticeIconView extends Component {
window.share && window.share.event && window.share.event.removeAllListeners('reloadNotice'); window.share && window.share.event && window.share.event.removeAllListeners('reloadNotice');
} catch (error) { } catch (error) {
} }
debugger
this.notifier = new Notifier( this.notifier = new Notifier(
this.props.global.userInfo, this.props.global.userInfo,
this.renderVideo, this.renderVideo,
......
...@@ -26,7 +26,11 @@ function App(props) { ...@@ -26,7 +26,11 @@ function App(props) {
<Switch> <Switch>
{renderRoutes( {renderRoutes(
'panda-console-base', 'panda-console-base',
dyRoutes(props.menu || [], props.global && props.global.layout, props.global && props.global.theme || 'dark').routes, dyRoutes(
props.menu || [],
props.global && props.global.layout,
(props.global && props.global.theme) || 'dark',
).routes,
)} )}
</Switch> </Switch>
</Router> </Router>
......
...@@ -10,8 +10,8 @@ import { useHistory } from '@wisdom-utils/runtime'; ...@@ -10,8 +10,8 @@ import { useHistory } from '@wisdom-utils/runtime';
import KeepAlive from 'react-activation'; import KeepAlive from 'react-activation';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import { BasicLayout } from '@wisdom-utils/components/lib/AppLayout'; import { BasicLayout } from '@wisdom-utils/components/lib/AppLayout';
import RightContent from '@/components/GlobalHeader/ExtendRightContent';
import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings'; import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings';
import RightContent from '@/components/GlobalHeader/ExtendRightContent';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import { WEB_GIS_TYPE } from '../constants'; import { WEB_GIS_TYPE } from '../constants';
import SecurityLayout from './SecurityLayout'; import SecurityLayout from './SecurityLayout';
...@@ -45,7 +45,7 @@ const ArrowIcon = props => <Icon component={arrowSvg} {...props} />; ...@@ -45,7 +45,7 @@ const ArrowIcon = props => <Icon component={arrowSvg} {...props} />;
const optionsWith = [{ label: '按站点', value: 'site' }, { label: '按城市', value: 'city' }]; const optionsWith = [{ label: '按站点', value: 'site' }, { label: '按城市', value: 'city' }];
const HOT = ['HOT', '县', '市', 'New']; const HOT = ['HOT', '县', '市', 'New'];
const StationsItem = (item, action, onChangeVisible) => { const StationsItem = (item, action, onChangeVisible) => {
const changeGroup = (event, data) => { const changeGroup = (event, data) => {
action.changeGroup && action.changeGroup(event, data, onChangeVisible); action.changeGroup && action.changeGroup(event, data, onChangeVisible);
}; };
return ( return (
......
...@@ -134,12 +134,23 @@ export const initMicroApps = () => { ...@@ -134,12 +134,23 @@ export const initMicroApps = () => {
singular: false, singular: false,
scopedCSS: true, scopedCSS: true,
prefetch: 'all', prefetch: 'all',
async fetch(url, ...args) {
if (url.indexOf('cookie/flash.js') > -1) {
return {
async text() {
return '';
},
};
}
return window.fetch(url, ...args);
},
// eslint-disable-next-line no-underscore-dangle // eslint-disable-next-line no-underscore-dangle
// getPublicPath: window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__, // getPublicPath: window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__,
excludeAssetFilter: url => excludeAssetFilter: url =>
url.indexOf('framework/highcharts') !== -1 || url.indexOf('framework/highcharts') !== -1 ||
// url.indexOf('framework/amap/AMap.UI') !== -1 || // url.indexOf('framework/amap/AMap.UI') !== -1 ||
// url.indexOf('framework/amap/init.js') !== -1 || url.indexOf('framework/4.9/init.js') !== -1 ||
url.indexOf('jquery-mousewheel-easyui-qrcode-cookie-resize-filesaver-fisheye-dateFormat-gridify.js') !== -1 ||
url.indexOf('jquery') !== -1 || url.indexOf('jquery') !== -1 ||
url.indexOf('components/filetools/xlsx.core.min') !== -1 || url.indexOf('components/filetools/xlsx.core.min') !== -1 ||
url.indexOf('managers/MapManager.js') !== -1 || url.indexOf('managers/MapManager.js') !== -1 ||
......
...@@ -69,7 +69,6 @@ const Login = forwardRef((props, _ref) => { ...@@ -69,7 +69,6 @@ const Login = forwardRef((props, _ref) => {
props.history.push(`/?client=${props.global.client}`); props.history.push(`/?client=${props.global.client}`);
// window.share.event.emit('triggerMicro', props.global); // window.share.event.emit('triggerMicro', props.global);
// initMicroApps(); // initMicroApps();
debugger
defaultApp(); defaultApp();
}); });
action && action &&
......
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