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
6d1987d7
Commit
6d1987d7
authored
3 years ago
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复切换数据库后登陆BUG
parent
90f06049
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
8 deletions
+28
-8
config.js
config/config.js
+5
-5
micor.js
config/micor.js
+3
-3
index.js
server/index.js
+2
-0
app.js
src/app.js
+2
-0
BasicLayout.js
src/layouts/BasicLayout.js
+1
-0
Site.js
src/layouts/Site.js
+1
-0
login.js
src/pages/user/login/login.js
+14
-0
No files found.
config/config.js
View file @
6d1987d7
...
...
@@ -33,11 +33,11 @@ module.exports = {
exclude
:
[],
},
proxy
:
proxy
[
REACT_APP_ENV
||
'dev'
],
openAPI
:
{
requestLibPath
:
"import { request } from '@wisdom-utils/utils'"
,
schemaPath
:
'http://192.168.10.150:8777/Publish/OMS/swagger/v1/swagger.json'
,
mock
:
false
,
},
//
openAPI: {
//
requestLibPath: "import { request } from '@wisdom-utils/utils'",
//
schemaPath: 'http://192.168.10.150:8777/Publish/OMS/swagger/v1/swagger.json',
//
mock: false,
//
},
postcssLoader
:
{},
styleLoader
:
{},
cssLoader
:
{
...
...
This diff is collapsed.
Click to expand it.
config/micor.js
View file @
6d1987d7
...
...
@@ -4,10 +4,10 @@ export function genActiveRule(routerPrefix) {
export
default
{
dev
:
[
{
name
:
'civ_
monitor
'
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
0/civ_monitor
`
,
name
:
'civ_
energy
'
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
1/civ_energy
`
,
container
:
'#micro-container'
,
activeRule
:
'/civbase/civ_
monitor
'
,
activeRule
:
'/civbase/civ_
energy
'
,
},
{
name
:
'civ_water'
,
...
...
This diff is collapsed.
Click to expand it.
server/index.js
View file @
6d1987d7
...
...
@@ -83,11 +83,13 @@ const { getSchema } = require('./openapi');
emitter
.
on
(
'onDevCompileDone'
,
async
()
=>
{
try
{
const
openAPIConfig
=
config
.
openAPI
;
if
(
openAPIConfig
&&
openAPIConfig
.
schemaPath
)
{
const
openAPIJson
=
await
getSchema
(
openAPIConfig
.
schemaPath
);
writeFileSync
(
join
(
openAPIFilesPath
,
'civ-plugins_openapi.json'
),
JSON
.
stringify
(
openAPIJson
,
null
,
2
),
);
}
}
catch
(
error
)
{
console
.
error
(
error
);
}
...
...
This diff is collapsed.
Click to expand it.
src/app.js
View file @
6d1987d7
...
...
@@ -155,6 +155,8 @@ const initGlobalConfig = () => {
// eslint-disable-next-line no-shadow
updateConfig
:
data
=>
store
.
dispatch
(
actionCreators
.
getConfig
(
data
)),
isInit
:
false
,
logout
:
()
=>
store
.
dispatch
(
actionCreators
.
logout
())
},
()
=>
{
(
async
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/layouts/BasicLayout.js
View file @
6d1987d7
...
...
@@ -540,6 +540,7 @@ const BasicLayout = props => {
);
},
[
location
.
pathname
]);
const
handleSelectedKey
=
item
=>
{
debugger
const
config
=
findPathByLeafId
(
item
.
path
,
currentRoutes
.
routes
,
...
...
This diff is collapsed.
Click to expand it.
src/layouts/Site.js
View file @
6d1987d7
...
...
@@ -388,6 +388,7 @@ class Site {
beforeChangeCheck
(
token
,
site
)
{
// eslint-disable-next-line no-undef
debugger
appService
.
getUserInfo
({
token
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/login.js
View file @
6d1987d7
...
...
@@ -17,6 +17,7 @@ import { SlideVerify } from '@wisdom-utils/components';
const
Logger
=
logger
(
'login'
);
class
Login
{
constructor
(
props
,
callback
,
isInit
)
{
debugger
this
.
events
=
window
.
share
.
event
;
this
.
globalConfig
=
props
.
global
;
this
.
updateConfig
=
props
.
updateConfig
;
...
...
@@ -24,6 +25,7 @@ class Login {
this
.
history
=
props
.
history
;
this
.
callback
=
callback
;
this
.
hasTry
=
false
;
this
.
logout
=
props
.
logout
;
if
(
isInit
)
{
this
.
init
();
}
...
...
@@ -70,6 +72,7 @@ class Login {
this
.
globalConfig
.
token
=
token
;
const
self
=
this
;
// eslint-disable-next-line no-undef
appService
.
getUserInfo
({
token
:
this
.
globalConfig
.
token
,
...
...
@@ -79,6 +82,7 @@ class Login {
ignoreSite
:
true
,
})
.
then
(
response
=>
{
debugger
if
(
response
&&
!
response
.
errMsg
)
{
self
.
globalConfig
.
userInfo
=
{};
if
(
...
...
@@ -95,6 +99,16 @@ class Login {
);
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
self
.
getUserInfoAndConfig
();
}
else
{
self
.
logout
&&
self
.
logout
();
if
(
self
.
globalConfig
.
style
===
'ios'
&&
self
.
globalConfig
.
loginTemplate
===
'IOSCloud.html'
)
{
window
.
location
.
href
=
`
${
window
.
location
.
origin
}
`
;
return
false
;
}
window
.
location
.
reload
();
}
});
}
...
...
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