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

fix: micro app toggle bug

parent b9347ed4
...@@ -7,6 +7,7 @@ function resolve (dir) { ...@@ -7,6 +7,7 @@ function resolve (dir) {
} }
const { REACT_APP_ENV } = process.env; const { REACT_APP_ENV } = process.env;
module.exports = { module.exports = {
base: '/civbase',
title: '熊猫智慧城市监控管理解决方案', title: '熊猫智慧城市监控管理解决方案',
hash: true, hash: true,
layout: { layout: {
......
...@@ -5,21 +5,21 @@ export default { ...@@ -5,21 +5,21 @@ export default {
dev: [ dev: [
{ {
name: 'civ_monitor', name: 'civ_monitor',
entry: `//${window.location.hostname}:8082/civ_monitor`, entry: `//${window.location.hostname}:8080/civ_monitor`,
container: '#micro-container', container: '#micro-container',
activeRule: genActiveRule('/civbase/civ_monitor'), activeRule: '/civbase/civ_monitor',
}, },
{ {
name: 'civ_water', name: 'civ_water',
entry: `//${window.location.hostname}:8081/civ_water`, entry: `//${window.location.hostname}:8082/civ_water`,
container: '#micro-container', container: '#micro-container',
activeRule: genActiveRule('/civbase/civ_water'), activeRule: '/civbase/civ_water',
}, },
{ {
name: 'civweb4', name: 'civweb4',
entry: `//${window.location.hostname}:3020/civweb4`, entry: `//${window.location.hostname}:3020/civweb4`,
container: '#micro-container', container: '#micro-container',
activeRule: genActiveRule('/civbase/civweb4'), activeRule: '/civbase/civweb4',
}, },
], ],
prod: [ prod: [
......
...@@ -102,47 +102,60 @@ ...@@ -102,47 +102,60 @@
} }
}, },
"@ant-design/pro-layout": { "@ant-design/pro-layout": {
"version": "6.14.0", "version": "6.19.0",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-layout/-/pro-layout-6.14.0.tgz", "resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-layout/-/pro-layout-6.19.0.tgz",
"integrity": "sha1-VrRcQ/aNxWuNyuU/YYCAkk6yNMM=", "integrity": "sha1-w/Roy+8cgD4Vkzms7MwWiMfHG2k=",
"requires": { "requires": {
"@ant-design/icons": "^4.0.0", "@ant-design/icons": "^4.0.0",
"@ant-design/pro-provider": "1.4.4", "@ant-design/pro-provider": "1.4.12",
"@ant-design/pro-utils": "1.11.3", "@ant-design/pro-utils": "1.17.0",
"@umijs/route-utils": "^1.0.33", "@umijs/route-utils": "^1.0.35",
"@umijs/use-params": "^1.0.2",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"omit.js": "^2.0.2", "omit.js": "^2.0.2",
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"rc-resize-observer": "^0.2.1", "rc-resize-observer": "^0.2.1",
"rc-util": "^5.0.6", "rc-util": "^5.0.6",
"react-copy-to-clipboard": "^5.0.1", "swr": "^0.5.4",
"unstated-next": "^1.1.0", "unstated-next": "^1.1.0",
"use-json-comparison": "^1.0.3", "use-json-comparison": "^1.0.3",
"use-media-antd-query": "^1.0.3", "use-media-antd-query": "^1.0.6",
"use-url-search-params": "^2.3.13",
"warning": "^4.0.3" "warning": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ant-design/pro-provider": { "@ant-design/pro-provider": {
"version": "1.4.4", "version": "1.4.12",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.4.tgz", "resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-provider/-/pro-provider-1.4.12.tgz",
"integrity": "sha1-Do0ngQx2fxfSPz7df/RGj429Nkk=", "integrity": "sha1-OSqrklPugFozybPrPQeLxbyr+30=",
"requires": { "requires": {
"rc-util": "^5.0.1" "rc-util": "^5.0.1"
} }
}, },
"@ant-design/pro-utils": { "@ant-design/pro-utils": {
"version": "1.11.3", "version": "1.17.0",
"resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-utils/-/pro-utils-1.11.3.tgz", "resolved": "https://g.civnet.cn:4873/@ant-design%2fpro-utils/-/pro-utils-1.17.0.tgz",
"integrity": "sha1-bi3dO32Y6znj3fxPiYIipPETg0k=", "integrity": "sha1-qm8rbctcvuQpD2cu4c3JKAyrVdk=",
"requires": { "requires": {
"@ant-design/icons": "^4.3.0", "@ant-design/icons": "^4.3.0",
"@ant-design/pro-provider": "1.4.4", "@ant-design/pro-provider": "1.4.12",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"moment": "^2.27.0", "moment": "^2.27.0",
"rc-util": "^5.0.6" "rc-util": "^5.0.6"
} }
},
"swr": {
"version": "0.5.6",
"resolved": "https://g.civnet.cn:4873/swr/-/swr-0.5.6.tgz",
"integrity": "sha1-cL/pvJ16xJoGS+Sg9Kz1eYLlWjE=",
"requires": {
"dequal": "2.0.2"
}
},
"use-media-antd-query": {
"version": "1.0.7",
"resolved": "https://g.civnet.cn:4873/use-media-antd-query/-/use-media-antd-query-1.0.7.tgz",
"integrity": "sha1-TjC2UPUtmST8swzzVg7nOE9b0ls="
} }
} }
}, },
...@@ -9642,12 +9655,12 @@ ...@@ -9642,12 +9655,12 @@
} }
}, },
"@umijs/route-utils": { "@umijs/route-utils": {
"version": "1.0.34", "version": "1.0.37",
"resolved": "https://g.civnet.cn:4873/@umijs%2froute-utils/-/route-utils-1.0.34.tgz", "resolved": "https://g.civnet.cn:4873/@umijs%2froute-utils/-/route-utils-1.0.37.tgz",
"integrity": "sha512-5TUZCm5uuS3NbzdaoRDAfAIy6LDu+OCNL8xd+Dhth3YVFvbYkIeIG9/xl/5x1F+sWU8X/Oujlo6rfR8kgdB0Wg==", "integrity": "sha1-HOtRaYDUdUzi1ZWYeP5yJZCRqZA=",
"requires": { "requires": {
"@qixian.cs/path-to-regexp": "^6.1.0", "@qixian.cs/path-to-regexp": "^6.1.0",
"hash.js": "^1.1.7", "fast-deep-equal": "^3.1.3",
"lodash.isequal": "^4.5.0", "lodash.isequal": "^4.5.0",
"memoize-one": "^5.1.1" "memoize-one": "^5.1.1"
} }
...@@ -10721,6 +10734,11 @@ ...@@ -10721,6 +10734,11 @@
} }
} }
}, },
"@umijs/use-params": {
"version": "1.0.3",
"resolved": "https://g.civnet.cn:4873/@umijs%2fuse-params/-/use-params-1.0.3.tgz",
"integrity": "sha1-2R1r5oRtyHZd/YHFPO45U7M/HrI="
},
"@umijs/utils": { "@umijs/utils": {
"version": "3.3.7", "version": "3.3.7",
"resolved": "https://g.civnet.cn:4873/@umijs%2futils/-/utils-3.3.7.tgz", "resolved": "https://g.civnet.cn:4873/@umijs%2futils/-/utils-3.3.7.tgz",
...@@ -19751,6 +19769,7 @@ ...@@ -19751,6 +19769,7 @@
"version": "1.1.7", "version": "1.1.7",
"resolved": "https://g.civnet.cn:4873/hash.js/-/hash.js-1.1.7.tgz", "resolved": "https://g.civnet.cn:4873/hash.js/-/hash.js-1.1.7.tgz",
"integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
"dev": true,
"requires": { "requires": {
"inherits": "^2.0.3", "inherits": "^2.0.3",
"minimalistic-assert": "^1.0.1" "minimalistic-assert": "^1.0.1"
...@@ -20786,7 +20805,8 @@ ...@@ -20786,7 +20805,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://g.civnet.cn:4873/inherits/-/inherits-2.0.3.tgz", "resolved": "https://g.civnet.cn:4873/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
}, },
"ini": { "ini": {
"version": "1.3.8", "version": "1.3.8",
...@@ -24838,7 +24858,8 @@ ...@@ -24838,7 +24858,8 @@
"minimalistic-assert": { "minimalistic-assert": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://g.civnet.cn:4873/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "resolved": "https://g.civnet.cn:4873/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
"dev": true
}, },
"minimalistic-crypto-utils": { "minimalistic-crypto-utils": {
"version": "1.0.1", "version": "1.0.1",
...@@ -29859,6 +29880,7 @@ ...@@ -29859,6 +29880,7 @@
"version": "5.0.3", "version": "5.0.3",
"resolved": "https://g.civnet.cn:4873/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.3.tgz", "resolved": "https://g.civnet.cn:4873/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.3.tgz",
"integrity": "sha1-KgYjsRFaHYyEFE6UNNM0K1r0GrQ=", "integrity": "sha1-KgYjsRFaHYyEFE6UNNM0K1r0GrQ=",
"dev": true,
"requires": { "requires": {
"copy-to-clipboard": "^3", "copy-to-clipboard": "^3",
"prop-types": "^15.5.8" "prop-types": "^15.5.8"
...@@ -37326,11 +37348,6 @@ ...@@ -37326,11 +37348,6 @@
"object-assign": "^4.1.1" "object-assign": "^4.1.1"
} }
}, },
"use-url-search-params": {
"version": "2.3.13",
"resolved": "https://g.civnet.cn:4873/use-url-search-params/-/use-url-search-params-2.3.13.tgz",
"integrity": "sha1-AWAJyIefx/YxpYzepXLF3tghvzU="
},
"user-home": { "user-home": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://g.civnet.cn:4873/user-home/-/user-home-2.0.0.tgz", "resolved": "https://g.civnet.cn:4873/user-home/-/user-home-2.0.0.tgz",
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
"dependencies": { "dependencies": {
"@ant-design/colors": "^5.0.1", "@ant-design/colors": "^5.0.1",
"@ant-design/icons": "^4.0.0", "@ant-design/icons": "^4.0.0",
"@ant-design/pro-layout": "^6.14.0", "@ant-design/pro-layout": "^6.18.1",
"@ant-design/pro-skeleton": "^1.0.0-beta.2", "@ant-design/pro-skeleton": "^1.0.0-beta.2",
"@ant-design/pro-table": "^2.5.3", "@ant-design/pro-table": "^2.5.3",
"@ant-design/pro-utils": "^1.10.4", "@ant-design/pro-utils": "^1.10.4",
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
"pinyin-match": "^1.1.1", "pinyin-match": "^1.1.1",
"promise.prototype.finally": "^3.1.2", "promise.prototype.finally": "^3.1.2",
"prop-types": "15.7.2", "prop-types": "15.7.2",
"qiankun": "^2.4.8", "qiankun": "^2.4.1",
"qrcode.react": "^1.0.0", "qrcode.react": "^1.0.0",
"react": "16.12.0", "react": "16.12.0",
"react-dom": "16.12.0", "react-dom": "16.12.0",
......
...@@ -2,7 +2,7 @@ import '!file-loader?name=[name].[ext]!./images/favicon.ico'; ...@@ -2,7 +2,7 @@ import '!file-loader?name=[name].[ext]!./images/favicon.ico';
import './global.less'; import './global.less';
// import '@babel/polyfill'; // import '@babel/polyfill';
import 'animate.css/animate.css'; import 'animate.css/animate.css';
// import 'antd/dist/antd.less'; import 'antd/dist/antd.less';
import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions
import 'kit_utils/lib/format'; import 'kit_utils/lib/format';
import 'sanitize.css/sanitize.css'; import 'sanitize.css/sanitize.css';
...@@ -13,11 +13,17 @@ import 'sanitize.css/sanitize.css'; ...@@ -13,11 +13,17 @@ import 'sanitize.css/sanitize.css';
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { Button, message, notification } from 'antd'; import {
Button,
message,
notification,
} from 'antd';
import { ConnectedRouter } from 'connected-react-router/immutable'; import { ConnectedRouter } from 'connected-react-router/immutable';
import Immutable from 'immutable'; import Immutable from 'immutable';
import Cookies from 'js-cookie'; import {
import { params, Storeage } from 'kit_utils'; params,
Storeage,
} from 'kit_utils';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { useIntl } from '@/locales/localeExports'; import { useIntl } from '@/locales/localeExports';
...@@ -35,7 +41,10 @@ import { actionCreators } from './containers/App/store'; ...@@ -35,7 +41,10 @@ import { actionCreators } from './containers/App/store';
import { LocaleContainer } from './locales/locale'; import { LocaleContainer } from './locales/locale';
import { initMicroApps } from './micro'; import { initMicroApps } from './micro';
import Login from './pages/user/login/login'; import Login from './pages/user/login/login';
import { getToken, isString } from './utils/utils'; import {
getToken,
isString,
} from './utils/utils';
const isHttps = document.location.protocol === 'https:'; const isHttps = document.location.protocol === 'https:';
const { pwa } = defaultSettings; const { pwa } = defaultSettings;
......
...@@ -38,7 +38,6 @@ const checkPermissions = ( ...@@ -38,7 +38,6 @@ const checkPermissions = (
validate: true, validate: true,
}; };
} }
debugger
const findIndex = data.findIndex(item => item.path === authority.path); const findIndex = data.findIndex(item => item.path === authority.path);
if (findIndex > -1) { if (findIndex > -1) {
return { return {
......
import React from 'react'; import React from 'react';
import { List, Spin } from 'antd'; import {
List,
Spin,
} from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import styles from './NoticeList.less'; import styles from './NoticeList.less';
import Alarm from './Templates/Alarm'; import Alarm from './Templates/Alarm';
import Case from './Templates/Case'; import Case from './Templates/Case';
...@@ -99,7 +103,6 @@ class NoticeList extends React.Component { ...@@ -99,7 +103,6 @@ class NoticeList extends React.Component {
} }
render() { render() {
debugger
if (!this.props.data || this.props.data.length === 0) { if (!this.props.data || this.props.data.length === 0) {
return <Empty emptyText={this.emptyText} />; return <Empty emptyText={this.emptyText} />;
} }
......
...@@ -2,9 +2,9 @@ import React from 'react'; ...@@ -2,9 +2,9 @@ import React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { isJSON } from '../../../../utils/utils';
import commonStyles from '../common.less'; import commonStyles from '../common.less';
import styles from './index.less'; import styles from './index.less';
import { isJSON } from '../../../../utils/utils';
export class NoticeContent { export class NoticeContent {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
...@@ -24,7 +24,6 @@ const Notice = ({ message, confirmRead, config, handlerSysDetail }) => { ...@@ -24,7 +24,6 @@ const Notice = ({ message, confirmRead, config, handlerSysDetail }) => {
: message.infoContent; : message.infoContent;
const goPath = item => { const goPath = item => {
// eslint-disable-next-line no-debugger // eslint-disable-next-line no-debugger
debugger;
// eslint-disable-next-line no-debugger // eslint-disable-next-line no-debugger
confirmRead(false, [message.id]); confirmRead(false, [message.id]);
handlerSysDetail && handlerSysDetail(message); handlerSysDetail && handlerSysDetail(message);
......
...@@ -3,6 +3,8 @@ import 'kit_logger'; ...@@ -3,6 +3,8 @@ import 'kit_logger';
import _ from 'lodash'; import _ from 'lodash';
import MqttClient from 'mqtt-client'; import MqttClient from 'mqtt-client';
import { noticeService } from '../../api';
import { isJSON } from '../../utils/utils';
import { import {
DEFAULT_KEEPLIVE, DEFAULT_KEEPLIVE,
DEFAULT_MQTT_PATH, DEFAULT_MQTT_PATH,
...@@ -22,8 +24,7 @@ import { ...@@ -22,8 +24,7 @@ import {
VIDEO_LEVEL, VIDEO_LEVEL,
} from './constants'; } from './constants';
import createMessage from './message'; import createMessage from './message';
import { noticeService } from '../../api';
import { isJSON } from '../../utils/utils';
/* eslint-disable */ /* eslint-disable */
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const Logger = logger('mqtt'); const Logger = logger('mqtt');
...@@ -508,7 +509,6 @@ class Notifier { ...@@ -508,7 +509,6 @@ class Notifier {
'request.preventCache': Date.now(), 'request.preventCache': Date.now(),
}).then(res => { }).then(res => {
if (res) { if (res) {
debugger
const result = { const result = {
totalCount: res.totalRcdNum, totalCount: res.totalRcdNum,
messages: (Array.isArray(res.getMe) ? res.getMe: []) .map(this.parseHisToMessage.bind(this)), messages: (Array.isArray(res.getMe) ? res.getMe: []) .map(this.parseHisToMessage.bind(this)),
......
...@@ -15,6 +15,7 @@ const pkg = require('../../../package.json'); ...@@ -15,6 +15,7 @@ const pkg = require('../../../package.json');
const config = require('../../../config/config'); const config = require('../../../config/config');
const defaultSetting = config.layout; const defaultSetting = config.layout;
function App(props) { function App(props) {
console.log(dyRoutes(props.menu || []).routes)
return ( return (
<> <>
<Helmet <Helmet
......
...@@ -6,7 +6,14 @@ import React, { ...@@ -6,7 +6,14 @@ import React, {
useState, useState,
} from 'react'; } from 'react';
import { Anchor, Button, Popover, Radio, Result, Spin } from 'antd'; import {
Anchor,
Button,
Popover,
Radio,
Result,
Spin,
} from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { dom } from 'kit_utils'; import { dom } from 'kit_utils';
...@@ -17,7 +24,10 @@ import RightContent from '@/components/GlobalHeader/RightContent'; ...@@ -17,7 +24,10 @@ import RightContent from '@/components/GlobalHeader/RightContent';
import { Panel } from '@/components/SliderPanel'; import { Panel } from '@/components/SliderPanel';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import Authorized from '@/utils/Authorized'; import Authorized from '@/utils/Authorized';
import { findPathByLeafId, getBaseName } from '@/utils/utils'; import {
findPathByLeafId,
getBaseName,
} from '@/utils/utils';
import { import {
LeftOutlined, LeftOutlined,
LoadingOutlined, LoadingOutlined,
...@@ -723,7 +733,6 @@ const BasicLayout = props => { ...@@ -723,7 +733,6 @@ const BasicLayout = props => {
}; };
const handleUpdateCurrentIndex = index => { const handleUpdateCurrentIndex = index => {
debugger
props.updateCurrentIndex(index); props.updateCurrentIndex(index);
window.share && window.share.event.emit('trigger:updateMenuIndex', index); window.share && window.share.event.emit('trigger:updateMenuIndex', index);
} }
...@@ -942,10 +951,9 @@ const BasicLayout = props => { ...@@ -942,10 +951,9 @@ const BasicLayout = props => {
)} )}
openKeys={[...openKeys]} openKeys={[...openKeys]}
menuProps={{ menuProps={{
forceSubMenuRender: false, forceSubMenuRender: true,
onClick: ({ item, key, keyPath, domEvent }) => { onClick: ({ item, key, keyPath, domEvent }) => {
debugger // console.log(item)
console.log(item)
domEvent.persist(); domEvent.persist();
const keyField = key.indexOf('/') > -1 ? 'path' : 'key'; const keyField = key.indexOf('/') > -1 ? 'path' : 'key';
const config = findPathByLeafId( const config = findPathByLeafId(
...@@ -954,7 +962,7 @@ const BasicLayout = props => { ...@@ -954,7 +962,7 @@ const BasicLayout = props => {
'', '',
keyField, keyField,
); );
console.log(config) // console.log(key, keyPath)
props.updateComplexConfig({}); props.updateComplexConfig({});
props.updateComplexPathName(null); props.updateComplexPathName(null);
if (config && config.routes && config.routes.length > 0) { if (config && config.routes && config.routes.length > 0) {
...@@ -963,9 +971,10 @@ const BasicLayout = props => { ...@@ -963,9 +971,10 @@ const BasicLayout = props => {
history.push(config.routes[0].path); history.push(config.routes[0].path);
} }
props.updateSelectedKeys(config.key); props.updateSelectedKeys(item.props.eventKey);
props.updatePathname(config.key); props.updatePathname(item.props.eventKey);
forceRender(); forceRender();
// window.history.pushState(null, '', '/civbase' + config.path);
}, },
onOpenChange: openKeys => { onOpenChange: openKeys => {
props.updateOpenKeys(openKeys.length > 0 ? openKeys : []); props.updateOpenKeys(openKeys.length > 0 ? openKeys : []);
......
import 'kit_logger'; import 'kit_logger';
import { import {
addGlobalUncaughtErrorHandler, addGlobalUncaughtErrorHandler,
initGlobalState, initGlobalState,
registerMicroApps, registerMicroApps,
runAfterFirstMounted, runAfterFirstMounted,
setDefaultMountApp, setDefaultMountApp,
start, start,
} from 'qiankun'; } from 'qiankun';
import micorConfig, { genActiveRule } from '../config/micor'; import micorConfig, { genActiveRule } from '../config/micor';
...@@ -41,18 +41,11 @@ export const initMicroApps = (loader, store) => { ...@@ -41,18 +41,11 @@ export const initMicroApps = (loader, store) => {
products.push({ products.push({
name: item.PackageName, name: item.PackageName,
entry: "//" + window.location.host + (`/${item.PackageName}`), entry: "//" + window.location.host + (`/${item.PackageName}`),
// item.RouteUrl.replace(
// // eslint-disable-next-line no-template-curly-in-string
// 'localhost:${port}',
// window.location.host,
// ) + (item.PackageName.indexOf('civweb4') > -1 ? `/${item.PackageName}` : `/${item.PackageName}`),
container: '#micro-container', container: '#micro-container',
activeRule: genActiveRule(`/civbase/${item.PackageName}`), activeRule: genActiveRule(`/civbase/${item.PackageName}`),
props: item.DefaultSetting props: item.DefaultSetting
}) })
}); });
console.log("products", products);
const entrys = const entrys =
process.env.NODE_ENV !== 'production' ? process.env.NODE_ENV !== 'production' ?
micorConfig.dev : micorConfig.dev :
...@@ -114,7 +107,7 @@ export const initMicroApps = (loader, store) => { ...@@ -114,7 +107,7 @@ export const initMicroApps = (loader, store) => {
}, },
singular: true, singular: true,
scopedCSS: true, scopedCSS: true,
prefetch: false, prefetch: 'all',
// 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 =>
...@@ -131,6 +124,7 @@ export const initMicroApps = (loader, store) => { ...@@ -131,6 +124,7 @@ export const initMicroApps = (loader, store) => {
url.indexOf('restapi.amap.com') !== -1 || url.indexOf('restapi.amap.com') !== -1 ||
url.indexOf('webapi.amap.com') !== -1 || url.indexOf('webapi.amap.com') !== -1 ||
url.indexOf('webapi.amap.com/count') !== -1 || url.indexOf('webapi.amap.com/count') !== -1 ||
url.indexOf('restapi.amap.com/v3') !== -1 ||
url.indexOf('api.map.baidu.com') !== -1 || url.indexOf('api.map.baidu.com') !== -1 ||
url.indexOf('map.baidu.com') !== -1 || url.indexOf('map.baidu.com') !== -1 ||
url.indexOf('pv.sohu.com') !== -1 || url.indexOf('pv.sohu.com') !== -1 ||
......
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