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
936167e8
Commit
936167e8
authored
Mar 21, 2022
by
lihonglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加依赖
parent
ce9f5690
Pipeline
#46232
passed with stages
in 2 minutes 37 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
micro.js
src/micro.js
+12
-11
No files found.
src/micro.js
View file @
936167e8
...
...
@@ -44,7 +44,7 @@ export const initMicroApps = () => {
application
&&
Array
.
isArray
(
application
)
&&
application
.
length
>
0
&&
application
.
map
(
item
=>
{
if
(
item
.
PackageName
===
'report'
)
{
if
(
item
.
PackageName
===
'report'
)
{
products
.
push
({
name
:
item
.
PackageName
,
entry
:
item
.
RouteUrl
,
...
...
@@ -83,8 +83,8 @@ export const initMicroApps = () => {
// eslint-
// disable-next-line no-undef
globalConfig
:
/civweb4/
.
test
(
item
.
name
)
?
Object
.
assign
({},
config
,
{
homepage
:
config
.
homepage
?
config
.
homepage
.
replace
(
/civweb
\/
/
,
''
):
config
.
homepage
}):
config
,
homepage
:
config
.
homepage
?
config
.
homepage
.
replace
(
/civweb
\/
/
,
''
)
:
config
.
homepage
})
:
config
,
//createStoreage.get('globalConfig'),
XMLHttpRequest
:
window
.
XMLHttpRequest
,
};
...
...
@@ -115,7 +115,7 @@ export const initMicroApps = () => {
createStoreage
.
remove
(
`__PANDA_STORE__
${
location
.
hostname
}
`
)
},
],
afterUnmount
:
[
app
=>
{
}],
afterUnmount
:
[
app
=>
{
}],
},
);
const
globalStore
=
store
.
getState
().
toJS
();
...
...
@@ -221,7 +221,7 @@ export const defaultApp = () => {
// createStoreage.set('init_web4', true)
// }
// let homepage = config.homepage.replace('civweb4/', '');
const
url
=
!
config
.
home
?
`/civbase/civweb4/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
).
replace
(
/^civweb4
\/
/
,
''
)}
`
:
`/civbase/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
)}
`
;
const
url
=
!
config
.
home
?
`/civbase/civweb4/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
).
replace
(
/^civweb4
\/
/
,
''
)}
`
:
`/civbase/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
)}
`
;
setDefaultMountApp
(
url
);
// if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true);
}
...
...
@@ -238,17 +238,17 @@ export const defaultApp = () => {
window
.
app
=
{
modules
:
{},
require
:
function
(
request
,
method
)
{
if
(
request
!==
'.'
&&
this
.
modules
[
request
])
{
require
:
function
(
request
,
method
)
{
if
(
request
!==
'.'
&&
this
.
modules
[
request
])
{
console
.
log
(
'method'
,
method
);
return
_
.
isFunction
(
this
.
modules
[
request
])
?
this
.
modules
[
request
]():
_
.
isFunction
(
this
.
modules
[
request
][
method
])
&&
this
.
modules
[
request
][
method
]();
return
_
.
isFunction
(
this
.
modules
[
request
])
?
this
.
modules
[
request
]()
:
_
.
isFunction
(
this
.
modules
[
request
][
method
])
&&
this
.
modules
[
request
][
method
]();
}
if
(
request
===
'.'
)
{
if
(
request
===
'.'
)
{
return
}
return
_
.
isFunction
(
this
.
modules
[
request
])
&&
this
.
modules
[
request
]();
},
define
:
function
(
name
,
context
,
index
)
{
define
:
function
(
name
,
context
,
index
)
{
let
keys
=
context
.
keys
();
for
(
let
key
of
keys
)
{
let
parts
=
name
.
indexOf
(
'@'
)
>
-
1
?
[
name
,
...(
key
.
slice
(
1
).
split
(
'/'
))]
:
(
name
+
key
.
slice
(
1
)).
split
(
'/'
);
...
...
@@ -267,7 +267,7 @@ window.app = {
this
.
modules
[
name
]
=
this
.
modules
[
name
][
index
];
}
},
init
:
function
(
namespace
,
reducers
)
{
init
:
function
(
namespace
,
reducers
)
{
[
namespace
]
=
reducers
;
}
};
...
...
@@ -483,6 +483,7 @@ window.app.define('@wisdom-utils/components', require.context('../node_modules/@
window
.
app
.
define
(
'@ant-design/pro-form'
,
require
.
context
(
'../node_modules/@ant-design/pro-form/lib'
,
true
,
/^.
\/(
lib
\/)?[^\/]
+
\.
js$/
),
'index.js'
);
window
.
app
.
define
(
'classnames'
,
require
.
context
(
'classnames'
,
true
,
/^.
\/
index
\.
js$/
),
'index.js'
);
window
.
app
.
define
(
'@ant-design/icons'
,
require
.
context
(
'../node_modules/@ant-design/icons/lib'
,
true
,
/^.
\/(
lib
\/)?[^\/]
+
\.
js$/
),
'index.js'
);
...
...
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