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
0582046d
Commit
0582046d
authored
Nov 15, 2019
by
niuxinyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关门优化7
parent
6e5b2e09
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
26 deletions
+24
-26
client/containers/HomePageContainer/HomePageContainer.jsx
+21
-23
client/index.js
+3
-3
No files found.
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
0582046d
...
...
@@ -65,23 +65,21 @@ export default class HomePageContainer extends React.Component{
}
else
{
//正常调用
try
{
console
.
log
(
'有网络'
,
this
.
props
.
headerInfo
.
taskInfo
.
area
,
this
.
props
.
headerInfo
.
storeInfo
.
id
,
this
.
props
.
headerInfo
.
taskInfo
.
taskId
,
this
.
props
.
headerInfo
.
taskInfo
.
currentTaskType
,
this
.
props
.
headerInfo
.
userInfo
.
employeeId
)
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
}).
then
((
res
)
=>
{
if
(
res
.
status
!=
200
){
var
error
=
new
Error
(
response
.
statusText
)
error
.
response
=
response
throw
error
}
else
{
// 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
// }).then((res)=>{
// if(res.status!=200){
// var error = new Error(response.statusText)
// error.response = response
// throw error
// }else{
this
.
props
.
willCloseDoor
().
then
(()
=>
{
this
.
props
.
endCountBack
();
let
msg
=
{
type
:
'WILL_CLOSEDOOR'
};
...
...
@@ -90,13 +88,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(()=>{
...
...
client/index.js
View file @
0582046d
...
...
@@ -8,9 +8,9 @@ import thunkMiddleware from 'redux-thunk';
require
(
'./index.css'
);
import
PageContainer
from
'./containers/PageContainer/PageContainer'
;
const
env
=
process
.
env
.
NODE_ENV
;
import
axios
from
'axios'
React
.
Component
.
prototype
.
axios
=
axios
axios
.
defaults
.
withCredentials
=
true
//
import axios from 'axios'
//
React.Component.prototype.axios=axios
//
axios.defaults.withCredentials=true
function
activateVendor
()
{
const
logMiddleware
=
createLogger
();
return
(
...
...
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