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
bcc5dbef
Commit
bcc5dbef
authored
Feb 14, 2022
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复civweb4首页跳转
parent
3bd4c46d
Pipeline
#43885
passed with stages
in 4 minutes 9 seconds
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
318 additions
and
250 deletions
+318
-250
config.js
config/config.js
+10
-7
proxy.js
config/proxy.js
+1
-1
DevCompileDonePlugin.js
internals/webpack/plugins/DevCompileDonePlugin.js
+9
-9
api.mock.js
mock/api.mock.js
+190
-186
cert.pem
server/cert/cert.pem
+25
-0
key.pem
server/cert/key.pem
+28
-0
index.js
server/index.js
+10
-9
addDevMiddlewares.js
server/middlewares/addDevMiddlewares.js
+23
-10
server.js
server/server.js
+17
-21
app.js
src/app.js
+1
-1
index.js
src/components/Container/index.js
+0
-2
ExtendRightContent.js
src/components/GlobalHeader/ExtendRightContent.js
+4
-4
No files found.
config/config.js
View file @
bcc5dbef
const
proxy
=
require
(
'./proxy'
);
const
slash
=
require
(
'slash2'
);
const
slash
=
require
(
'slash2'
);
const
proxy
=
require
(
'./proxy'
);
const
defaultSetting
=
require
(
'./defaultSetting'
);
const
defaultSetting
=
require
(
'./defaultSetting'
);
const
{
REACT_APP_ENV
}
=
process
.
env
;
const
{
REACT_APP_ENV
}
=
process
.
env
;
module
.
exports
=
{
module
.
exports
=
{
...
@@ -12,7 +11,7 @@ module.exports = {
...
@@ -12,7 +11,7 @@ module.exports = {
layout
:
{
layout
:
{
siderWidth
:
'145px'
,
siderWidth
:
'145px'
,
locale
:
true
,
locale
:
true
,
...
defaultSetting
...
defaultSetting
,
},
},
fastRefresh
:
true
,
fastRefresh
:
true
,
useHash
:
true
,
useHash
:
true
,
...
@@ -30,7 +29,11 @@ module.exports = {
...
@@ -30,7 +29,11 @@ module.exports = {
ignoreMomentLocale
:
true
,
ignoreMomentLocale
:
true
,
nodeModulesTransform
:
{
nodeModulesTransform
:
{
type
:
'none'
,
type
:
'none'
,
exclude
:
[
'@wisdom-map/arcgismap'
,
'@wisdom-map/arcgismap/lib/arcgisapi'
,
'swagger-ui-react'
],
exclude
:
[
'@wisdom-map/arcgismap'
,
'@wisdom-map/arcgismap/lib/arcgisapi'
,
'swagger-ui-react'
,
],
},
},
proxy
:
proxy
[
REACT_APP_ENV
||
'dev'
],
proxy
:
proxy
[
REACT_APP_ENV
||
'dev'
],
// openAPI: {
// openAPI: {
...
@@ -73,10 +76,10 @@ module.exports = {
...
@@ -73,10 +76,10 @@ module.exports = {
modifyVars
:
{
modifyVars
:
{
// hack: `true; @import "~@/global.less";`,
// hack: `true; @import "~@/global.less";`,
'@ant-prefix'
:
'panda-console-base'
,
'@ant-prefix'
:
'panda-console-base'
,
'@iconPrefixCls'
:
'panda-console-base-icon'
'@iconPrefixCls'
:
'panda-console-base-icon'
,
},
},
javascriptEnabled
:
true
javascriptEnabled
:
true
,
},
},
workerLoader
:
{}
workerLoader
:
{}
,
// esbuild: {}
// esbuild: {}
};
};
config/proxy.js
View file @
bcc5dbef
/* eslint-disable */
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const
proxyURL
=
'https://
work.panda-water.cn
'
;
const
proxyURL
=
'https://
panda-water.com
'
;
module
.
exports
=
{
module
.
exports
=
{
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
...
...
internals/webpack/plugins/DevCompileDonePlugin.js
View file @
bcc5dbef
...
@@ -40,22 +40,22 @@ class DevCompileDonePlugin {
...
@@ -40,22 +40,22 @@ class DevCompileDonePlugin {
.
filter
(
Boolean
)
.
filter
(
Boolean
)
.
join
(
'
\
n'
),
.
join
(
'
\
n'
),
);
);
process
.
send
&&
process
.
send
({
process
.
send
&&
type
:
'DONE'
process
.
send
({
});
type
:
'DONE'
,
});
isFirstCompile
=
false
;
isFirstCompile
=
false
;
}
}
// this.opts.onCompileDone && this.opts.onCompileDone({
// this.opts.onCompileDone && this.opts.onCompileDone({
// isFirstCompile,
// isFirstCompile,
// stats,
// stats,
// });
// });
if
(
isFirstCompile
)
{
if
(
isFirstCompile
)
{
isFirstCompile
=
false
;
isFirstCompile
=
false
;
// process.send({
// process.send({
// type: 'DONE'
// type: 'DONE'
// })
// })
}
}
});
});
}
}
...
...
mock/api.mock.js
View file @
bcc5dbef
// @ts-ignore
// @ts-ignore
//import { Request, Response } from 'express';
//
import { Request, Response } from 'express';
module
.
exports
=
{
module
.
exports
=
{
'GET /api/currentUser'
:
(
req
,
res
)
=>
{
'GET /api/currentUser'
:
(
req
,
res
)
=>
{
res
res
.
status
(
200
).
send
({
.
status
(
200
)
name
:
'韩磊'
,
.
send
({
avatar
:
''
,
name
:
'韩磊'
,
userid
:
'de98FdAe-1fcA-985e-7EDe-A79E8FFA854E'
,
avatar
:
''
,
email
:
'a.lrl@mffnge.ph'
,
userid
:
'de98FdAe-1fcA-985e-7EDe-A79E8FFA854E'
,
signature
:
'般立层子米基断北得行办的七住。'
,
email
:
'a.lrl@mffnge.ph'
,
title
:
'做众亲子所化下基计称数照。'
,
signature
:
'般立层子米基断北得行办的七住。'
,
group
:
'服务技术部'
,
title
:
'做众亲子所化下基计称数照。'
,
tags
:
[
group
:
'服务技术部'
,
{
key
:
1
,
label
:
'IT 互联网'
},
tags
:
[
{
key
:
2
,
label
:
'海纳百川'
},
{
key
:
1
,
label
:
'IT 互联网'
},
{
key
:
3
,
label
:
'川妹子'
},
{
key
:
2
,
label
:
'海纳百川'
},
{
key
:
4
,
label
:
'海纳百川'
},
{
key
:
3
,
label
:
'川妹子'
},
{
key
:
5
,
label
:
'算法工程师'
},
{
key
:
4
,
label
:
'海纳百川'
},
{
key
:
6
,
label
:
'很有想法的'
},
{
key
:
5
,
label
:
'算法工程师'
},
{
key
:
7
,
label
:
'IT 互联网'
},
{
key
:
6
,
label
:
'很有想法的'
},
{
key
:
8
,
label
:
'专注设计'
},
{
key
:
7
,
label
:
'IT 互联网'
},
],
{
key
:
8
,
label
:
'专注设计'
},
notifyCount
:
93
,
],
unreadCount
:
70
,
notifyCount
:
93
,
country
:
'韩国'
,
unreadCount
:
70
,
access
:
'众因变无律周体严器外在不根。'
,
country
:
'韩国'
,
geographic
:
{
access
:
'众因变无律周体严器外在不根。'
,
province
:
{
label
:
'新疆维吾尔自治区'
,
key
:
9
},
geographic
:
{
city
:
{
label
:
'珠海市'
,
key
:
10
},
province
:
{
label
:
'新疆维吾尔自治区'
,
key
:
9
},
},
city
:
{
label
:
'珠海市'
,
key
:
10
},
address
:
'河南省 南阳市 桐柏县'
,
},
phone
:
'11283974361'
,
address
:
'河南省 南阳市 桐柏县'
,
});
phone
:
'11283974361'
,
});
},
},
'GET /api/notices'
:
(
req
,
res
)
=>
{
'GET /api/notices'
:
(
req
,
res
)
=>
{
res
res
.
status
(
200
).
send
({
.
status
(
200
)
data
:
[
.
send
({
{
data
:
[
id
:
'26fd5659-6818-c9Ee-CdCF-Bc69FBf157F5'
,
{
extra
:
'FreB'
,
id
:
'26fd5659-6818-c9Ee-CdCF-Bc69FBf157F5'
,
key
:
12
,
extra
:
'FreB'
,
read
:
true
,
key
:
12
,
avatar
:
'https://avatars1.githubusercontent.com/u/8186664?s=40&v=4'
,
read
:
true
,
title
:
'万究改非走命造之可从参打最。'
,
avatar
:
'https://avatars1.githubusercontent.com/u/8186664?s=40&v=4'
,
status
:
'default'
,
title
:
'万究改非走命造之可从参打最。'
,
datetime
:
'1980-10-19'
,
status
:
'default'
,
description
:
'有青设加包阶手别无往向导年关参才管复。'
,
datetime
:
'1980-10-19'
,
type
:
'notification'
,
description
:
'有青设加包阶手别无往向导年关参才管复。'
,
},
type
:
'notification'
,
{
},
id
:
'8b52fe55-2887-AC2B-Db2B-1fD3Ea9beeE2'
,
{
extra
:
'9uQO$Jh'
,
id
:
'8b52fe55-2887-AC2B-Db2B-1fD3Ea9beeE2'
,
key
:
13
,
extra
:
'9uQO$Jh'
,
read
:
false
,
key
:
13
,
avatar
:
read
:
false
,
'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png'
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png'
,
title
:
'往条再习价机指北很些参转派。'
,
title
:
'往条再习价机指北很些参转派。'
,
status
:
'error'
,
status
:
'error'
,
datetime
:
'1988-12-24'
,
datetime
:
'1988-12-24'
,
description
:
'很格连然实验九一眼到号适。'
,
description
:
'很格连然实验九一眼到号适。'
,
type
:
'notification'
,
type
:
'notification'
,
},
},
{
{
id
:
'Ff1312b7-34bd-d9FC-FC2a-a34D6eCEEbD2'
,
id
:
'Ff1312b7-34bd-d9FC-FC2a-a34D6eCEEbD2'
,
extra
:
'(Oe6'
,
extra
:
'(Oe6'
,
key
:
14
,
key
:
14
,
read
:
false
,
read
:
false
,
avatar
:
avatar
:
'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png'
,
'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png'
,
title
:
'广级般千此这于节相制认要特革。'
,
title
:
'广级般千此这于节相制认要特革。'
,
status
:
'processing'
,
status
:
'processing'
,
datetime
:
'1975-10-13'
,
datetime
:
'1975-10-13'
,
description
:
'亲适地新水那图广候今属活法低正求。'
,
description
:
'亲适地新水那图广候今属活法低正求。'
,
type
:
'notification'
,
type
:
'notification'
,
},
},
{
{
id
:
'B353AcAB-d9FE-DCa5-309E-AfF43bC2DD92'
,
id
:
'B353AcAB-d9FE-DCa5-309E-AfF43bC2DD92'
,
extra
:
'Z@Z^ij'
,
extra
:
'Z@Z^ij'
,
key
:
15
,
key
:
15
,
read
:
false
,
read
:
false
,
avatar
:
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
title
:
'家不发经得器形如布力到议调采引。'
,
title
:
'家不发经得器形如布力到议调采引。'
,
status
:
'processing'
,
status
:
'processing'
,
datetime
:
'1996-11-23'
,
datetime
:
'1996-11-23'
,
description
:
'后何完十称利任里石须连因思。'
,
description
:
'后何完十称利任里石须连因思。'
,
type
:
'notification'
,
type
:
'notification'
,
},
},
{
{
id
:
'4fe4A8b3-B6E5-dC3d-3864-f4da4fcF1d3f'
,
id
:
'4fe4A8b3-B6E5-dC3d-3864-f4da4fcF1d3f'
,
extra
:
'b7OW'
,
extra
:
'b7OW'
,
key
:
16
,
key
:
16
,
read
:
false
,
read
:
false
,
avatar
:
avatar
:
'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png'
,
'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png'
,
title
:
'观现太照号真安第活增日离准说写为这。'
,
title
:
'观现太照号真安第活增日离准说写为这。'
,
status
:
'processing'
,
status
:
'processing'
,
datetime
:
'1975-04-07'
,
datetime
:
'1975-04-07'
,
description
:
'厂克装省期那两八在别真通新府。'
,
description
:
'厂克装省期那两八在别真通新府。'
,
type
:
'notification'
,
type
:
'notification'
,
},
},
{
{
id
:
'4Eefc7d3-eec7-eEC6-fDf5-EF9AF8C158B7'
,
id
:
'4Eefc7d3-eec7-eEC6-fDf5-EF9AF8C158B7'
,
extra
:
't5%p'
,
extra
:
't5%p'
,
key
:
17
,
key
:
17
,
read
:
true
,
read
:
true
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png'
,
avatar
:
title
:
'图面济习果然选打儿往并进美。'
,
'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png'
,
status
:
'default'
,
title
:
'图面济习果然选打儿往并进美。'
,
datetime
:
'1981-07-21'
,
status
:
'default'
,
description
:
'之记议按气不人劳清且院日。'
,
datetime
:
'1981-07-21'
,
type
:
'notification'
,
description
:
'之记议按气不人劳清且院日。'
,
},
type
:
'notification'
,
{
},
id
:
'e368F8dc-B236-04Ab-cB05-B1D6A541Da2C'
,
{
extra
:
'GuGb5'
,
id
:
'e368F8dc-B236-04Ab-cB05-B1D6A541Da2C'
,
key
:
18
,
extra
:
'GuGb5'
,
read
:
true
,
key
:
18
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
read
:
true
,
title
:
'海准到团权题时住称即按常火制。'
,
avatar
:
status
:
'error'
,
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
datetime
:
'2014-09-18'
,
title
:
'海准到团权题时住称即按常火制。'
,
description
:
'入者属时思因至小文保美管好已电音可上。'
,
status
:
'error'
,
type
:
'notification'
,
datetime
:
'2014-09-18'
,
},
description
:
'入者属时思因至小文保美管好已电音可上。'
,
{
type
:
'notification'
,
id
:
'bD4EfbDc-5337-eec7-DaDB-FedABF06F884'
,
},
extra
:
'^#(b'
,
{
key
:
19
,
id
:
'bD4EfbDc-5337-eec7-DaDB-FedABF06F884'
,
read
:
false
,
extra
:
'^#(b'
,
avatar
:
''
,
key
:
19
,
title
:
'次话织才决色素马型规毛员准越住林。'
,
read
:
false
,
status
:
'warning'
,
avatar
:
''
,
datetime
:
'1998-09-05'
,
title
:
'次话织才决色素马型规毛员准越住林。'
,
description
:
'化属新道商步响酸非历至该风四维属需。'
,
status
:
'warning'
,
type
:
'notification'
,
datetime
:
'1998-09-05'
,
},
description
:
'化属新道商步响酸非历至该风四维属需。'
,
{
type
:
'notification'
,
id
:
'ab69bfDD-f535-ADbb-Cf3d-E5CA7DbEF2ad'
,
},
extra
:
'(DAIG'
,
{
key
:
20
,
id
:
'ab69bfDD-f535-ADbb-Cf3d-E5CA7DbEF2ad'
,
read
:
true
,
extra
:
'(DAIG'
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
key
:
20
,
title
:
'流较术合联风样少节打体中门八。'
,
read
:
true
,
status
:
'default'
,
avatar
:
datetime
:
'1996-01-03'
,
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
description
:
'改原非还着取步效只华农名社。'
,
title
:
'流较术合联风样少节打体中门八。'
,
type
:
'notification'
,
status
:
'default'
,
},
datetime
:
'1996-01-03'
,
{
description
:
'改原非还着取步效只华农名社。'
,
id
:
'418C7EeA-fDbC-843d-F76D-2BC23A9e8eF2'
,
type
:
'notification'
,
extra
:
'suvQ$O'
,
},
key
:
21
,
{
read
:
false
,
id
:
'418C7EeA-fDbC-843d-F76D-2BC23A9e8eF2'
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
extra
:
'suvQ$O'
,
title
:
'为公受条总此类影所提无受万南非事具。'
,
key
:
21
,
status
:
'default'
,
read
:
false
,
datetime
:
'1975-12-08'
,
avatar
:
description
:
'间特快装铁我品给求六片由青信区。'
,
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
type
:
'notification'
,
title
:
'为公受条总此类影所提无受万南非事具。'
,
},
status
:
'default'
,
{
datetime
:
'1975-12-08'
,
id
:
'ac9F7ae7-F3d2-bC14-cC5D-a38Fca151Eac'
,
description
:
'间特快装铁我品给求六片由青信区。'
,
extra
:
'HIX9@)'
,
type
:
'notification'
,
key
:
22
,
},
read
:
true
,
{
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
id
:
'ac9F7ae7-F3d2-bC14-cC5D-a38Fca151Eac'
,
title
:
'展生起而两边断指内布数点铁压具。'
,
extra
:
'HIX9@)'
,
status
:
'processing'
,
key
:
22
,
datetime
:
'2004-11-21'
,
read
:
true
,
description
:
'观织回走此性写任主在设新力小这想。'
,
avatar
:
type
:
'notification'
,
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'
,
},
title
:
'展生起而两边断指内布数点铁压具。'
,
{
status
:
'processing'
,
id
:
'c41f9c0A-cBDc-F07F-B85D-5DC3d0574d77'
,
datetime
:
'2004-11-21'
,
extra
:
'Bwlc!Bq'
,
description
:
'观织回走此性写任主在设新力小这想。'
,
key
:
23
,
type
:
'notification'
,
read
:
true
,
},
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png'
,
{
title
:
'或内局段花革器规关价快和口音安京。'
,
id
:
'c41f9c0A-cBDc-F07F-B85D-5DC3d0574d77'
,
status
:
'default'
,
extra
:
'Bwlc!Bq'
,
datetime
:
'1994-08-07'
,
key
:
23
,
description
:
'有增史子太采只月则全革百习风此强。'
,
read
:
true
,
type
:
'notification'
,
avatar
:
},
'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png'
,
],
title
:
'或内局段花革器规关价快和口音安京。'
,
total
:
63
,
status
:
'default'
,
success
:
false
,
datetime
:
'1994-08-07'
,
});
description
:
'有增史子太采只月则全革百习风此强。'
,
type
:
'notification'
,
},
],
total
:
63
,
success
:
false
,
});
},
},
};
};
server/cert/cert.pem
0 → 100644
View file @
bcc5dbef
-----BEGIN CERTIFICATE-----
MIIETDCCArSgAwIBAgIQKxt9OXlPUkk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9hD8fzeOWdYO
SKA5eDjd+ut+HiSfItqgM+8t1RxPxsYlGeOMp65cKt1NaIdRxQHwESGba6H0sez7
p5Eu95pXp/BUy7lnvqudXgfTAUpSzxpSG+49hzMKuN/CAZyFNp52qDDHpRtuxHns
q0pjGHBOC2aYc1eXNgn2g0wMDp3+BYh9yjoWNkMKqY7hpcB9PY5zw0u8R0wG8z+n
d915bZT3FKjx5sxmDmVaDNdARwi9ExqFvIs+hje1IUrszR7pnT7EUcUOhWNbKKkf
jRH3sy+TyA+TsYm1AAcnnY/Ne/Ce4OcMGcYwjb1L/gu/PWoup4f/GIziEw8cbPti
1+Exm+AOSjcSspPPfQmpHqupNaDJSjo6xYX3wn3oIb34WvH8INL3liiVedn+LTy4
-----END CERTIFICATE-----
server/cert/key.pem
0 → 100644
View file @
bcc5dbef
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8oD87P1rPqQRn
nNJnK5+lhe3mA4CcT9/xVjaE/eDskNEIyTrDReCSYYMnjmdj19VWELKiqDxsiQtw
tu+nr38jk7xp7RNvJL3maAF+WGCyqNKTJ2GfttmYB7k51m/4m0YGN3bZgOnOx4rT
PVWRfGAQApg6zGzNoKPpqS0CFNC8RHYNgajRdozrZI5A0viouf3tmuD6DwZKNL8K
D+9v6Tja0KCE6bQqzboIMGX3YPCXmah0SR/N7CuMLZY2V62Jm6mxfqmudEMFwZge
X5L/4P+IcJK7zciTGiiuwiKAaVJqH+dV962wocFNcVedLEvzpP0wDVHllxehW/Vx
Zk2KIwxrAgMBAAECggEAUdiitz2dVN/85kyYy2WVZ0g+2wCIDMtn25tSGtDiiSOp
YEuYsOSgNkQTmdVjrWIY0rh6GrQvS9UHXsgyIyu2WiSfq8LQHPjvYYudokoM41j3
zhxXcurvbdVkHOGcQl51uvrUGjqiuTPCXDiP6YnzUN8fWNwdFfhvR1M+EVog3J+F
RpSavm+SCOkyqCBWgQDb/p59kvlISJuDXK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2,11 @@ const { join } = require('path');
...
@@ -2,11 +2,11 @@ const { join } = require('path');
const
{
writeFileSync
,
mkdirSync
,
existsSync
}
=
require
(
'fs'
);
const
{
writeFileSync
,
mkdirSync
,
existsSync
}
=
require
(
'fs'
);
const
rimraf
=
require
(
'rimraf'
);
const
rimraf
=
require
(
'rimraf'
);
const
serveStatic
=
require
(
'serve-static'
);
const
serveStatic
=
require
(
'serve-static'
);
const
{
resolve
}
=
require
(
'path'
);
const
{
portfinder
,
chalk
,
delay
}
=
require
(
'@umijs/utils'
);
const
argv
=
require
(
'./argv'
);
const
argv
=
require
(
'./argv'
);
const
setup
=
require
(
'./middlewares/frontendMiddleware'
);
const
setup
=
require
(
'./middlewares/frontendMiddleware'
);
const
pkg
=
require
(
'../package.json'
);
const
pkg
=
require
(
'../package.json'
);
const
{
resolve
}
=
require
(
'path'
);
const
{
portfinder
,
chalk
,
delay
}
=
require
(
'@umijs/utils'
);
const
config
=
require
(
'../config/config'
);
const
config
=
require
(
'../config/config'
);
const
mockMiddewares
=
require
(
'./mock'
);
const
mockMiddewares
=
require
(
'./mock'
);
const
emitter
=
require
(
'./event'
);
const
emitter
=
require
(
'./event'
);
...
@@ -30,9 +30,9 @@ const { getSchema } = require('./openapi');
...
@@ -30,9 +30,9 @@ const { getSchema } = require('./openapi');
const
isHTTPS
=
process
.
env
.
HTTPS
||
(
argv
&&
argv
.
https
);
const
isHTTPS
=
process
.
env
.
HTTPS
||
(
argv
&&
argv
.
https
);
await
delay
(
500
);
await
delay
(
500
);
const
absNodeModulesPath
=
process
.
cwd
()
+
'/node_modules'
;
const
absNodeModulesPath
=
`
${
process
.
cwd
()}
/node_modules`
;
const
openAPIFilesPath
=
join
(
absNodeModulesPath
,
'civ_open_api'
);
const
openAPIFilesPath
=
join
(
absNodeModulesPath
,
'civ_open_api'
);
const
loadEnv
=
()
=>
{
const
loadEnv
=
()
=>
{
const
basePath
=
join
(
process
.
cwd
(),
'.env'
);
const
basePath
=
join
(
process
.
cwd
(),
'.env'
);
const
localPath
=
`
${
basePath
}
.local`
;
const
localPath
=
`
${
basePath
}
.local`
;
...
@@ -41,7 +41,7 @@ const { getSchema } = require('./openapi');
...
@@ -41,7 +41,7 @@ const { getSchema } = require('./openapi');
};
};
loadEnv
();
loadEnv
();
// const absNodeModulesPath = cwd + '/node_modules';
// const absNodeModulesPath = cwd + '/node_modules';
try
{
try
{
if
(
existsSync
(
openAPIFilesPath
))
{
if
(
existsSync
(
openAPIFilesPath
))
{
...
@@ -58,7 +58,7 @@ const { getSchema } = require('./openapi');
...
@@ -58,7 +58,7 @@ const { getSchema } = require('./openapi');
headers
:
{
headers
:
{
'access-control-allow-origin'
:
'*'
,
'access-control-allow-origin'
:
'*'
,
},
},
port
:
port
,
port
,
beforeMiddlewares
:
[
beforeMiddlewares
:
[
(
config
.
mock
||
process
.
env
.
MOCK
!==
'none'
)
&&
mockMiddewares
,
(
config
.
mock
||
process
.
env
.
MOCK
!==
'none'
)
&&
mockMiddewares
,
],
],
...
@@ -67,6 +67,7 @@ const { getSchema } = require('./openapi');
...
@@ -67,6 +67,7 @@ const { getSchema } = require('./openapi');
...(
config
.
devServer
||
{}),
...(
config
.
devServer
||
{}),
});
});
setup
(
setup
(
server
.
app
,
server
.
app
,
{
{
...
@@ -76,14 +77,14 @@ const { getSchema } = require('./openapi');
...
@@ -76,14 +77,14 @@ const { getSchema } = require('./openapi');
config
,
config
,
{
{
port
,
port
,
homename
homename
,
}
}
,
);
);
emitter
.
on
(
'onDevCompileDone'
,
async
()
=>
{
emitter
.
on
(
'onDevCompileDone'
,
async
()
=>
{
try
{
try
{
const
openAPIConfig
=
config
.
openAPI
;
const
openAPIConfig
=
config
.
openAPI
;
if
(
openAPIConfig
&&
openAPIConfig
.
schemaPath
)
{
if
(
openAPIConfig
&&
openAPIConfig
.
schemaPath
)
{
const
openAPIJson
=
await
getSchema
(
openAPIConfig
.
schemaPath
);
const
openAPIJson
=
await
getSchema
(
openAPIConfig
.
schemaPath
);
writeFileSync
(
writeFileSync
(
join
(
openAPIFilesPath
,
'civ-plugins_openapi.json'
),
join
(
openAPIFilesPath
,
'civ-plugins_openapi.json'
),
...
...
server/middlewares/addDevMiddlewares.js
View file @
bcc5dbef
...
@@ -6,7 +6,9 @@ const DevCompileDonePlugin = require('../../internals/webpack/plugins/DevCompile
...
@@ -6,7 +6,9 @@ const DevCompileDonePlugin = require('../../internals/webpack/plugins/DevCompile
const
emitter
=
require
(
'../event'
);
const
emitter
=
require
(
'../event'
);
function
getIgnoredWatchRegExp
()
{
function
getIgnoredWatchRegExp
()
{
// const absOutputPath = winPath(path.join(process.cwd(), outputPath));
// const absOutputPath = winPath(path.join(process.cwd(), outputPath));
return
process
.
env
.
WATCH_IGNORED
===
'none'
?
undefined
:
new
RegExp
(
process
.
env
.
WATCH_IGNORED
||
`(node_modules)`
)
return
process
.
env
.
WATCH_IGNORED
===
'none'
?
undefined
:
new
RegExp
(
process
.
env
.
WATCH_IGNORED
||
`(node_modules)`
);
}
}
function
createWebpackMiddleware
(
compiler
,
output
,
config
)
{
function
createWebpackMiddleware
(
compiler
,
output
,
config
)
{
return
webpackDevMiddleware
(
compiler
,
{
return
webpackDevMiddleware
(
compiler
,
{
...
@@ -21,35 +23,46 @@ function createWebpackMiddleware(compiler, output, config) {
...
@@ -21,35 +23,46 @@ function createWebpackMiddleware(compiler, output, config) {
});
});
}
}
module
.
exports
=
function
addDevMiddlewares
(
app
,
webpackConfig
,
config
,
{
port
=
8080
,
hostname
=
'127.0.0.1'
})
{
module
.
exports
=
function
addDevMiddlewares
(
if
(
!
config
.
mfsu
)
{
app
,
webpackConfig
,
config
,
{
port
=
8080
,
hostname
=
'127.0.0.1'
},
)
{
if
(
!
config
.
mfsu
)
{
webpackConfig
.
plugins
.
push
(
webpackConfig
.
plugins
.
push
(
new
DevCompileDonePlugin
({
new
DevCompileDonePlugin
({
port
:
(
webpackConfig
.
devServer
&&
webpackConfig
.
devServer
.
port
)
?
(
webpackConfig
.
devServer
.
port
||
port
):
port
,
port
:
hostname
:
(
webpackConfig
.
devServer
&&
webpackConfig
.
devServer
.
hostname
)
?
(
webpackConfig
.
devServer
.
hostname
||
'127.0.0.1'
):
hostname
,
webpackConfig
.
devServer
&&
webpackConfig
.
devServer
.
port
?
webpackConfig
.
devServer
.
port
||
port
:
port
,
hostname
:
webpackConfig
.
devServer
&&
webpackConfig
.
devServer
.
hostname
?
webpackConfig
.
devServer
.
hostname
||
'127.0.0.1'
:
hostname
,
onCompileDone
({
isFirstCompile
,
stats
})
{
onCompileDone
({
isFirstCompile
,
stats
})
{
if
(
isFirstCompile
)
{
if
(
isFirstCompile
)
{
emitter
.
emit
(
'onDevCompileDone'
,
{
isFirstCompile
,
stats
});
emitter
.
emit
(
'onDevCompileDone'
,
{
isFirstCompile
,
stats
});
}
}
},
},
onCompileFail
(
error
)
{
onCompileFail
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
},
},
}),
}),
)
)
;
}
}
const
compiler
=
webpack
(
webpackConfig
);
const
compiler
=
webpack
(
webpackConfig
);
const
middleware
=
createWebpackMiddleware
(
const
middleware
=
createWebpackMiddleware
(
compiler
,
compiler
,
webpackConfig
.
output
,
webpackConfig
.
output
,
config
,
config
,
);
);
// console.log(middleware.compiler.watching)
app
.
use
(
middleware
);
app
.
use
(
middleware
);
app
.
use
(
webpackHotMiddleware
(
compiler
));
app
.
use
(
webpackHotMiddleware
(
compiler
));
const
fs
=
middleware
.
context
.
outputFileSystem
;
const
fs
=
middleware
.
context
.
outputFileSystem
;
app
.
get
(
'*'
,
(
req
,
res
)
=>
{
app
.
get
(
'*'
,
(
req
,
res
)
=>
{
...
...
server/server.js
View file @
bcc5dbef
const
{
const
{
lodash
,
portfinder
,
createDebug
}
=
require
(
'@umijs/utils'
);
lodash
,
portfinder
,
createDebug
,
}
=
require
(
'@umijs/utils'
);
const
express
=
require
(
'express'
);
const
express
=
require
(
'express'
);
const
{
createProxyMiddleware
}
=
require
(
'http-proxy-middleware'
);
const
{
createProxyMiddleware
}
=
require
(
'http-proxy-middleware'
);
const
spdy
=
require
(
'spdy'
);
const
spdy
=
require
(
'spdy'
);
const
compress
=
require
(
'compression'
);
const
compress
=
require
(
'compression'
);
const
url
=
require
(
'url'
);
const
url
=
require
(
'url'
);
const
http
=
require
(
'http'
);
const
http
=
require
(
'http'
);
// const https = require('https');
// const https = require('https');
const
sockjs
=
require
(
'sockjs'
);
const
sockjs
=
require
(
'sockjs'
);
const
debug
=
createDebug
(
'umi:server:Server'
);
const
debug
=
createDebug
(
'umi:server:Server'
);
const
getCredentials
=
(
options
)
=>
{};
const
defaultOpts
=
{
const
defaultOpts
=
{
afterMiddlewares
:
[],
afterMiddlewares
:
[],
beforeMiddlewares
:
[],
beforeMiddlewares
:
[],
compilerMiddleware
:
null
,
compilerMiddleware
:
null
,
compress
:
true
,
compress
:
true
,
https
:
!!
process
.
env
.
HTTP2
?
true
:
!!
process
.
env
.
HTTPS
,
https
:
process
.
env
.
HTTP2
?
true
:
!!
process
.
env
.
HTTPS
,
onListening
:
argv
=>
argv
,
onListening
:
argv
=>
argv
,
onConnection
:
()
=>
{},
onConnection
:
()
=>
{},
onConnectionClose
:
()
=>
{},
onConnectionClose
:
()
=>
{},
...
@@ -46,20 +43,18 @@ class Server {
...
@@ -46,20 +43,18 @@ class Server {
if
(
this
.
opts
.
https
)
{
if
(
this
.
opts
.
https
)
{
const
credential
=
getCredentials
(
this
.
opts
);
const
credential
=
getCredentials
(
this
.
opts
);
if
(
typeof
this
.
opts
.
https
===
'object'
&&
this
.
opts
.
https
.
spdy
)
{
if
(
typeof
this
.
opts
.
https
===
'object'
&&
this
.
opts
.
https
.
spdy
)
{
logger
.
warn
(
console
.
warn
(
'Providing custom spdy server options is deprecated and will be removed in the next major version.'
,
'Providing custom spdy server options is deprecated and will be removed in the next major version.'
,
);
);
return
credential
;
return
credential
;
}
else
{
return
{
spdy
:
{
protocols
:
[
'h2'
,
'http/1.1'
],
},
...
credential
,
};
}
}
return
{
spdy
:
{
protocols
:
[
'h2'
,
'http/1.1'
],
},
...
credential
,
};
}
}
return
;
}
}
setupFeatures
()
{
setupFeatures
()
{
...
@@ -118,6 +113,7 @@ class Server {
...
@@ -118,6 +113,7 @@ class Server {
deleteRoutes
()
{
deleteRoutes
()
{
let
startIndex
=
null
;
let
startIndex
=
null
;
let
endIndex
=
null
;
let
endIndex
=
null
;
// eslint-disable-next-line no-underscore-dangle
this
.
app
.
_router
.
stack
.
forEach
((
item
,
index
)
=>
{
this
.
app
.
_router
.
stack
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
===
'PROXY_START'
)
startIndex
=
index
;
if
(
item
.
name
===
'PROXY_START'
)
startIndex
=
index
;
if
(
item
.
name
===
'PROXY_END'
)
endIndex
=
index
;
if
(
item
.
name
===
'PROXY_END'
)
endIndex
=
index
;
...
@@ -128,6 +124,7 @@ class Server {
...
@@ -128,6 +124,7 @@ class Server {
.
join
(
', '
)}
`
,
.
join
(
', '
)}
`
,
);
);
if
(
startIndex
!==
null
&&
endIndex
!==
null
)
{
if
(
startIndex
!==
null
&&
endIndex
!==
null
)
{
// eslint-disable-next-line no-underscore-dangle
this
.
app
.
_router
.
stack
.
splice
(
startIndex
,
endIndex
-
startIndex
+
1
);
this
.
app
.
_router
.
stack
.
splice
(
startIndex
,
endIndex
-
startIndex
+
1
);
}
}
debug
(
debug
(
...
@@ -155,7 +152,7 @@ class Server {
...
@@ -155,7 +152,7 @@ class Server {
};
};
}
else
{
}
else
{
proxyOptions
=
{
proxyOptions
=
{
...(
proxy
&&
proxy
[
context
]
||
{}),
...(
(
proxy
&&
proxy
[
context
])
||
{}),
context
:
correctedContext
,
context
:
correctedContext
,
};
};
}
}
...
@@ -179,11 +176,11 @@ class Server {
...
@@ -179,11 +176,11 @@ class Server {
:
proxyConfig
.
target
;
:
proxyConfig
.
target
;
const
realUrl
=
new
URL
(
req
.
url
||
''
,
target
).
href
||
''
;
const
realUrl
=
new
URL
(
req
.
url
||
''
,
target
).
href
||
''
;
proxyRes
.
headers
[
'x-real-url'
]
=
realUrl
;
proxyRes
.
headers
[
'x-real-url'
]
=
realUrl
;
proxyConfig
.
onProxyRes
&&
proxyConfig
.
onProxyRes
(
proxyRes
,
req
,
res
);
proxyConfig
.
onProxyRes
&&
proxyConfig
.
onProxyRes
(
proxyRes
,
req
,
res
);
},
},
});
});
}
}
return
;
};
};
let
startIndex
=
null
;
let
startIndex
=
null
;
...
@@ -330,4 +327,4 @@ class Server {
...
@@ -330,4 +327,4 @@ class Server {
}
}
}
}
module
.
exports
=
Server
module
.
exports
=
Server
;
\ No newline at end of file
src/app.js
View file @
bcc5dbef
...
@@ -33,7 +33,7 @@ const unlisten = history.listen(location => {
...
@@ -33,7 +33,7 @@ const unlisten = history.listen(location => {
if
(
location
.
pathname
.
indexOf
(
'/civbase/user/login'
)
>
-
1
)
{
if
(
location
.
pathname
.
indexOf
(
'/civbase/user/login'
)
>
-
1
)
{
initGlobalConfig
();
initGlobalConfig
();
}
}
})
})
;
event
.
on
(
'event:logout'
,
()
=>
{
event
.
on
(
'event:logout'
,
()
=>
{
store
.
dispatch
(
actionCreators
.
logout
())
store
.
dispatch
(
actionCreators
.
logout
())
...
...
src/components/Container/index.js
View file @
bcc5dbef
...
@@ -13,8 +13,6 @@ export default class Container extends React.Component {
...
@@ -13,8 +13,6 @@ export default class Container extends React.Component {
oms
(
event
)
{
oms
(
event
)
{
const
omsUrl
=
`
${
MaintenanceHost
}
/
${
MaintenancePath
}
`
;
const
omsUrl
=
`
${
MaintenanceHost
}
/
${
MaintenancePath
}
`
;
console
.
log
(
omsUrl
)
window
.
open
(
omsUrl
,
'_blank'
);
window
.
open
(
omsUrl
,
'_blank'
);
}
}
...
...
src/components/GlobalHeader/ExtendRightContent.js
View file @
bcc5dbef
...
@@ -122,13 +122,13 @@ const GlobalHeaderRight = props => {
...
@@ -122,13 +122,13 @@ const GlobalHeaderRight = props => {
const
goHome
=
event
=>
{
const
goHome
=
event
=>
{
event
.
stopPropagation
();
event
.
stopPropagation
();
cons
t
url
=
_
.
isString
(
props
.
global
.
get
(
'homepage'
))
le
t
url
=
_
.
isString
(
props
.
global
.
get
(
'homepage'
))
?
props
.
global
.
get
(
'homepage'
)
?
props
.
global
.
get
(
'homepage'
)
:
props
.
global
.
get
(
'homepage.url'
);
:
props
.
global
.
get
(
'homepage.url'
);
if
(
!
props
.
global
.
get
(
'home'
))
{
url
=
`civweb4/
${
url
}
`
}
window
.
share
.
event
.
emit
(
'goHome'
,
`/
${
url
}
`
);
window
.
share
.
event
.
emit
(
'goHome'
,
`/
${
url
}
`
);
// setDefaultMountApp()
// 1、window.globalConfig product
// 2. 拿到当前product
url
?
(
url
?
(
window
.
share
.
event
.
emit
(
'listenerMointer'
,
{
window
.
share
.
event
.
emit
(
'listenerMointer'
,
{
label
:
'首页'
,
label
:
'首页'
,
...
...
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