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
873f5f91
Commit
873f5f91
authored
Sep 13, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref: 弥勒登录页添加跳转到 集成登录
parent
beb2947e
Pipeline
#92619
waiting for manual action with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
index.js
src/pages/user/login/template/project/miLe/index.js
+17
-14
No files found.
src/pages/user/login/template/project/miLe/index.js
View file @
873f5f91
import
styles
from
'./index.less'
import
React
,
{
forwardRef
,
useEffect
,
useRef
,
useState
}
from
'react'
;
import
React
,
{
forwardRef
,
useEffect
,
useRef
,
useState
}
from
'react'
;
import
LoginAction
from
'../../../login'
;
import
Account
from
'./useAccount'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
classnames
from
'classnames'
;
import
classnames
from
'classnames'
;
import
{
Modal
,
Popover
}
from
'antd'
;
import
{
Modal
,
Popover
}
from
'antd'
;
...
@@ -9,17 +6,20 @@ import { Helmet, HelmetProvider } from 'react-helmet-async';
...
@@ -9,17 +6,20 @@ import { Helmet, HelmetProvider } from 'react-helmet-async';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
useHistory
,
withRouter
}
from
'@wisdom-utils/runtime'
;
import
{
useHistory
,
withRouter
}
from
'@wisdom-utils/runtime'
;
import
{
actionCreators
}
from
'@/containers/App/store'
;
import
{
actionCreators
}
from
'@/containers/App/store'
;
import
QRCode
from
'qrcode.react'
;
import
defaultSetting
from
'../../../../../../../config/defaultSetting'
;
import
defaultSetting
from
'../../../../../../../config/defaultSetting'
;
import
{
defaultApp
}
from
'../../../../../../micro'
;
import
{
defaultApp
}
from
'../../../../../../micro'
;
import
logo
from
'./images/logo.png'
;
import
logo
from
'./images/logo.png'
;
import
logoBg
from
'./images/loginTitle.png'
import
logoBg
from
'./images/loginTitle.png'
;
import
Krpano
from
'../../../components/Krpano'
;
import
Krpano
from
'../../../components/Krpano'
;
import
QRCode
from
'qrcode.react'
;
import
Account
from
'./useAccount'
;
import
LoginAction
from
'../../../login'
;
import
styles
from
'./index.less'
;
const
renderQRCode
=
props
=>
{
const
renderQRCode
=
props
=>
{
const
qrcodes
=
props
?.
qrcode
?.
split
(
'|'
)
??
[];
const
qrcodes
=
props
?.
qrcode
?.
split
(
'|'
)
??
[];
if
(
qrcodes
.
length
>
0
&&
qrcodes
[
0
])
{
if
(
qrcodes
.
length
>
0
&&
qrcodes
[
0
])
{
le
t
value
=
qrcodes
[
0
].
replace
(
/{ip}/gi
,
props
.
ip
||
window
.
location
.
host
).
split
(
'='
)[
1
];
cons
t
value
=
qrcodes
[
0
].
replace
(
/{ip}/gi
,
props
.
ip
||
window
.
location
.
host
).
split
(
'='
)[
1
];
return
<
QRCode
value
=
{
value
}
/>
;
return
<
QRCode
value
=
{
value
}
/>
;
}
}
return
<
span
>
手持
APP
下载未配置
<
/span>
;
return
<
span
>
手持
APP
下载未配置
<
/span>
;
...
@@ -36,16 +36,11 @@ const MiLeLogin = forwardRef((props, _ref) => {
...
@@ -36,16 +36,11 @@ const MiLeLogin = forwardRef((props, _ref) => {
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
history
=
useHistory
();
const
history
=
useHistory
();
const
[
dateObj
,
setDateObj
]
=
useState
({});
const
[
dateObj
,
setDateObj
]
=
useState
({});
const
{
projectName
}
=
props
.
loginParams
const
{
projectName
}
=
props
.
loginParams
;
const
[
action
,
setAction
]
=
useState
(
const
[
action
,
setAction
]
=
useState
(()
=>
new
LoginAction
(
Object
.
assign
({},
props
,
{
history
}),
setVisible
,
false
));
()
=>
new
LoginAction
(
Object
.
assign
({},
props
,
{
history
}),
setVisible
,
false
),
);
const
qrcodes
=
props
.
global
?.
qrcode
?.
split
(
'|'
)
??
[];
const
qrcodes
=
props
.
global
?.
qrcode
?.
split
(
'|'
)
??
[];
const
logoImage
=
const
logoImage
=
props
?.
global
?.
logo
?.
indexOf
(
'CityTemp'
)
>
-
1
props
?.
global
?.
logo
?.
indexOf
(
'CityTemp'
)
>
-
1
?
props
?.
global
?.
logo
:
`civweb4/
${
props
?.
global
?.
logo
}
`;
?
props
?.
global
?.
logo
:
`civweb4/
${
props
?.
global
?.
logo
}
`;
const handleSubmit = values => {
const handleSubmit = values => {
/* eslint-disable */
/* eslint-disable */
...
@@ -87,11 +82,19 @@ const MiLeLogin = forwardRef((props, _ref) => {
...
@@ -87,11 +82,19 @@ const MiLeLogin = forwardRef((props, _ref) => {
action.events.on('loginVisible', status => {
action.events.on('loginVisible', status => {
setVisible(status);
setVisible(status);
});
});
action.events.on('loginHomePage', () => {
props.history.push(`
/
homePage
`);
});
action.events.on('loginIndustry', () => {
props.history.push(`
/
industry
`);
});
// }
// }
return () => {
return () => {
action && action.events && action.events.removeAllListeners('loginSuccess');
action && action.events && action.events.removeAllListeners('loginSuccess');
action && action.events && action.events.removeAllListeners('loginError');
action && action.events && action.events.removeAllListeners('loginError');
action && action.events && action.events.removeAllListeners('loginVisible');
action && action.events && action.events.removeAllListeners('loginVisible');
action && action.events && action.events.removeAllListeners('loginHomePage');
action && action.events && action.events.removeAllListeners('loginIndustry');
}
}
}, [props.loginMode]);
}, [props.loginMode]);
...
...
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