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
98f22d1a
Commit
98f22d1a
authored
Sep 13, 2018
by
wujiabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改 TokeStoke reducer
parent
c20a24a6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
client/actions/TokeStokeContainer.js
+27
-0
client/reducers/TokeStokeContainer.js
+16
-2
No files found.
client/actions/TokeStokeContainer.js
View file @
98f22d1a
import
fetch
from
'isomorphic-fetch'
import
fetch
from
'isomorphic-fetch'
//初始的任务 返回工单
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:{}
}).
then
(
response
=>
response
.
json
())
.
then
((
data
)
=>
{
console
.
log
(
data
)
}).
catch
(
e
=>
{
console
.
log
(
'err'
+
e
)})
//点击提交后台核对商品数量 后台应该返回我ture 或者 false
fetch
(
url
,{
credentials
:
'include'
,
method
:
'POST'
,
mode
:
'cors'
,
headers
:
{
'content-type'
:
'application/json;charset=UTF-8'
,
},
body
:{}
}).
then
(
response
=>
response
.
json
())
.
then
((
data
)
=>
{
console
.
log
(
data
)
}).
catch
(
e
=>
{
console
.
log
(
'err'
+
e
)})
\ No newline at end of file
client/reducers/TokeStokeContainer.js
View file @
98f22d1a
import
actionType
from
'../actiontype/TokeStokeContainer'
import
{
GET_TOKESTOKE_INFO
,
SUBMIT_NUM
}
from
'../actiontype/TokeStokeContainer'
\ No newline at end of file
const
addTokeState
=
(
state
,
data
)
=>
{
return
Object
.
assign
({},
state
,
data
)
}
export
default
function
(
state
=
{},
action
){
switch
(
action
.
type
){
case
GET_TOKESTOKE_INFO
:
break
;
case
SUBMIT_NUM
:
break
;
default
:
return
state
;
}
}
\ No newline at end of file
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