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
ed789439
Commit
ed789439
authored
Dec 24, 2020
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: delete webpack build chunkhash
parent
785cade3
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
95 additions
and
61 deletions
+95
-61
proxy.dev.js
config/dist/proxy.dev.js
+6
-6
proxy.js
config/proxy.js
+6
-6
webpack.base.babel.dev.js
internals/webpack/dist/webpack.base.babel.dev.js
+3
-1
webpack.prod.babel.dev.js
internals/webpack/dist/webpack.prod.babel.dev.js
+2
-2
webpack.base.babel.js
internals/webpack/webpack.base.babel.js
+2
-0
webpack.prod.babel.js
internals/webpack/webpack.prod.babel.js
+2
-2
index.js
src/components/NoticeIcon/Templates/Alarm/index.js
+1
-0
index.js
src/components/NoticeIcon/Templates/Case/index.js
+1
-0
index.js
src/components/NoticeIcon/Templates/Notice/index.js
+1
-0
index.less
src/components/SliderPanel/index.less
+1
-1
micro.dev.js
src/dist/micro.dev.js
+10
-1
UserLayout.less
src/layouts/UserLayout.less
+1
-1
micro.js
src/micro.js
+8
-1
login.dev.js
src/pages/user/login/dist/login.dev.js
+50
-40
login.js
src/pages/user/login/login.js
+1
-0
No files found.
config/dist/proxy.dev.js
View file @
ed789439
...
...
@@ -4,9 +4,9 @@ module.exports = {
dev
:
{
'/CityInterface'
:
{
// target: 'http://192.168.10.151:8055',
target
:
'https://panda-water.cn'
,
// target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
//
target: 'https://panda-water.com',
target
:
'https://panda-water.com'
,
// target: 'http://192.168.10.150:8050',
// target: 'http://192.168.19.103:8112',
// target: 'http://192.168.12.8:8098',
...
...
@@ -21,9 +21,9 @@ module.exports = {
},
'/cityinterface'
:
{
// target: 'http://192.168.10.150:8050',
target
:
'https://panda-water.cn'
,
//
target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
//
target: 'https://panda-water.com',
target
:
'https://panda-water.com'
,
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
changeOrigin
:
true
,
...
...
@@ -38,9 +38,9 @@ module.exports = {
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
// target: 'http://192.168.10.151:8055',
target
:
'https://panda-water.cn'
,
//
target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
//
target: 'https://panda-water.com',
target
:
'https://panda-water.com'
,
// target: 'http://192.168.10.150:8050',
changeOrigin
:
true
,
headers
:
{
...
...
config/proxy.js
View file @
ed789439
...
...
@@ -2,10 +2,10 @@ module.exports = {
dev
:
{
'/CityInterface'
:
{
// target: 'http://192.168.10.151:8055',
target
:
'https://panda-water.cn'
,
//
target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
//
target: 'https://panda-water.com',
target
:
'https://panda-water.com'
,
// target: 'http://192.168.10.150:8050',
// target: 'http://192.168.19.103:8112',
// target: 'http://192.168.12.8:8098',
...
...
@@ -20,9 +20,9 @@ module.exports = {
},
'/cityinterface'
:
{
// target: 'http://192.168.10.150:8050',
target
:
'https://panda-water.cn'
,
//
target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
//
target: 'https://panda-water.com',
target
:
'https://panda-water.com'
,
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
changeOrigin
:
true
,
...
...
@@ -37,9 +37,9 @@ module.exports = {
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
// target: 'http://192.168.10.151:8055',
target
:
'https://panda-water.cn'
,
//
target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
//
target: 'https://panda-water.com',
target
:
'https://panda-water.com'
,
// target: 'http://192.168.10.150:8050',
changeOrigin
:
true
,
headers
:
{
...
...
internals/webpack/dist/webpack.base.babel.dev.js
View file @
ed789439
...
...
@@ -97,7 +97,9 @@ module.exports = function (options) {
loader
:
'url-loader'
,
options
:
{
// Inline files smaller than 10 kB
limit
:
10
*
1024
limit
:
10
*
1024
,
name
:
'[name].[ext]'
,
outputPath
:
'images/'
}
}
// {
// loader: 'image-webpack-loader',
...
...
internals/webpack/dist/webpack.prod.babel.dev.js
View file @
ed789439
...
...
@@ -22,8 +22,8 @@ module.exports = require('./webpack.base.babel')({
entry
:
[
require
.
resolve
(
'react-app-polyfill/ie11'
),
path
.
join
(
process
.
cwd
(),
'src/app.js'
)],
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
output
:
{
filename
:
'[name].
[chunkhash].
js'
,
chunkFilename
:
'[name].
[chunkhash].
chunk.js'
filename
:
'[name].js'
,
chunkFilename
:
'[name].chunk.js'
},
optimization
:
{
minimize
:
true
,
...
...
internals/webpack/webpack.base.babel.js
View file @
ed789439
...
...
@@ -113,6 +113,8 @@ module.exports = options => ({
options
:
{
// Inline files smaller than 10 kB
limit
:
10
*
1024
,
name
:
'[name].[ext]'
,
outputPath
:
'images/'
},
},
// {
...
...
internals/webpack/webpack.prod.babel.js
View file @
ed789439
...
...
@@ -18,8 +18,8 @@ module.exports = require('./webpack.base.babel')({
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
output
:
{
filename
:
'[name].
[chunkhash].
js'
,
chunkFilename
:
'[name].
[chunkhash].
chunk.js'
,
filename
:
'[name].js'
,
chunkFilename
:
'[name].chunk.js'
,
},
optimization
:
{
...
...
src/components/NoticeIcon/Templates/Alarm/index.js
View file @
ed789439
...
...
@@ -28,6 +28,7 @@ export class AlarmContent {
const
Alarm
=
({
message
,
confirmRead
})
=>
{
let
alarmContent
=
message
.
infoContent
;
const
goPath
=
item
=>
{
debugger
confirmRead
(
false
,
[
message
.
id
]);
const
widgetID
=
"widget_city_综合运营_管网监控_实时监控_报警监控"
;
const
webPath
=
item
.
webPath
||
"product/scada/AlertMonitoring/AlertMonitoring"
;
...
...
src/components/NoticeIcon/Templates/Case/index.js
View file @
ed789439
...
...
@@ -25,6 +25,7 @@ export class CaseContent {
const
Case
=
({
message
,
confirmRead
})
=>
{
let
caseContent
=
message
.
infoContent
;
const
goPath
=
(
item
)
=>
{
debugger
confirmRead
(
false
,[
message
.
id
]);
const
messageType
=
item
.
messType
;
let
label
=
''
,
widgetID
=
''
;
...
...
src/components/NoticeIcon/Templates/Notice/index.js
View file @
ed789439
...
...
@@ -22,6 +22,7 @@ export class NoticeContent {
const
Notice
=
({
message
,
confirmRead
})
=>
{
let
noticeContent
=
message
.
infoContent
;
const
goPath
=
(
item
)
=>
{
debugger
confirmRead
(
false
,[
message
.
id
]);
let
webPath
=
item
.
webPath
||
"product/notification/HistoryNotice/HistoryNotice"
;
window
.
share
.
event
.
emit
(
"listenerMointer"
,
{
...
...
src/components/SliderPanel/index.less
View file @
ed789439
...
...
@@ -19,7 +19,7 @@
display: block;
flex: 1 1 0%;
position: absolute;
z-index:
15
;
z-index:
30
;
background-color: rgba(0,21,41, 0.94);
min-width: 500px;
max-width: 640px;
...
...
src/dist/micro.dev.js
View file @
ed789439
...
...
@@ -37,7 +37,7 @@ var initMicroApps = function initMicroApps(loader) {
item
.
props
=
{
emitter
:
window
.
share
.
event
,
baseRoot
:
item
.
name
,
globalConfig
:
JSON
.
stringify
(
createStoreage
.
get
(
'globalConfig'
)
||
{}
),
globalConfig
:
createStoreage
.
get
(
'globalConfig'
),
XMLHttpRequest
:
window
.
XMLHttpRequest
};
return
item
;
...
...
@@ -67,6 +67,15 @@ var initMicroApps = function initMicroApps(loader) {
}],
afterUnmount
:
[
function
(
app
)
{}]
});
var
_initGlobalState
=
(
0
,
_qiankun
.
initGlobalState
)({
globalConfig
:
createStoreage
.
get
(
'globalConfig'
)
}),
setGlobalState
=
_initGlobalState
.
setGlobalState
;
setGlobalState
({
globalConfig
:
createStoreage
.
get
(
'globalConfig'
)
});
(
0
,
_qiankun
.
start
)({
sandbox
:
{
experimentalStyleIsolation
:
true
,
...
...
src/layouts/UserLayout.less
View file @
ed789439
...
...
@@ -438,7 +438,7 @@
position: absolute;
top: calc(50% - 32px);
right: -27px;
z-index:
99
;
z-index:
20
;
line-height: 46px;
border-width: 9px 9px 9px 20px;
border-style: solid;
...
...
src/micro.js
View file @
ed789439
import
{
addGlobalUncaughtErrorHandler
,
initGlobalState
,
registerMicroApps
,
runAfterFirstMounted
,
setDefaultMountApp
,
...
...
@@ -34,7 +35,7 @@ export const initMicroApps = loader => {
item
.
props
=
{
emitter
:
window
.
share
.
event
,
baseRoot
:
item
.
name
,
globalConfig
:
JSON
.
stringify
(
createStoreage
.
get
(
'globalConfig'
)
||
{}
),
globalConfig
:
createStoreage
.
get
(
'globalConfig'
),
XMLHttpRequest
:
window
.
XMLHttpRequest
,
};
return
item
;
...
...
@@ -94,6 +95,12 @@ export const initMicroApps = loader => {
],
},
);
const
{
setGlobalState
}
=
initGlobalState
({
globalConfig
:
createStoreage
.
get
(
'globalConfig'
)
});
setGlobalState
({
globalConfig
:
createStoreage
.
get
(
'globalConfig'
)
})
start
({
sandbox
:
{
experimentalStyleIsolation
:
true
,
...
...
src/pages/user/login/dist/login.dev.js
View file @
ed789439
...
...
@@ -30,7 +30,7 @@ var REDIRECT_URI = "https://panda-water.com/civbase/user/login";
var
Login
=
/*#__PURE__*/
function
()
{
function
Login
(
props
,
callback
)
{
function
Login
(
props
,
callback
,
isInit
)
{
_classCallCheck
(
this
,
Login
);
this
.
events
=
window
.
share
.
event
;
...
...
@@ -40,7 +40,11 @@ function () {
this
.
history
=
props
.
history
;
this
.
callback
=
callback
;
this
.
hasTry
=
false
;
if
(
isInit
)
{
this
.
init
();
}
//
}
_createClass
(
Login
,
[{
...
...
@@ -75,6 +79,7 @@ function () {
},
{
key
:
"getToweb"
,
value
:
function
getToweb
(
token
)
{
debugger
;
this
.
globalConfig
.
token
=
token
;
var
self
=
this
;
Http
.
getUserInfo
({
...
...
@@ -85,6 +90,8 @@ function () {
},
{
ignoreSite
:
true
}).
then
(
function
(
response
)
{
debugger
;
if
(
response
&&
!
response
.
errMsg
)
{
self
.
globalConfig
.
userInfo
=
{};
...
...
@@ -126,7 +133,9 @@ function () {
if
(
this
.
globalConfig
.
userInfo
.
Groups
&&
this
.
globalConfig
.
userInfo
.
Groups
.
length
)
{
this
.
globalConfig
.
userInfo
.
Groups
.
forEach
(
function
(
group
)
{
if
(
group
.
industry
&&
_this2
.
globalConfig
.
userInfo
.
Industries
.
indexOf
(
group
.
industry
)
<
0
)
_this2
.
globalConfig
.
userInfo
.
Industries
.
push
(
group
.
industry
);
if
(
group
.
industry
&&
_this2
.
globalConfig
.
userInfo
.
Industries
.
indexOf
(
group
.
industry
)
<
0
)
{
_this2
.
globalConfig
.
userInfo
.
Industries
.
push
(
group
.
industry
);
}
});
}
...
...
@@ -160,7 +169,7 @@ function () {
style
:
self
.
globalConfig
.
style
});
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
self
.
getProjectItems
().
then
(
function
(
res
)
{
self
.
getProjectItems
().
then
(
function
()
{
window
.
subSysCfg
=
{};
response
.
forEach
(
function
(
item
)
{
window
.
subSysCfg
[
item
.
client
]
=
item
;
...
...
@@ -179,14 +188,15 @@ function () {
if
(
self
.
globalConfig
.
userInfo
.
site
&&
self
.
globalConfig
.
userInfo
.
site
.
length
>
0
)
{
Http
.
getWebSiteConfig
({
client
:
self
.
globalConfig
.
client
,
token
:
token
,
'request.preventCache'
:
Date
.
now
()
token
:
token
},
{
ignoreSite
:
true
ignoreSite
:
true
,
'request.preventCache'
:
Date
.
now
()
}).
then
(
function
(
response
)
{
debugger
;
if
(
response
&&
response
.
length
>
0
)
{
debugger
;
var
mainConf
=
response
.
shift
();
if
(
mainConf
.
homepage
)
self
.
globalConfig
.
homepage
=
mainConf
.
homepage
;
if
(
mainConf
.
bannerLogo
)
self
.
globalConfig
.
bannerLogo
=
mainConf
.
bannerLogo
;
...
...
@@ -196,16 +206,16 @@ function () {
if
(
mainConf
.
shortcutIcon
)
self
.
globalConfig
.
shortcutIcon
=
mainConf
.
shortcutIcon
;
}
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
console
.
log
(
"===loginSuccess==="
);
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
// console.log("===loginSuccess===")
getIndustry
?
self
.
events
.
emit
(
'toggleIndustry'
)
:
self
.
events
.
emit
(
'loginSuccess'
);
window
.
share
.
event
=
self
.
events
;
self
.
callback
&&
self
.
callback
();
});
}
else
{
//loginSuccess
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
console
.
log
(
"===loginSuccess==="
);
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
// console.log("===loginSuccess===")
getIndustry
?
self
.
events
.
emit
(
'toggleIndustry'
)
:
self
.
events
.
emit
(
'loginSuccess'
);
window
.
share
.
event
=
self
.
events
;
self
.
callback
&&
self
.
callback
();
...
...
@@ -474,6 +484,8 @@ function () {
cacheBust
:
true
,
ignoreSite
:
true
}).
then
(
function
(
response
)
{
debugger
;
if
(
response
&&
response
.
errMsg
)
{
this
.
globalConfig
.
userInfo
=
{};
...
...
@@ -503,8 +515,6 @@ function () {
},
{
key
:
"getUserInfoAndConfig"
,
value
:
function
getUserInfoAndConfig
(
failCallback
,
flag
,
industry
)
{
var
_this7
=
this
;
debugger
;
var
token
=
this
.
globalConfig
.
token
;
...
...
@@ -512,53 +522,53 @@ function () {
var
self
=
this
;
var
_industrySite
=
null
;
debugger
;
if
(
industry
)
{
debugger
;
var
userInfo
=
self
.
globalConfig
.
userInfo
&&
self
.
globalConfig
.
userInfo
.
Groups
&&
self
.
globalConfig
.
userInfo
.
Groups
instanceof
Array
?
self
.
globalConfig
.
userInfo
.
Groups
.
find
(
function
(
enter
)
{
return
enter
.
industry
===
industry
;
})
:
null
;
if
(
userInfo
)
{
self
.
globalConfig
.
userInfo
=
{
site
:
userInfo
.
site
?
userInfo
.
site
:
""
,
site
:
userInfo
.
site
?
userInfo
.
site
:
null
,
Groups
:
self
.
globalConfig
.
userInfo
.
Groups
};
_industrySite
=
userInfo
.
site
?
userInfo
.
site
:
null
;
_industrySite
=
userInfo
.
site
?
userInfo
.
site
:
null
;
// self.globalConfig.Industry = industry
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
}
}
else
if
(
!!
site
&&
self
.
isSignIn
)
{
self
.
globalConfig
.
userInfo
=
{
site
:
decodeURIComponent
((
0
,
_jsBase
.
decode
)(
site
)),
Groups
:
self
.
globalConfig
.
userInfo
&&
self
.
globalConfig
.
userInfo
.
Groups
&&
self
.
globalConfig
.
userInfo
.
Groups
instanceof
Array
?
self
.
globalConfig
.
userInfo
.
Groups
:
null
};
}
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
}
if
(
this
.
isSignIn
||
!!
industry
)
{
if
(
self
.
isSignIn
||
!!
industry
)
{
debugger
;
Http
.
getUserInfo
({
token
:
token
,
subOID
:
'subOID'
,
industry
:
industry
,
site
:
_industrySite
?
_industrySite
:
this
.
getLocalSiteBytoken
(
token
),
'request.preventCache'
:
Date
.
now
()
site
:
_industrySite
?
_industrySite
:
this
.
getLocalSiteBytoken
(
token
)
//self.globalConfig.userInfo.site ? self.globalConfig.userInfo.site: this.getLocalSiteBytoken(token),
//industrySite ? _industrySite : this.getLocalSiteBytoken(token),
},
{
ignoreSite
:
true
ignoreSite
:
true
,
'request.preventCache'
:
Date
.
now
()
}).
then
(
function
(
response
)
{
try
{
if
(
response
&&
!
response
.
errMsg
)
{
self
.
globalConfig
.
userInfo
=
response
;
// Object.assign(
// {},
// response,
// self.globalConfig.userInfo,
// {
// site: response.site === "" ? "": self.globalConfig.userInfo.site
// }
// );
debugger
;
if
(
response
&&
!
response
.
errMsg
)
{
self
.
globalConfig
.
userInfo
=
Object
.
assign
({},
response
,
self
.
globalConfig
.
userInfo
);
var
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
24
*
60
*
60
*
1000
);
// date = date.toGMTString();
var
encodeSite
=
(
0
,
_jsBase
.
encode
)(
encodeURIComponent
(
self
.
globalConfig
.
userInfo
.
site
));
var
encodeSite
=
(
0
,
_jsBase
.
encode
)(
encodeURIComponent
(
response
.
site
));
_jsCookie
[
"default"
].
set
(
"site"
,
encodeSite
,
{
expires
:
date
,
...
...
@@ -567,10 +577,8 @@ function () {
self
.
globalConfig
.
Industry
=
industry
;
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
var
loginSite
=
_this7
.
getLocalSites
();
loginSite
[
token
]
=
self
.
globalConfig
.
userInfo
.
site
;
// Cookie.set()
var
loginSite
=
{};
loginSite
[
token
]
=
response
.
site
;
// Cookie.set()
localStorage
.
setItem
(
"loginSite"
,
JSON
.
stringify
(
loginSite
));
self
.
writeLogs
();
...
...
@@ -617,7 +625,7 @@ function () {
},
{
key
:
"login"
,
value
:
function
login
(
usr
,
pwd
,
userPhone
,
isRememberPWD
)
{
var
_this
8
=
this
;
var
_this
7
=
this
;
this
.
events
.
removeAllListeners
(
'loginError'
);
var
self
=
this
;
...
...
@@ -635,6 +643,8 @@ function () {
},
{
ignoreSite
:
true
}).
then
(
function
(
response
)
{
debugger
;
if
(
response
&&
response
.
token
)
{
debugger
;
var
token
=
response
.
token
;
...
...
@@ -642,10 +652,10 @@ function () {
_jsCookie
[
"default"
].
set
(
'token'
,
token
);
var
exp
=
86400000
;
_this
8
.
globalConfig
.
token
=
token
;
_this
7
.
globalConfig
.
token
=
token
;
if
(
isRememberPWD
)
{
_jsCookie
[
"default"
].
set
(
_this
8
.
globalConfig
.
client
,
token
,
{
_jsCookie
[
"default"
].
set
(
_this
7
.
globalConfig
.
client
,
token
,
{
expires
:
exp
/
(
24
*
60
*
60
*
1000
),
path
:
'/'
});
...
...
@@ -656,10 +666,10 @@ function () {
});
}
_this
8
.
isSignIn
=
true
;
_this
8
.
updateConfig
&&
_this8
.
updateConfig
(
_this8
.
globalConfig
);
_this
7
.
isSignIn
=
true
;
_this
7
.
updateConfig
&&
_this7
.
updateConfig
(
_this7
.
globalConfig
);
_this
8
.
getUserInfoAndConfig
();
_this
7
.
getUserInfoAndConfig
();
}
else
{
self
.
hasTry
=
true
;
self
.
events
.
emit
(
'loginError'
,
response
);
...
...
src/pages/user/login/login.js
View file @
ed789439
...
...
@@ -190,6 +190,7 @@ class Login {
}).
then
(
response
=>
{
debugger
if
(
response
&&
response
.
length
>
0
)
{
debugger
var
mainConf
=
response
.
shift
();
if
(
mainConf
.
homepage
)
self
.
globalConfig
.
homepage
=
mainConf
.
homepage
;
...
...
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