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
c6c2347e
Commit
c6c2347e
authored
Nov 15, 2019
by
niuxinyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关门优化8
parent
0582046d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
client/containers/HomePageContainer/HomePageContainer.jsx
+22
-19
No files found.
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
c6c2347e
...
...
@@ -3,6 +3,8 @@ import HeaderComponent from '../../components/CommonComponent/HeaderComponent/He
import
Button
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
PopModel
from
'../../components/CommonComponent/PopupComponent/PopupChildComponent'
import
{
sendMsg
}
from
"../../util/socket"
;
import
axios
from
'axios'
axios
.
defaults
.
withCredentials
=
true
require
(
'./index.css'
);
let
domain
=
ENV
.
domain
;
export
default
class
HomePageContainer
extends
React
.
Component
{
...
...
@@ -67,19 +69,20 @@ export default class HomePageContainer extends React.Component{
try
{
// this.
axios.post(domain+'machine_pad/finish_task.action',{
//
area:this.props.headerInfo.taskInfo.area,
//
storeId:this.props.headerInfo.storeInfo.id,
//
taskId:this.props.headerInfo.taskInfo.taskId,
//
taskType:this.props.headerInfo.taskInfo.currentTaskType,
//
userId:this.props.headerInfo.userInfo.employeeId
axios
.
post
(
domain
+
'machine_pad/finish_task.action'
,{
area
:
this
.
props
.
headerInfo
.
taskInfo
.
area
,
storeId
:
this
.
props
.
headerInfo
.
storeInfo
.
id
,
taskId
:
this
.
props
.
headerInfo
.
taskInfo
.
taskId
,
taskType
:
this
.
props
.
headerInfo
.
taskInfo
.
currentTaskType
,
userId
:
this
.
props
.
headerInfo
.
userInfo
.
employeeId
// }).then((res)=>{
// if(res.status!=200){
// var error = new Error(response.statusText)
// error.response = response
// throw error
// }else{
}).
then
((
res
)
=>
{
if
(
res
.
status
!=
200
){
var
error
=
new
Error
(
response
.
statusText
)
error
.
response
=
response
throw
error
}
else
{
console
.
log
(
'res'
,
res
)
this
.
props
.
willCloseDoor
().
then
(()
=>
{
this
.
props
.
endCountBack
();
let
msg
=
{
type
:
'WILL_CLOSEDOOR'
};
...
...
@@ -88,13 +91,13 @@ export default class HomePageContainer extends React.Component{
// this.props.tempLogout()
console
.
log
(
'有网络'
,
this
.
props
)
})
//
}
//
})
//
.catch((err)=>{
//
this.setState({ closeDoorStatus : 0},()=>{
//
alert('当前网络不佳,请稍后重试')
//
})
//
})
}
})
.
catch
((
err
)
=>
{
this
.
setState
({
closeDoorStatus
:
0
},()
=>
{
alert
(
'当前网络不佳,请稍后重试'
)
})
})
// this.props.willCloseDoor().then(()=>{
...
...
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