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
d247759f
Commit
d247759f
authored
Apr 25, 2023
by
喻天
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 节水主题一 修改
parent
54422316
Pipeline
#71483
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
53 deletions
+67
-53
index.js
src/pages/user/login/template/energy_GZ/index.js
+67
-53
No files found.
src/pages/user/login/template/energy_GZ/index.js
View file @
d247759f
...
...
@@ -16,8 +16,10 @@ import LoginAction from '../../login';
import
styles
from
'./index.less'
;
import
{
defaultApp
}
from
'@/micro'
;
import
{
log
}
from
'kit_utils'
;
let
big
=
'广州大.png'
let
bigNew
=
''
let
big
=
'广州大.png'
let
bigNew
=
''
let
hasOnline
=
true
let
slogan
=
'建桥宣传语.png'
class
HuaNongLogin
extends
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -36,17 +38,23 @@ class HuaNongLogin extends Component {
};
this
.
fromRef
=
React
.
createRef
();
this
.
sliVerify
=
React
.
createRef
();
props
.
loginParams
.
map
(
v
=>
{
let
item
=
v
.
split
(
'='
)
if
(
item
.
length
>
0
){
if
(
item
[
0
]
==
'big'
){
big
=
item
[
1
]
}
if
(
item
[
0
]
==
'bigNew'
){
bigNew
=
item
[
1
]
}
props
.
loginParams
.
map
(
v
=>
{
let
item
=
v
.
split
(
'='
)
if
(
item
.
length
>
0
)
{
if
(
item
[
0
]
==
'big'
)
{
big
=
item
[
1
]
}
if
(
item
[
0
]
==
'bigNew'
)
{
bigNew
=
item
[
1
]
}
if
(
item
[
0
]
==
'slogan'
)
{
slogan
=
item
[
1
]
}
if
(
item
[
0
]
==
'hasOnline'
)
{
hasOnline
=
item
[
1
]
==
"true"
}
}
})
})
}
handleSubmit
=
values
=>
{
const
{
action
,
type
,
autoLogin
}
=
this
.
state
;
...
...
@@ -54,33 +62,37 @@ class HuaNongLogin extends Component {
(
type
===
'Account'
?
action
.
loginHandler
(
values
.
userName
,
values
.
password
,
null
,
autoLogin
,
this
.
sliVerify
)
:
type
===
'Mobile'
?
action
.
phoneLoginFormHandler
(
values
.
mobile
,
values
.
captcha
)
:
null
);
?
action
.
phoneLoginFormHandler
(
values
.
mobile
,
values
.
captcha
)
:
null
);
this
.
setSubmitting
(
true
);
this
.
props
.
updateCurrentIndex
(
-
1
);
//没取到0id 要给定时器
if
(
window
.
gzTime
){
clearInterval
(
window
.
gzTime
)
if
(
window
.
gzTime
)
{
clearInterval
(
window
.
gzTime
)
}
if
(
hasOnline
)
{
setTimeout
(()
=>
{
appService
.
getInOnLine
({
UserID
:
globalConfig
.
userInfo
.
oid
||
globalConfig
.
userInfo
.
OID
,
SatrtDate
:
this
.
getNowDate
(),
Port
:
location
.
port
,
Oid
:
this
.
_createGuid
(),
})
},
10000
)
window
.
gzTime
=
setInterval
(()
=>
{
appService
.
getInOnLine
({
UserID
:
globalConfig
.
userInfo
.
oid
||
globalConfig
.
userInfo
.
OID
,
SatrtDate
:
this
.
getNowDate
(),
Port
:
location
.
port
,
Oid
:
this
.
_createGuid
(),
})
},
180000
)
}
setTimeout
(()
=>
{
appService
.
getInOnLine
({
UserID
:
globalConfig
.
userInfo
.
oid
||
globalConfig
.
userInfo
.
OID
,
SatrtDate
:
this
.
getNowDate
(),
Port
:
location
.
port
,
Oid
:
this
.
_createGuid
(),
})
},
10000
)
window
.
gzTime
=
setInterval
(()
=>
{
appService
.
getInOnLine
({
UserID
:
globalConfig
.
userInfo
.
oid
||
globalConfig
.
userInfo
.
OID
,
SatrtDate
:
this
.
getNowDate
(),
Port
:
location
.
port
,
Oid
:
this
.
_createGuid
(),
})
},
180000
)
};
onActinoChange
=
action
=>
{
...
...
@@ -168,7 +180,7 @@ class HuaNongLogin extends Component {
clearTime
()
{
this
.
timeTimer
&&
clearInterval
(
this
.
timeTimer
);
}
getNowDate
()
{
getNowDate
()
{
var
date
=
new
Date
();
var
sign2
=
":"
;
var
year
=
date
.
getFullYear
()
// 年
...
...
@@ -197,7 +209,7 @@ getNowDate () {
}
return
year
+
"-"
+
month
+
"-"
+
day
+
" "
+
hour
+
sign2
+
minutes
+
sign2
+
seconds
;
}
_createGuid
()
{
_createGuid
()
{
return
"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
let
r
=
(
Math
.
random
()
*
16
)
|
0
,
...
...
@@ -207,18 +219,20 @@ _createGuid() {
.
toUpperCase
();
}
componentDidMount
()
{
console
.
log
(
this
.
props
,
this
.
props
.
global
.
logo
,
this
.
props
.
global
.
transformDevAssetsBaseURL
(
'assets/images/广州/背景.png'
));
console
.
log
(
this
);
this
.
onActinoChange
(
this
.
state
.
action
);
this
.
getCurrentTime
(
this
.
showTime
);
/* request(urlUtils.getUrl(
"/PandaEnergy/GZshuiwuju"
) + '/GuangZhou/InOnLine', {
query: {
UserID: _config.userInfo.OID,
SatrtDate: SatrtDate,
Port: location.port,
Oid,
}
}) */
/* request(urlUtils.getUrl(
"/PandaEnergy/GZshuiwuju"
) + '/GuangZhou/InOnLine', {
query: {
UserID: _config.userInfo.OID,
SatrtDate: SatrtDate,
Port: location.port,
Oid,
}
}) */
...
...
@@ -230,13 +244,13 @@ _createGuid() {
return
(
<
HelmetProvider
>
<
div
className
=
{
styles
.
quota
}
style
=
{{
'background'
:
`url(
${
bigNew
?
this
.
props
.
global
.
transformDevAssetsBaseURL
(
bigNew
):
require
(
"@/assets/images/login/节水/"
+
big
)}
) no-repeat`
}}
>
<
div
className
=
{
styles
.
quota
}
style
=
{{
'background'
:
`url(
${
bigNew
?
this
.
props
.
global
.
transformDevAssetsBaseURL
(
bigNew
)
:
require
(
"@/assets/images/login/节水/"
+
big
)}
) no-repeat`
}}
>
<
div
className
=
{
styles
.
head
}
>
<
div
className
=
{
styles
.
title
}
>
<
img
className
=
{
styles
.
imgs
}
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
.
title
}
>
<
img
className
=
{
styles
.
imgs
}
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
}
>
...
...
@@ -248,7 +262,7 @@ _createGuid() {
<
div
className
=
{
styles
.
wrap_content
}
>
<
div
className
=
{
styles
.
from
}
>
<
div
className
=
{
styles
.
slogan
}
>
<
div
className
=
{
styles
.
slogan_back
}
/
>
<
div
className
=
{
styles
.
slogan_back
}
style
=
{{
background
:
`url(
${
this
.
props
.
global
.
transformDevAssetsBaseURL
(
slogan
)}
) center no-repeat`
}}
/
>
<
/div
>
<
div
className
=
{
styles
.
login
}
>
{
this
.
renderPlatform
()}
<
/div
>
<
/div
>
...
...
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