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
May 24, 2021
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 {
dev
:
[
{
name
:
'civ_monitor'
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
1
/civ_monitor`
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
2
/civ_monitor`
,
container
:
'#micro-container'
,
activeRule
:
genActiveRule
(
'/civbase/civ_monitor'
),
},
{
name
:
'civ_water'
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
3
/civ_water`
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
1
/civ_water`
,
container
:
'#micro-container'
,
activeRule
:
genActiveRule
(
'/civbase/civ_water'
),
},
...
...
src/components/Authorized/CheckPermissions.js
View file @
b9347ed4
...
...
@@ -38,6 +38,7 @@ const checkPermissions = (
validate
:
true
,
};
}
debugger
const
findIndex
=
data
.
findIndex
(
item
=>
item
.
path
===
authority
.
path
);
if
(
findIndex
>
-
1
)
{
return
{
...
...
src/layouts/BasicLayout.js
View file @
b9347ed4
...
...
@@ -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
=>
{
...
...
src/micro.js
View file @
b9347ed4
...
...
@@ -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'
);
src/utils/routes.js
View file @
b9347ed4
...
...
@@ -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
)
{
...
...
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