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
4f755758
Commit
4f755758
authored
Jan 07, 2019
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复开关门
parent
116fea35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
client/containers/PageContainer/PageContainer.jsx
+4
-3
No files found.
client/containers/PageContainer/PageContainer.jsx
View file @
4f755758
...
@@ -178,7 +178,6 @@ class PageContainer extends React.Component {
...
@@ -178,7 +178,6 @@ class PageContainer extends React.Component {
getSocketMsg
(
data
){
getSocketMsg
(
data
){
let
{
dispatch
,
state
}
=
this
.
props
;
let
{
dispatch
,
state
}
=
this
.
props
;
let
{
isSend
,
area
}
=
this
.
state
;
let
{
isSend
,
area
}
=
this
.
state
;
data
.
isSend
=
isSend
;
switch
(
data
.
type
){
switch
(
data
.
type
){
case
'SUCCESS_OPENDOOR'
:
case
'SUCCESS_OPENDOOR'
:
//执行开门
//执行开门
...
@@ -205,14 +204,16 @@ class PageContainer extends React.Component {
...
@@ -205,14 +204,16 @@ class PageContainer extends React.Component {
break
;
break
;
case
'SUCCESS_CLOSEDOOR'
:
case
'SUCCESS_CLOSEDOOR'
:
if
(
isSend
){
if
(
isSend
){
let
{
info
=
{}}
=
data
;
let
{
left_tread
=
0
,
right_tread
=
0
}
=
info
;
if
(
area
===
"A"
){
if
(
area
===
"A"
){
if
(
data
.
info
.
left_tread
===
1
){
if
(
left_tread
===
1
){
this
.
handleCloseDoor
()
this
.
handleCloseDoor
()
}
else
{
}
else
{
sendMsg
(
JSON
.
stringify
({
type
:
'WILL_CLOSEDOOR'
}))
sendMsg
(
JSON
.
stringify
({
type
:
'WILL_CLOSEDOOR'
}))
}
}
}
else
if
(
area
===
"B"
){
}
else
if
(
area
===
"B"
){
if
(
data
.
info
.
right_tread
===
1
){
if
(
right_tread
===
1
){
this
.
handleCloseDoor
()
this
.
handleCloseDoor
()
}
else
{
}
else
{
sendMsg
(
JSON
.
stringify
({
type
:
'WILL_CLOSEDOOR'
}))
sendMsg
(
JSON
.
stringify
({
type
:
'WILL_CLOSEDOOR'
}))
...
...
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