Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
b9347ed4
Commit
b9347ed4
authored
3 years ago
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: close micro perfetch
parent
653671f0
Pipeline
#28164
skipped with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
10 deletions
+12
-10
micor.js
config/micor.js
+2
-2
CheckPermissions.js
src/components/Authorized/CheckPermissions.js
+1
-0
BasicLayout.js
src/layouts/BasicLayout.js
+5
-3
micro.js
src/micro.js
+3
-4
routes.js
src/utils/routes.js
+1
-1
No files found.
config/micor.js
View file @
b9347ed4
...
@@ -5,13 +5,13 @@ export default {
...
@@ -5,13 +5,13 @@ export default {
dev
:
[
dev
:
[
{
{
name
:
'civ_monitor'
,
name
:
'civ_monitor'
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
1
/civ_monitor`
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
2
/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
}
:808
3
/civ_water`
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
1
/civ_water`
,
container
:
'#micro-container'
,
container
:
'#micro-container'
,
activeRule
:
genActiveRule
(
'/civbase/civ_water'
),
activeRule
:
genActiveRule
(
'/civbase/civ_water'
),
},
},
...
...
This diff is collapsed.
Click to expand it.
src/components/Authorized/CheckPermissions.js
View file @
b9347ed4
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
src/layouts/BasicLayout.js
View file @
b9347ed4
...
@@ -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
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/micro.js
View file @
b9347ed4
...
@@ -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
This diff is collapsed.
Click to expand it.
src/utils/routes.js
View file @
b9347ed4
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment