Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
max_android_panel
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xin
max_android_panel
Commits
73295886
Commit
73295886
authored
Mar 26, 2019
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成需求168
parent
5659a5fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
3 deletions
+31
-3
client/containers/PageContainer/PageContainer.jsx
+31
-3
No files found.
client/containers/PageContainer/PageContainer.jsx
View file @
73295886
...
@@ -79,7 +79,8 @@ class PageContainer extends React.Component {
...
@@ -79,7 +79,8 @@ class PageContainer extends React.Component {
showClassify
:
false
,
//显示右侧菜单栏,默认不显示,目前没用
showClassify
:
false
,
//显示右侧菜单栏,默认不显示,目前没用
isSend
:
false
,
isSend
:
false
,
area
:
''
,
//区域
area
:
''
,
//区域
maxTime
:
300
maxTime
:
300
,
showAlarm
:
false
// 是否已报警,已报警为true,未报警为false
};
};
this
.
getPages
=
this
.
getPages
.
bind
(
this
);
//获取当前页面
this
.
getPages
=
this
.
getPages
.
bind
(
this
);
//获取当前页面
this
.
showPopup
=
this
.
showPopup
.
bind
(
this
);
//显示弹窗
this
.
showPopup
=
this
.
showPopup
.
bind
(
this
);
//显示弹窗
...
@@ -213,7 +214,7 @@ class PageContainer extends React.Component {
...
@@ -213,7 +214,7 @@ class PageContainer extends React.Component {
},()
=>
{
},()
=>
{
//开门开始倒计时
//开门开始倒计时
this
.
countBackTime
=
maxTime
;
this
.
countBackTime
=
maxTime
;
//
this.beginCountBack()
this
.
beginCountBack
()
});
});
break
;
break
;
case
'SUCCESS_CLOSEDOOR'
:
case
'SUCCESS_CLOSEDOOR'
:
...
@@ -383,11 +384,19 @@ class PageContainer extends React.Component {
...
@@ -383,11 +384,19 @@ class PageContainer extends React.Component {
//开始倒计时,看有没有操作,只是在整个开门过程中才监听
//开始倒计时,看有没有操作,只是在整个开门过程中才监听
beginCountBack
(){
beginCountBack
(){
this
.
countBackTime
=
this
.
maxCountBackTime
;
if
(
this
.
countbackTimer
){
clearTimeout
(
this
.
countbackTimer
);
clearTimeout
(
this
.
countbackTimer
);
this
.
countbackTimer
=
null
;
this
.
countbackTimer
=
null
;
}
if
(
!
this
.
countbackTimer
){
this
.
setState
({
showAlarm
:
false
},()
=>
{
this
.
countBackTime
=
this
.
state
.
maxTime
;
this
.
countBackTime
=
this
.
state
.
maxTime
;
this
.
countBack
.
bind
(
this
)();
this
.
countBack
.
bind
(
this
)();
})
}
}
}
endCountBack
(){
endCountBack
(){
...
@@ -406,6 +415,7 @@ class PageContainer extends React.Component {
...
@@ -406,6 +415,7 @@ class PageContainer extends React.Component {
}
}
countBack
(){
countBack
(){
console
.
log
(
"countBackTime "
,
this
.
countBackTime
);
if
(
!
this
.
countbackTimer
&&
this
.
countBackTime
>=
0
){
if
(
!
this
.
countbackTimer
&&
this
.
countBackTime
>=
0
){
this
.
countBackTime
--
;
this
.
countBackTime
--
;
this
.
countbackTimer
=
window
.
setTimeout
(()
=>
{
this
.
countbackTimer
=
window
.
setTimeout
(()
=>
{
...
@@ -467,6 +477,15 @@ class PageContainer extends React.Component {
...
@@ -467,6 +477,15 @@ class PageContainer extends React.Component {
//TODO 上报300s无人操作
//TODO 上报300s无人操作
this
.
uploadErrs
(
errorType
[
1
]);
this
.
uploadErrs
(
errorType
[
1
]);
this
.
setState
({
showAlarm
:
true
,
popupInfo
:
defaultPopupInfo
},()
=>
{
this
.
playAlarmMusic
()
})
/*
let btnWidth = UTILPATH.getRemByPx(260);
let btnWidth = UTILPATH.getRemByPx(260);
let btnMarginLeft = UTILPATH.getRemByPx(30);
let btnMarginLeft = UTILPATH.getRemByPx(30);
let btnBorderRadius = UTILPATH.getRemByPx(10);
let btnBorderRadius = UTILPATH.getRemByPx(10);
...
@@ -487,6 +506,8 @@ class PageContainer extends React.Component {
...
@@ -487,6 +506,8 @@ class PageContainer extends React.Component {
this.playAlarmMusic()
this.playAlarmMusic()
})
})
*/
}
}
//关门
//关门
...
@@ -872,6 +893,13 @@ class PageContainer extends React.Component {
...
@@ -872,6 +893,13 @@ class PageContainer extends React.Component {
handleTouch()
{
handleTouch()
{
this
.
countBackTime
=
this
.
state
.
maxTime
;
this
.
countBackTime
=
this
.
state
.
maxTime
;
if
(
this
.
state
.
showAlarm
){
this
.
setState
({
showAlarm
:
false
},()
=>
{
this
.
beginCountBack
();
})
}
}
}
render()
{
render()
{
...
...
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