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

fix: close micro perfetch

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