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
af4c7629
Commit
af4c7629
authored
Jul 11, 2022
by
程恺文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 广州登陆页
parent
0d351ead
Pipeline
#55041
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
10 deletions
+45
-10
index.js
src/pages/user/login/template/energy_GZ/index.js
+45
-10
No files found.
src/pages/user/login/template/energy_GZ/index.js
View file @
af4c7629
...
...
@@ -47,12 +47,13 @@ class HuaNongLogin extends Component {
this
.
setSubmitting
(
true
);
this
.
props
.
updateCurrentIndex
(
-
1
);
console
.
log
(
'登陆'
);
//没取到0id 要给定时器
appService
.
getInOnLine
({
UserID
:
58
,
SatrtDate
:
'2022-07-08 17:48:51'
,
UserID
:
globalConfig
.
userInfo
.
oid
,
SatrtDate
:
this
.
getNowDate
()
,
Port
:
location
.
port
,
Oid
:
'83A3F3E9-96D3-4430-B90D-6E903BFF8D04'
,
Oid
:
this
.
_createGuid
()
,
})
};
onActinoChange
=
action
=>
{
...
...
@@ -140,6 +141,44 @@ class HuaNongLogin extends Component {
clearTime
()
{
this
.
timeTimer
&&
clearInterval
(
this
.
timeTimer
);
}
getNowDate
()
{
var
date
=
new
Date
();
var
sign2
=
":"
;
var
year
=
date
.
getFullYear
()
// 年
var
month
=
date
.
getMonth
()
+
1
;
// 月
var
day
=
date
.
getDate
();
// 日
var
hour
=
date
.
getHours
();
// 时
var
minutes
=
date
.
getMinutes
();
// 分
var
seconds
=
date
.
getSeconds
()
//秒
var
weekArr
=
[
'星期一'
,
'星期二'
,
'星期三'
,
'星期四'
,
'星期五'
,
'星期六'
,
'星期天'
];
var
week
=
weekArr
[
date
.
getDay
()];
// 给一位数的数据前面加 “0”
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"0"
+
month
;
}
if
(
day
>=
0
&&
day
<=
9
)
{
day
=
"0"
+
day
;
}
if
(
hour
>=
0
&&
hour
<=
9
)
{
hour
=
"0"
+
hour
;
}
if
(
minutes
>=
0
&&
minutes
<=
9
)
{
minutes
=
"0"
+
minutes
;
}
if
(
seconds
>=
0
&&
seconds
<=
9
)
{
seconds
=
"0"
+
seconds
;
}
return
year
+
"-"
+
month
+
"-"
+
day
+
" "
+
hour
+
sign2
+
minutes
+
sign2
+
seconds
;
}
_createGuid
()
{
return
"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
let
r
=
(
Math
.
random
()
*
16
)
|
0
,
v
=
c
==
"x"
?
r
:
(
r
&
0x3
)
|
0x8
;
return
v
.
toString
(
16
);
})
.
toUpperCase
();
}
componentDidMount
()
{
console
.
log
(
this
.
props
);
console
.
log
(
this
);
...
...
@@ -155,14 +194,10 @@ class HuaNongLogin extends Component {
Oid,
}
}) */
console
.
log
(
'在线时长服务'
);
appService
.
getInOnLine
({
UserID
:
58
,
SatrtDate
:
'2022-07-08 17:48:51'
,
Port
:
location
.
port
,
Oid
:
'83A3F3E9-96D3-4430-B90D-6E903BFF8D04'
,
})
}
componentWillUnmount
()
{
this
.
clearTime
();
...
...
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