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
116fea35
Commit
116fea35
authored
Jan 07, 2019
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复开关门
parent
6cca1416
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
11 deletions
+25
-11
client/containers/ChooseTaskContainer/ChooseTaskContainer.jsx
+6
-8
client/containers/HomePageContainer/HomePageContainer.jsx
+1
-0
client/containers/PageContainer/PageContainer.jsx
+18
-3
No files found.
client/containers/ChooseTaskContainer/ChooseTaskContainer.jsx
View file @
116fea35
...
@@ -24,25 +24,23 @@ export default class ChooseTaskContainer extends React.Component{
...
@@ -24,25 +24,23 @@ export default class ChooseTaskContainer extends React.Component{
}
}
logout
(){
logout
(){
this
.
props
.
willCloseDoor
();
// this.props.willCloseDoor();
let
msg
=
{
type
:
'WILL_CLOSEDOOR'
}
// let msg={type:'WILL_CLOSEDOOR'}
sendMsg
(
JSON
.
stringify
(
msg
))
// sendMsg(JSON.stringify(msg))
this
.
props
.
changeIsSend
(
true
)
// this.props.changeIsSend(true)
}
}
showLogoutPopup
(){
showLogoutPopup
(){
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
btnContainer=
{
"headerLogoutBtn backff775c colfff font32 font32 "
}
key=
{
"headerLogoutBtn1"
}
text=
{
"确定退出?"
}
option=
{
this
.
logout
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"headerLogoutBtn btne5 font32"
}
key=
{
"headerLogoutBtn2"
}
text=
{
"取消"
}
option=
{
hidePopup
}
/>
let
btnDom2
=
<
Button
btnContainer=
{
"headerLogoutBtn btne5 font32"
}
key=
{
"headerLogoutBtn2"
}
text=
{
"取消"
}
option=
{
hidePopup
}
/>
let
popDom
=
let
popDom
=
<
PopModel
popupTitle=
{
"是否退出登录"
}
classContainer=
{
"headerLogout"
}
>
<
PopModel
popupTitle=
{
"是否退出登录"
}
classContainer=
{
"headerLogout"
}
>
<
div
className=
{
"icon iconfont icon-exclamation font150 colf5a623"
}
/>
<
div
className=
{
"icon iconfont icon-exclamation font150 colf5a623"
}
/>
<
div
className=
{
"text font40 col000"
}
style=
{
{
lineHeight
:
'1.6'
}
}
>
<
div
className=
{
"text font40 col000"
}
style=
{
{
lineHeight
:
'1.6'
}
}
>
<
p
>
此步临时添加,可用作测试退出登录
</
p
>
<
p
>
请重新打开应用
</
p
>
<
p
>
重新扫码开门,不必重启服务
</
p
>
</
div
>
</
div
>
<
div
className=
{
"btn"
}
>
<
div
className=
{
"btn"
}
>
{
btnDom1
}
{
btnDom2
}
{
btnDom2
}
</
div
>
</
div
>
</
PopModel
>;
</
PopModel
>;
...
...
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
116fea35
...
@@ -41,6 +41,7 @@ export default class HomePageContainer extends React.Component{
...
@@ -41,6 +41,7 @@ export default class HomePageContainer extends React.Component{
this
.
props
.
willCloseDoor
();
this
.
props
.
willCloseDoor
();
// let msg={type:'WILL_CLOSEDOOR'};
// let msg={type:'WILL_CLOSEDOOR'};
// sendMsg(JSON.stringify(msg))
// sendMsg(JSON.stringify(msg))
// this.props.changeIsSend(true)
this
.
props
.
tempLogout
()
this
.
props
.
tempLogout
()
}
}
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
116fea35
...
@@ -205,7 +205,19 @@ class PageContainer extends React.Component {
...
@@ -205,7 +205,19 @@ class PageContainer extends React.Component {
break
;
break
;
case
'SUCCESS_CLOSEDOOR'
:
case
'SUCCESS_CLOSEDOOR'
:
if
(
isSend
){
if
(
isSend
){
// this.handleCloseDoor()
if
(
area
===
"A"
){
if
(
data
.
info
.
left_tread
===
1
){
this
.
handleCloseDoor
()
}
else
{
sendMsg
(
JSON
.
stringify
({
type
:
'WILL_CLOSEDOOR'
}))
}
}
else
if
(
area
===
"B"
){
if
(
data
.
info
.
right_tread
===
1
){
this
.
handleCloseDoor
()
}
else
{
sendMsg
(
JSON
.
stringify
({
type
:
'WILL_CLOSEDOOR'
}))
}
}
}
}
break
;
break
;
...
@@ -587,6 +599,9 @@ class PageContainer extends React.Component {
...
@@ -587,6 +599,9 @@ class PageContainer extends React.Component {
case
'PF'
:
case
'PF'
:
this
.
changePages
(
CONFIG
.
showPage
[
14
]);
this
.
changePages
(
CONFIG
.
showPage
[
14
]);
break
;
break
;
case
'ER'
:
this
.
changePages
(
CONFIG
.
showPage
[
12
]);
break
;
}
}
}
else
{
}
else
{
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
...
@@ -683,9 +698,8 @@ class PageContainer extends React.Component {
...
@@ -683,9 +698,8 @@ class PageContainer extends React.Component {
showOpenDoorPage=
{
()
=>
this
.
showOpenDoorPage
.
bind
(
this
)()
}
showOpenDoorPage=
{
()
=>
this
.
showOpenDoorPage
.
bind
(
this
)()
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
tempLogout=
{
()
=>
this
.
tempLogout
.
bind
(
this
)()
}
willCloseDoor=
{
()
=>
{
dispatch
(
willCloseDoor
(
commonInfo
))}
}
willCloseDoor=
{
()
=>
{
dispatch
(
willCloseDoor
(
commonInfo
))}
}
changeIsSend
={
this
.
changeIsSend
.
bind
(
this
)}
/>
;
/>
;
break;
break;
/*以下是二期页面 start*/
/*以下是二期页面 start*/
...
@@ -706,6 +720,7 @@ class PageContainer extends React.Component {
...
@@ -706,6 +720,7 @@ class PageContainer extends React.Component {
willCloseDoor=
{
()
=>
{
dispatch
(
willCloseDoor
(
commonInfo
))}
}
willCloseDoor=
{
()
=>
{
dispatch
(
willCloseDoor
(
commonInfo
))}
}
closeDoor=
{
true
}
closeDoor=
{
true
}
tempLogout=
{
()
=>
this
.
tempLogout
.
bind
(
this
)()
}
tempLogout=
{
()
=>
this
.
tempLogout
.
bind
(
this
)()
}
changeIsSend
={
this
.
changeIsSend
.
bind
(
this
)}
/>
;
/>
;
break;
break;
case showPage[12]:
case showPage[12]:
...
...
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