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

fix: close micro perfetch

parent 653671f0
Pipeline #28164 skipped with stages
...@@ -5,13 +5,13 @@ export default { ...@@ -5,13 +5,13 @@ export default {
dev: [ dev: [
{ {
name: 'civ_monitor', name: 'civ_monitor',
entry: `//${window.location.hostname}:8081/civ_monitor`, entry: `//${window.location.hostname}:8082/civ_monitor`,
container: '#micro-container', container: '#micro-container',
activeRule: genActiveRule('/civbase/civ_monitor'), activeRule: genActiveRule('/civbase/civ_monitor'),
}, },
{ {
name: 'civ_water', name: 'civ_water',
entry: `//${window.location.hostname}:8083/civ_water`, entry: `//${window.location.hostname}:8081/civ_water`,
container: '#micro-container', container: '#micro-container',
activeRule: genActiveRule('/civbase/civ_water'), activeRule: genActiveRule('/civbase/civ_water'),
}, },
......
...@@ -38,6 +38,7 @@ const checkPermissions = ( ...@@ -38,6 +38,7 @@ 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 {
......
...@@ -944,7 +944,8 @@ const BasicLayout = props => { ...@@ -944,7 +944,8 @@ const BasicLayout = props => {
menuProps={{ menuProps={{
forceSubMenuRender: false, forceSubMenuRender: false,
onClick: ({ item, key, keyPath, domEvent }) => { onClick: ({ item, key, keyPath, domEvent }) => {
debugger
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(
...@@ -953,6 +954,7 @@ const BasicLayout = props => { ...@@ -953,6 +954,7 @@ const BasicLayout = props => {
'', '',
keyField, keyField,
); );
console.log(config)
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) {
...@@ -961,8 +963,8 @@ const BasicLayout = props => { ...@@ -961,8 +963,8 @@ const BasicLayout = props => {
history.push(config.routes[0].path); history.push(config.routes[0].path);
} }
props.updateSelectedKeys(key); props.updateSelectedKeys(config.key);
props.updatePathname(key); props.updatePathname(config.key);
forceRender(); forceRender();
}, },
onOpenChange: openKeys => { onOpenChange: openKeys => {
......
...@@ -114,7 +114,7 @@ export const initMicroApps = (loader, store) => { ...@@ -114,7 +114,7 @@ export const initMicroApps = (loader, store) => {
}, },
singular: true, singular: true,
scopedCSS: true, scopedCSS: true,
// prefetch: 'all', prefetch: false,
// 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 =>
...@@ -169,7 +169,7 @@ export const defaultApp = () => { ...@@ -169,7 +169,7 @@ export const defaultApp = () => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const config = createStoreage.get('globalConfig'); const config = createStoreage.get('globalConfig');
if (config && config.token) { if (config && config.token) {
debugger
// const startWith = config.homepage ? config.homepage.split('/') : []; // const startWith = config.homepage ? config.homepage.split('/') : [];
// console.log(findPathByLeafId(config.homepage, '', 'url')) // console.log(findPathByLeafId(config.homepage, '', 'url'))
const basePath = const basePath =
...@@ -285,4 +285,4 @@ window.app.define('rc-tree', require.context('../node_modules/rc-tree/lib', true ...@@ -285,4 +285,4 @@ window.app.define('rc-tree', require.context('../node_modules/rc-tree/lib', true
window.app.define('rc-tree-select', require.context('../node_modules/rc-tree-select/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js'); window.app.define('rc-tree-select', require.context('../node_modules/rc-tree-select/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-trigger', require.context('../node_modules/rc-trigger/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js'); window.app.define('rc-trigger', require.context('../node_modules/rc-trigger/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-upload', require.context('../node_modules/rc-upload/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js'); window.app.define('rc-upload', require.context('../node_modules/rc-upload/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-virtual-list', require.context('../node_modules/rc-virtual-list/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js'); window.app.define('rc-virtual-list', require.context('../node_modules/rc-virtual-list/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
\ No newline at end of file
...@@ -19,7 +19,7 @@ export const guid = function(prefix) { ...@@ -19,7 +19,7 @@ export const guid = function(prefix) {
date = Math.floor(date / 16); date = Math.floor(date / 16);
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16); return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
}); });
return prefix + uuid.replace(/-/g, '.'); return prefix + uuid.replace(/-/g, '.') + new Date().getTime();
}; };
function isAbsoluteURL(url) { function isAbsoluteURL(url) {
......
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