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
8c85c645
Commit
8c85c645
authored
2 years ago
by
程恺文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 广州登陆页
parent
bfebd780
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
473 additions
and
2 deletions
+473
-2
proxy.js
config/proxy.js
+2
-2
广州大.png
src/assets/images/login/节水/广州大.png
+0
-0
建桥宣传语.png
src/assets/images/login/节水/建桥宣传语.png
+0
-0
单独图案-蓝绿色.png
src/assets/images/logo/单独图案-蓝绿色.png
+0
-0
index.js
src/pages/user/login/index.js
+10
-0
FormLogin.js
src/pages/user/login/template/energy_GZ/FormLogin.js
+69
-0
index.js
src/pages/user/login/template/energy_GZ/index.js
+207
-0
index.less
src/pages/user/login/template/energy_GZ/index.less
+185
-0
No files found.
config/proxy.js
View file @
8c85c645
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
// 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://work.panda-water.cn';
// const proxyURL = 'http://192.168.12.3:8082';
// const proxyURL = 'http://192.168.12.3:8082';
const
proxyURL
=
'https://panda-water.cn/'
//
const proxyURL = 'https://panda-water.cn/'
const
proxyURL
=
'http://192.168.10.152:60001'
module
.
exports
=
{
module
.
exports
=
{
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
development
:
{
development
:
{
...
...
This diff is collapsed.
Click to expand it.
src/assets/images/login/节水/广州大.png
0 → 100644
View file @
8c85c645
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
Click to expand it.
src/assets/images/login/节水/建桥宣传语.png
0 → 100644
View file @
8c85c645
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
Click to expand it.
src/assets/images/logo/单独图案-蓝绿色.png
0 → 100644
View file @
8c85c645
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
Click to expand it.
src/pages/user/login/index.js
View file @
8c85c645
/*
* @Author: 634665781 634665781@qq.com
* @Date: 2022-07-08 14:28:01
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2022-07-08 16:02:01
* @FilePath: \CivWeb\src\pages\user\login\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
BaseLogin
from
'./template/baseLogin'
;
import
BaseLogin
from
'./template/baseLogin'
;
import
NewYear
from
'./template/newYear'
;
import
NewYear
from
'./template/newYear'
;
...
@@ -5,6 +13,7 @@ import InfoLogin from './template/infoLogin';
...
@@ -5,6 +13,7 @@ import InfoLogin from './template/infoLogin';
import
Yulin
from
'./template/yulin'
;
import
Yulin
from
'./template/yulin'
;
// import { useParams } from '@wisdom-utils/runtime';
// import { useParams } from '@wisdom-utils/runtime';
import
EnergyQuota
from
'./template/energy_quota/index'
;
import
EnergyQuota
from
'./template/energy_quota/index'
;
import
EnergGz
from
'./template/energy_GZ/index'
;
import
CloudLogin
from
'./template/cloud'
;
import
CloudLogin
from
'./template/cloud'
;
import
WaterLogin
from
'./template/water'
;
import
WaterLogin
from
'./template/water'
;
import
JSZHLogin
from
'./template/project/JSZH'
;
import
JSZHLogin
from
'./template/project/JSZH'
;
...
@@ -17,6 +26,7 @@ const LoginTemplate = {
...
@@ -17,6 +26,7 @@ const LoginTemplate = {
'信息化.html'
:
InfoLogin
,
'信息化.html'
:
InfoLogin
,
'项目 - 榆林.html'
:
Yulin
,
'项目 - 榆林.html'
:
Yulin
,
'能源-定额平台.html'
:
EnergyQuota
,
'能源-定额平台.html'
:
EnergyQuota
,
'节水主题一.html'
:
EnergGz
,
'Water.html'
:
WaterLogin
,
'Water.html'
:
WaterLogin
,
'项目 - 江水置换.html'
:
JSZHLogin
,
'项目 - 江水置换.html'
:
JSZHLogin
,
default
:
BaseLogin
,
default
:
BaseLogin
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/template/energy_GZ/FormLogin.js
0 → 100644
View file @
8c85c645
/* eslint-disable */
import
{
Checkbox
}
from
'antd'
;
import
React
from
'react'
;
import
{
useIntl
}
from
'@wisdom-utils/components'
;
import
LoginForm
from
'../../components/Login'
;
import
{
Form
}
from
'antd'
;
import
LoginMessage
from
'../../js/loginMessage'
;
import
LoginContext
from
'../../components/Login/LoginContext'
;
import
styles
from
'./index.less'
;
const
{
UserName
,
Password
,
Submit
}
=
LoginForm
;
const
FormLogin
=
props
=>
(
<
div
className
=
{
styles
.
form_login
}
>
<
LoginContext
.
Provider
>
<
Form
form
=
{
props
.
form
}
onFinish
=
{
values
=>
{
if
(
props
.
onSubmit
)
{
props
.
onSubmit
(
values
);
}
}}
>
{
props
.
status
===
'error'
&&
props
.
type
===
'account'
&&
!
props
.
submitting
&&
(
<
LoginMessage
content
=
{
useIntl
().
formatMessage
({
id
:
'pages.login.accountLogin.errorMessage'
,
})}
/
>
)}
<
UserName
name
=
"userName"
placeholder
=
{
useIntl
().
formatMessage
({
id
:
'pages.login.username.placeholder'
,
})}
rules
=
{[
{
required
:
true
,
message
:
useIntl
().
formatMessage
({
id
:
'pages.login.username.required'
,
}),
},
]}
/
>
<
Password
name
=
"password"
placeholder
=
{
useIntl
().
formatMessage
({
id
:
'pages.login.password.placeholder'
,
})}
rules
=
{[
{
required
:
true
,
message
:
useIntl
().
formatMessage
({
id
:
'pages.login.password.required'
,
}),
},
]}
/
>
<
div
className
=
{
styles
.
checkbox_wrap
}
>
<
Checkbox
checked
=
{
props
.
autoLogin
}
onChange
=
{
e
=>
props
.
setAutoLogin
(
e
.
target
.
checked
)}
>
{
'记住密码'
}
<
/Checkbox
>
<
a
href
=
"#"
>
忘记密码
?
<
/a
>
<
/div
>
<
Submit
loading
=
{
props
.
submitting
}
>
{
useIntl
().
formatMessage
({
id
:
'pages.login.submit'
})}
<
/Submit
>
<
/Form
>
<
/LoginContext.Provider
>
<
/div
>
);
export
default
FormLogin
;
This diff is collapsed.
Click to expand it.
src/pages/user/login/template/energy_GZ/index.js
0 → 100644
View file @
8c85c645
/* eslint-disable */
/*
* @Author: chengkaiwen;
* @Date: 2022-7-8
* @Description: 广州登录页;
*/
import
React
,
{
Component
}
from
'react'
;
import
{
connect
}
from
'react-redux'
;
import
{
withRouter
}
from
'@wisdom-utils/runtime'
;
import
{
Modal
}
from
'antd'
;
import
{
HelmetProvider
,
Helmet
}
from
'react-helmet-async'
;
import
FormLogin
from
'./FormLogin'
;
import
{
actionCreators
}
from
'@/containers/App/store'
;
import
LoginAction
from
'../../login'
;
import
styles
from
'./index.less'
;
import
{
defaultApp
}
from
'@/micro'
;
import
{
log
}
from
'kit_utils'
;
class
HuaNongLogin
extends
Component
{
constructor
(
props
)
{
super
(
props
);
console
.
log
(
'翻新节水主题一'
);
this
.
state
=
{
time
:
'16:00'
,
week
:
'星期一'
,
date
:
'2020-04-14'
,
title
:
'华中农业大学二级单位定额与建筑能耗管理系统'
,
type
:
'Account'
,
status
:
'normal'
,
submitting
:
false
,
autoLogin
:
false
,
visible
:
false
,
action
:
new
LoginAction
(
Object
.
assign
({},
props
,
{
history
:
props
.
history
}),
this
.
setVisible
,
true
),
};
this
.
fromRef
=
React
.
createRef
();
this
.
sliVerify
=
React
.
createRef
();
}
handleSubmit
=
values
=>
{
const
{
action
,
type
,
autoLogin
}
=
this
.
state
;
action
&&
(
type
===
'Account'
?
action
.
loginHandler
(
values
.
userName
,
values
.
password
,
null
,
autoLogin
,
this
.
sliVerify
)
:
type
===
'Mobile'
?
action
.
phoneLoginFormHandler
(
values
.
mobile
,
values
.
captcha
)
:
null
);
this
.
setSubmitting
(
true
);
this
.
props
.
updateCurrentIndex
(
-
1
);
};
onActinoChange
=
action
=>
{
action
&&
action
.
events
.
on
(
'loginSuccess'
,
event
=>
{
this
.
setSubmitting
(
false
);
this
.
props
.
updateCurrentIndex
&&
this
.
props
.
updateCurrentIndex
(
0
);
this
.
props
.
history
.
push
(
`/?client=
${
this
.
props
.
global
.
client
}
`
);
defaultApp
();
});
action
&&
action
.
events
.
on
(
'loginError'
,
event
=>
{
this
.
setVisible
(
false
);
this
.
setSubmitting
(
false
);
});
action
&&
action
.
events
.
on
(
'loginVisible'
,
status
=>
{
this
.
setVisible
(
status
);
});
};
setSubmitting
=
submitting
=>
{
this
.
setState
({
submitting
});
};
setVisible
=
visible
=>
{
this
.
setState
({
visible
,
});
};
setType
=
type
=>
{
this
.
setState
({
type
,
});
};
setAutoLogin
=
autoLogin
=>
{
this
.
setState
({
autoLogin
,
});
};
renderPlatform
()
{
const
params
=
{
fromRef
:
this
.
formRef
,
type
:
this
.
state
.
type
,
setType
:
this
.
setType
,
status
:
this
.
state
.
status
,
submitting
:
this
.
state
.
submitting
,
autoLogin
:
this
.
state
.
autoLogin
,
setAutoLogin
:
this
.
setAutoLogin
,
action
:
this
.
state
.
action
,
onSubmit
:
this
.
handleSubmit
,
loginMode
:
this
.
props
.
loginMode
,
updateLoginMode
:
this
.
props
.
updateLoginMode
,
};
return
<
FormLogin
{...
params
}
/>
;
}
getCurrentTime
(
callback
)
{
const
date
=
new
Date
();
const
week
=
[
'星期日'
,
'星期一'
,
'星期二'
,
'星期三'
,
'星期四'
,
'星期五'
,
'星期六'
];
let
minutes
=
date
.
getMinutes
();
if
(
minutes
<
10
)
{
minutes
=
'0'
+
minutes
;
}
let
second
=
date
.
getSeconds
();
const
time
=
`
${
date
.
getHours
()}
:
${
minutes
}
`
;
const
weekDay
=
week
[
date
.
getDay
()];
const
dateStr
=
`
${
date
.
getFullYear
()}
-
${
date
.
getMonth
()
+
1
}
-
${
date
.
getDate
()}
`
;
const
dateObj
=
{
time
,
week
:
weekDay
,
date
:
dateStr
,
second
,
};
callback
&&
callback
(
dateObj
);
}
showTime
=
(
date
)
=>
{
this
.
clearTime
();
this
.
setState
({
...
date
,
});
const
interval
=
60
-
date
.
second
;
this
.
timeTimer
=
setInterval
(()
=>
{
this
.
getCurrentTime
(
this
.
showTime
);
},
interval
*
1000
);
}
// 清除时间定时器
clearTime
()
{
this
.
timeTimer
&&
clearInterval
(
this
.
timeTimer
);
}
componentDidMount
()
{
console
.
log
(
this
.
props
);
console
.
log
(
this
);
this
.
onActinoChange
(
this
.
state
.
action
);
this
.
getCurrentTime
(
this
.
showTime
);
}
componentWillUnmount
()
{
this
.
clearTime
();
}
render
()
{
return
(
<
HelmetProvider
>
<
div
className
=
{
styles
.
quota
}
>
<
div
className
=
{
styles
.
head
}
>
<
div
className
=
{
styles
.
title
}
>
<
img
src
=
{
this
.
props
.
global
&&
this
.
props
.
global
.
transformDevAssetsBaseURL
&&
this
.
props
.
global
.
transformDevAssetsBaseURL
(
this
.
props
.
global
.
logo
)}
alt
=
""
/>
{
/* <img src={require('@/assets/images/login/能源-定额/华农logo.png')} alt="" /> */
}
<
span
>
{
this
.
props
.
global
.
title
||
this
.
state
.
title
}
<
/span
>
<
/div
>
<
div
className
=
{
styles
.
time_and_date
}
>
<
div
className
=
{
styles
.
time
}
>
{
this
.
state
.
time
}
<
/div
>
<
div
className
=
{
styles
.
date
}
>
<
span
>
{
this
.
state
.
week
}
<
/span
>
<
span
>
{
this
.
state
.
date
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
wrap_content
}
>
<
div
className
=
{
styles
.
from
}
>
<
div
className
=
{
styles
.
slogan
}
>
<
div
className
=
{
styles
.
slogan_back
}
/
>
<
/div
>
<
div
className
=
{
styles
.
login
}
>
{
this
.
renderPlatform
()}
<
/div
>
<
/div
>
<
/div
>
<
Modal
centered
visible
=
{
this
.
state
.
visible
}
width
=
{
340
}
footer
=
{
null
}
closable
=
{
false
}
bodyStyle
=
{{
padding
:
'15px'
}}
>
<
div
ref
=
{
this
.
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
(
HuaNongLogin
));
This diff is collapsed.
Click to expand it.
src/pages/user/login/template/energy_GZ/index.less
0 → 100644
View file @
8c85c645
@import '~antd/es/style/themes/default.less';
/* 0.5px */
.borderSlender(@color) {
position: absolute;
bottom: 0;
width: 100%;
height: 1px;
background-color: @color;
-webkit-transform: scaleY(0.5);
-moz-transform: scaleY(0.5);
transform: scaleY(0.5);
content: '';
}
.quota {
position: relative;
width: 100%;
height: 100%;
background: url('@/assets/images/login/节水/广州大.png') no-repeat;
background-size: cover;
.head {
position: absolute;
top: 0;
width: 100%;
height: 66px;
display: flex;
justify-content: space-between;
z-index: 10;
.title {
padding-left: 20px;
font-size: 24px;
font-weight: bold;
color: #FFFFFF;
text-shadow: 0px 0px 2px rgba(2, 49, 21, 0.51);
line-height: 66px;
}
.time_and_date {
padding-right: 50px;
display: flex;
align-items: center;
.time {
padding: 5px;
font-size: 34px;
font-weight: 400;
color: #FFFFFF;
text-shadow: 0px 0px 2px rgba(2, 49, 21, 0.8);
}
.date {
padding: 5px;
font-size: 16px;
font-weight: 500;
color: #FFFFFF;
text-shadow: 0px 0px 2px rgba(2, 49, 21, 0.51);
display: flex;
flex-direction: column;
line-height: 1.1;
}
}
}
.head::after {
.borderSlender(@color: rgb(255, 255, 255, 0.32));
}
.wrap_content {
position: relative;
width: 100%;
height: 100%;
.from {
position: absolute;
top: -94px !important;
right: 0;
bottom: 0;
left: 0;
display: flex;
flex-direction: column;
width: 620px;
height: 429px;
margin: auto;
overflow: hidden;
// background: rgba(255, 255, 255, 0.8);
background: #FFFFFF;
border-radius: 15px;
.slogan {
height: 118px;
background: linear-gradient(0deg,rgba(9,128,238,1) 0%,rgba(0,182,251,1) 100%);
.slogan_back{
width: 100%;
height: 100%;
background: url('@/assets/images/login/节水/建桥宣传语.png') no-repeat;
background-position: center;
}
}
.login {
// flex: 1;
height: calc(100% - 118px);
padding: 50px 60px;
}
}
}
}
.form_login {
width: 100%;
height: 100%;
.checkbox_wrap {
margin-bottom: @margin-md;
color: #0599F4;
a {
float: right;
}
}
:global {
.panda-console-base-input-affix-wrapper:focus, .panda-console-base-input-affix-wrapper-focused {
box-shadow: none;
}
.panda-console-base-input-affix-wrapper {
color: #0599F4;
background: none;
}
.panda-console-base-input {
background: none;
}
.panda-console-base-input-affix-wrapper-status-error:not(.panda-console-base-input-affix-wrapper-disabled):not(.panda-console-base-input-affix-wrapper-borderless).panda-console-base-input-affix-wrapper:focus, .panda-console-base-input-affix-wrapper-status-error:not(.panda-console-base-input-affix-wrapper-disabled):not(.panda-console-base-input-affix-wrapper-borderless).panda-console-base-input-affix-wrapper-focused {
box-shadow: none;
}
.panda-console-base-input-affix-wrapper:focus .panda-console-base-input-affix-wrapper-lg {
border-color: #0599F4 !important;
}
.panda-console-base-input-affix-wrapper:not(.panda-console-base-input-affix-wrapper-disabled):hover {
z-index: 1;
border-color: #0599F4;
border-right-width: 1px;
}
.panda-console-base-input-affix-wrapper-status-error:not(.panda-console-base-input-affix-wrapper-disabled):not(.panda-console-base-input-affix-wrapper-borderless).panda-console-base-input-affix-wrapper,
.panda-console-base-input-affix-wrapper-status-error:not(.panda-console-base-input-affix-wrapper-disabled):not(.panda-console-base-input-affix-wrapper-borderless).panda-console-base-input-affix-wrapper:hover {
border-color: #ff4d4f;
}
.panda-console-base-input-affix-wrapper-focused,
.panda-console-base-input-affix-wrapper:focus {
z-index: 0;
}
.panda-console-base-input-affix-wrapper-lg {
background-color: none;
border: none;
border-bottom-color: #0599F4;
border-bottom-width: 1px;
border-bottom-style: solid;
}
.panda-console-base-input-affix-wrapper > input.panda-console-base-input {
background-color: none;
}
.panda-console-base-form {
width: 100%;
height: 100%;
}
.panda-console-base-checkbox-wrapper {
color: #0599F4;
}
.panda-console-base-checkbox-wrapper:hover .panda-console-base-checkbox::after {
border-color: #0599F4;
}
.panda-console-base-checkbox-wrapper:hover .panda-console-base-checkbox-inner,
.panda-console-base-checkbox:hover .panda-console-base-checkbox-inner,
.panda-console-base-checkbox-input:focus + .panda-console-base-checkbox-inner {
border-color: #0599F4;
}
.panda-console-base-checkbox-wrapper {
.panda-console-base-checkbox-checked .panda-console-base-checkbox-inner {
background-color: #0599F4;
border-color: #0599F4;
}
.panda-console-base-checkbox-inner {
border-color: #0599F4;
border-radius: 50%;
}
}
.panda-console-base-btn-lg {
width: 100%;
}
.panda-console-base-btn-primary {
background: #0599F4;
border-color: #0599F4;
border-radius: 23px;
}
}
}
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