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
733f62d1
Commit
733f62d1
authored
Mar 11, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 中国水务登录页
parent
9a13c9d2
Pipeline
#85842
waiting for manual action with stages
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
606 additions
and
2 deletions
+606
-2
index.js
src/pages/user/login/index.js
+4
-2
logo.png
...s/user/login/template/project/chinaShuiwu/images/logo.png
+0
-0
水花.png
...ges/user/login/template/project/chinaShuiwu/images/水花.png
+0
-0
背景.png
...ges/user/login/template/project/chinaShuiwu/images/背景.png
+0
-0
index.js
src/pages/user/login/template/project/chinaShuiwu/index.js
+267
-0
index.less
src/pages/user/login/template/project/chinaShuiwu/index.less
+335
-0
No files found.
src/pages/user/login/index.js
View file @
733f62d1
/*
* @Author: 634665781 634665781@qq.com
* @Date: 2022-07-08 14:28:01
* @LastEditors:
yutian 249303761@qq.com
* @LastEditTime: 202
3-09-19 17:31:49
* @LastEditors:
Please set LastEditors
* @LastEditTime: 202
4-03-11 15:52:46
* @FilePath: \CivWeb\src\pages\user\login\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -43,6 +43,7 @@ import JieshouLogin from './template/project/jieshou';
import
YongjiLogin
from
'./template/project/yongji'
;
import
GaoyaoLogin
from
'./template/project/gaoyao'
;
import
JianzhaLogin
from
'./template/project/jianzha'
;
import
ChinaShuiwu
from
'./template/project/chinaShuiwu'
;
import
{
AppInitState
}
from
'../../../render'
;
const
LoginTemplate
=
{
'新春.html'
:
baseLoginNewYear
,
...
...
@@ -82,6 +83,7 @@ const LoginTemplate = {
'项目 - 永吉.html'
:
YongjiLogin
,
'项目 - 高要.html'
:
GaoyaoLogin
,
'项目 - 尖扎.html'
:
JianzhaLogin
,
'项目 - 中国水务.html'
:
ChinaShuiwu
,
default
:
BaseLogin
,
};
/* eslint-disable */
...
...
src/pages/user/login/template/project/chinaShuiwu/images/logo.png
0 → 100644
View file @
733f62d1
This diff was suppressed by a .gitattributes entry.
src/pages/user/login/template/project/chinaShuiwu/images/水花.png
0 → 100644
View file @
733f62d1
This diff was suppressed by a .gitattributes entry.
src/pages/user/login/template/project/chinaShuiwu/images/背景.png
0 → 100644
View file @
733f62d1
This diff was suppressed by a .gitattributes entry.
src/pages/user/login/template/project/chinaShuiwu/index.js
0 → 100644
View file @
733f62d1
/*
* 功能名称: 中国水务登录页
* 功能路径:
* 功能参数:
*/
import
React
,
{
forwardRef
,
useEffect
,
useRef
,
useState
}
from
'react'
;
import
$
from
'jquery'
;
import
{
Modal
,
Popover
}
from
'antd'
;
import
QRCode
from
'qrcode.react'
;
import
{
QrcodeOutlined
}
from
'@ant-design/icons'
;
import
{
Helmet
,
HelmetProvider
}
from
'react-helmet-async'
;
import
{
connect
}
from
'react-redux'
;
import
{
useHistory
,
withRouter
}
from
'@wisdom-utils/runtime'
;
import
{
actionCreators
}
from
'@/containers/App/store'
;
import
classnames
from
'classnames'
;
import
moment
from
'moment'
;
import
QueueAnim
from
'rc-queue-anim'
;
import
defaultSetting
from
'../../../../../../../config/defaultSetting'
;
import
LoginAction
from
'../../../login'
;
import
styles
from
'./index.less'
;
import
Account
from
'../../../js/useAccount'
;
import
{
defaultApp
}
from
'../../../../../../micro'
;
import
logo
from
'./images/logo.png'
;
import
bg
from
'./images/背景.png'
;
const
PopOvercontent
=
()
=>
{
const
qrcodes
=
window
.
globalConfig
&&
window
.
globalConfig
.
qrcode
;
if
(
qrcodes
)
{
return
<
QRCode
value
=
{
qrcodes
}
/>
;
}
return
<
span
>
手持
APP
下载未配置
<
/span>
;
};
const
Login
=
forwardRef
((
props
,
_ref
)
=>
{
const
sliVerify
=
useRef
();
const
loginFormRef
=
useRef
();
const
formRef
=
useRef
(
null
);
const
[
status
,
setStatus
]
=
useState
(
'normal'
);
const
[
show
,
setShow
]
=
useState
(
false
);
const
[
autoLogin
,
setAutoLogin
]
=
useState
(
false
);
const
[
submitting
,
setSubmitting
]
=
useState
(
false
);
const
[
type
,
setType
]
=
useState
(
'Account'
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
history
=
useHistory
();
const
[
action
,
setAction
]
=
useState
(()
=>
new
LoginAction
(
Object
.
assign
({},
props
,
{
history
}),
setVisible
,
false
));
const
[
dateObj
,
setDateObj
]
=
useState
({});
const
handleSubmit
=
values
=>
{
/* eslint-disable */
action
&&
(
type
===
'Account'
?
action
.
loginHandler
(
values
.
userName
,
values
.
password
,
null
,
autoLogin
,
sliVerify
)
:
type
===
'Mobile'
?
action
.
phoneLoginFormHandler
(
values
.
mobile
,
values
.
captcha
)
:
null
);
setSubmitting
(
true
);
props
.
updateCurrentIndex
&&
props
.
updateCurrentIndex
(
-
1
);
};
useEffect
(()
=>
{
action
&&
action
.
events
.
on
(
'loginSuccess'
,
event
=>
{
setSubmitting
(
false
);
props
.
updateCurrentIndex
&&
props
.
updateCurrentIndex
(
0
);
props
.
history
.
push
(
`/?client=
${
props
.
global
.
client
}
`
);
defaultApp
();
});
action
&&
action
.
events
.
on
(
'loginError'
,
event
=>
{
setVisible
(
false
);
setSubmitting
(
false
);
});
action
&&
action
.
events
.
on
(
'loginVisible'
,
status
=>
{
setVisible
(
status
);
});
return
()
=>
{
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginSuccess'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginError'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginVisible'
);
};
},
[
props
.
loginMode
]);
useEffect
(()
=>
{
setSubmitting
(
false
);
},
[
visible
]);
const
renderPlatform
=
()
=>
{
const
template
=
props
.
global
.
loginTemplate
;
const
params
=
{
fromRef
:
formRef
,
type
,
setType
,
status
,
submitting
,
autoLogin
,
setAutoLogin
,
action
,
onSubmit
:
handleSubmit
,
loginMode
:
props
.
loginMode
,
updateLoginMode
:
props
.
updateLoginMode
,
welcome
:
null
,
};
return
<
Account
{...
params
}
/>
;
};
/* eslint-disable */
const
handleWeek
=
()
=>
{
const
weekOfDay
=
Number
(
moment
().
format
(
'E'
));
let
weekDayName
=
''
;
switch
(
weekOfDay
)
{
case
1
:
weekDayName
=
'周一'
;
break
;
case
2
:
weekDayName
=
'周二'
;
break
;
case
3
:
weekDayName
=
'周三'
;
break
;
case
4
:
weekDayName
=
'周四'
;
break
;
case
5
:
weekDayName
=
'周五'
;
break
;
case
6
:
weekDayName
=
'周六'
;
break
;
case
7
:
weekDayName
=
'周日'
;
break
;
default
:
weekDayName
=
''
;
}
return
weekDayName
;
};
const
onShow
=
()
=>
{
if
(
!
show
)
{
setShow
(
true
);
}
};
useEffect
(()
=>
{
setTimeout
(()
=>
{
onShow
();
},
300
);
setTimeout
(()
=>
{
$
(
'.CarouselRipples'
).
ripples
({
resolution
:
800
,
dropRadius
:
20
,
//px
perturbance
:
2
,
});
},
1000
);
},
[]);
useEffect
(()
=>
{
return
()
=>
{};
},
[
show
]);
useEffect
(()
=>
{
const
timer
=
setInterval
(()
=>
{
setDateObj
({
curTime
:
moment
().
format
(
'HH:mm:ss'
),
week
:
handleWeek
(),
date
:
moment
().
format
(
'YYYY/MM/DD'
),
});
},
1000
);
return
()
=>
{
clearInterval
(
timer
);
};
},
[]);
return
(
<
HelmetProvider
>
<
Helmet
>
<
title
>
{
props
.
global
.
title
||
defaultSetting
.
title
}
<
/title
>
<
meta
name
=
"description"
content
=
{
props
.
global
.
title
||
defaultSetting
.
title
}
/
>
<
/Helmet
>
<
div
className
=
{
classnames
(
styles
.
chinaShuiwu
,
'chinaShuiwu'
)}
onClick
=
{
onShow
}
style
=
{{
background
:
`url(
${
bg
}
) no-repeat center center`
,
backgroundSize
:
'100%'
}}
>
{
show
?
(
<
div
className
=
{
classnames
(
styles
[
'wrapper'
])}
>
<
QueueAnim
type
=
"scale"
duration
=
{
1000
}
>
<
div
key
=
{
'innerwrapper'
}
className
=
{
classnames
(
styles
[
'inner-wrapper'
])}
>
<
div
className
=
{
styles
[
'inner-center'
]}
>
<
div
className
=
{
styles
[
'welcome-title'
]}
>
<
div
className
=
{
styles
[
'welcome-title_text'
]}
>
二次创业新征程,润泽百姓千万家
<
/div
>
<
div
className
=
{
styles
[
'welcome-title_sub'
]}
>
拥抱变化
•
把握未来
<
/div
>
<
/div
>
<
div
className
=
{
classnames
(
styles
[
'inner-bg'
],
styles
[
'login-part'
])}
ref
=
{
loginFormRef
}
>
{
renderPlatform
()}
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
welcome_bg
}
/
>
<
Popover
content
=
{
PopOvercontent
}
title
=
"扫码下载APP"
placement
=
"right"
overlayClassName
=
{
'popover-style'
}
>
<
QrcodeOutlined
className
=
{
styles
[
'qrcode-box'
]}
/
>
<
/Popover
>
<
/div
>
<
/QueueAnim
>
<
div
key
=
"loginheader"
className
=
{
classnames
(
styles
[
'login-header'
])}
>
<
QueueAnim
type
=
"left"
>
<
div
key
=
"logintitle"
className
=
{
styles
[
'left-title'
]}
>
<
div
>
<
img
src
=
{
logo
}
alt
=
"logo"
/>
<
/div
>
<
div
className
=
{
styles
[
'cn-title'
]}
>
{
props
.
global
.
title
||
defaultSetting
.
title
}
<
/div
>
<
/div
>
<
/QueueAnim
>
<
QueueAnim
type
=
"right"
>
<
div
key
=
"logintime"
className
=
{
styles
[
'right-timebox'
]}
>
<
div
className
=
{
styles
[
'curr-time'
]}
>
{
dateObj
.
curTime
}
<
/div
>
<
div
className
=
{
styles
[
'curr-week-date'
]}
>
<
div
className
=
{
styles
[
'curr-week'
]}
>
{
dateObj
.
week
}
<
/div
>
<
div
className
=
{
styles
[
'curr-date'
]}
>
{
dateObj
.
date
}
<
/div
>
<
/div
>
<
/div
>
<
/QueueAnim
>
<
/div
>
<
/div
>
)
:
null
}
<
div
className
=
{
classnames
(
styles
.
CarouselRipples
,
'CarouselRipples'
)}
data
-
ripple
=
"ripple"
/>
<
Modal
centered
visible
=
{
visible
}
width
=
{
340
}
footer
=
{
null
}
closable
=
{
false
}
bodyStyle
=
{{
padding
:
'15px'
}}
>
<
div
ref
=
{
sliVerify
}
/
>
<
/Modal
>
<
/div
>
<
/HelmetProvider
>
);
});
const
mapStateToProps
=
state
=>
({
global
:
state
.
getIn
([
'global'
,
'globalConfig'
]),
loginMode
:
state
.
getIn
([
'global'
,
'loginMode'
]),
});
const
mapDispatchToProps
=
dispatch
=>
({
updateConfig
(
config
)
{
dispatch
(
actionCreators
.
getConfig
(
config
));
},
createContext
(
data
)
{
dispatch
(
actionCreators
.
createContext
(
data
));
},
updateLoginMode
(
mode
)
{
dispatch
(
actionCreators
.
changeLoginMode
(
mode
));
},
updateCurrentIndex
(
index
)
{
dispatch
(
actionCreators
.
updateCurrentIndex
(
index
));
},
});
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
,
)(
withRouter
(
Login
));
src/pages/user/login/template/project/chinaShuiwu/index.less
0 → 100644
View file @
733f62d1
.chinaShuiwu {
width: 100%;
height: 100%;
position: relative;
min-height: 7.0rem;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
.caseHide {
display: none !important;
}
.welcome_bg {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: -135px;
width: 874px;
height: 394px;
background: url('./images/水花.png') no-repeat center center;
background-size: 100% 100%;
}
.inner-bg {
width: 100%;
height: 100%;
margin-top: 50px;
&>div {
width: 80%;
margin: 0 10% 10%;
}
}
.inner-wrapper {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
top: 50%;
transform: translateY(-50%);
left: 504px;
z-index: 50;
}
.inner-bg .title {
font-size: 27px;
font-weight: bold;
color: rgba(255, 255, 255, 1);
letter-spacing: 2px;
}
.form-control:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.inner-center {
position: relative;
width: 494px;
height: 569px;
background: rgba(255, 255, 255, 0.7);
border-radius: 15px;
box-shadow: 0px 6px 18px 0px rgba(25, 61, 79, 0.35);
z-index: 2;
// backdrop-filter: blur(6px);
}
.welcome-title {
height: 145px;
background: linear-gradient(0deg, #0A6053 0%, #249181 100%);
border-radius: 15px 15px 0 0;
text-align: center;
font-family: 宋体;
line-height: 1;
}
.welcome-title_text {
font-weight: bold;
font-size: 28px;
color: #FFFFFF;
padding: 40px 0 26px;
}
.welcome-title_sub {
font-weight: 400;
font-size: 20px;
color: #FFFFFF;
}
.formgroup2 {
display: flex;
align-items: center;
display: flex;
margin: 0px 5.5%;
margin-bottom: 10%;
align-items: center;
margin-bottom: 40px;
}
.APPcodeBox {
width: 100%;
display: flex;
flex-flow: column;
align-items: center;
cursor: pointer;
position: relative;
}
.APPCtext {
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #000000;
line-height: 30px;
opacity: 0.75;
}
.login-header {
box-sizing: border-box;
width: 100%;
position: absolute;
top: 0;
left: 0;
height: 67px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 30px;
z-index: 50;
border-bottom: 1px solid rgba(96, 167, 126, 0.32);
.left-title {
display: flex;
justify-content: flex-start;
align-items: center;
img {
width: 180px;
height: 30px;
}
.cn-title {
font-weight: bold;
font-size: 24px;
color: #06443B;
line-height: 1;
margin-left: 26px;
}
}
.right-timebox {
display: flex;
justify-content: center;
align-items: center;
height: 60px;
font-family: Microsoft YaHei;
.curr-time {
width: 140px;
font-size: 34px;
font-weight: 400;
color: #06443B;
text-align: right;
}
.curr-week-date {
margin-left: 10px;
.curr-week {
font-weight: 500;
font-size: 16px;
color: #06443B;
}
.curr-date {
font-size: 14px;
font-size: 14px;
color: #06443B;
}
}
}
}
.copyright {
position: absolute;
bottom: 7%;
width: 100%;
margin: 0 auto;
font-size: 12px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #F1F6FD;
text-align: center;
}
.qrcode-box {
position: absolute;
bottom: 0;
right: -23px;
width: 23px;
height: 23px;
font-size: 24px;
color: #167567;
opacity: 0.8;
cursor: pointer;
}
}
& :global {
.chinaShuiwu {
.panda-console-base-btn {
border-radius: 20px;
background: #167567;
border: none;
margin-top: 35px;
}
.panda-console-base-input-prefix>span {
color: #167567;
font-size: 24px;
}
.panda-console-base-input-affix-wrapper {
border-top: 0;
border-left: 0;
border-right: 0;
background-color: transparent;
}
.panda-console-base-input {
background-color: rgba(255, 255, 255, 0) !important;
color: #167567 !important;
}
.panda-console-base-checkbox-checked {
.panda-console-base-checkbox-inner {
background: #167567;
border-color: #167567;
}
}
.panda-console-base-checkbox-input:focus {
.panda-console-base-checkbox-inner {}
}
.panda-console-base-checkbox-input:focus+.panda-console-base-checkbox-inner {
border-color: #167567 !important;
}
.panda-console-base-input::placeholder {
color: #85A593;
}
.panda-console-base-btn:active {
background: #167567;
}
.panda-console-base-btn:hover {
background: #167567;
}
.panda-console-base-form-item {
margin-bottom: 65px;
}
}
.popover-style {
.@{ant-prefix}-popover-inner-content {
display: flex;
justify-content: center;
align-items: center;
}
.@{ant-prefix}-popover-title {
display: flex;
justify-content: center;
align-items: center;
}
}
}
:global {
.popover-style {
.@{ant-prefix}-popover-inner-content {
display: flex;
justify-content: center;
align-items: center;
}
.@{ant-prefix}-popover-title {
display: flex;
justify-content: center;
align-items: center;
}
}
}
.CarouselRipples {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
& :global {
.CarouselRipples:before {
content: '';
display: inline-block;
vertical-align: middle;
height: 100%;
}
}
\ No newline at end of file
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