Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
taochepaiRN
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shangbj
taochepaiRN
Commits
41013d7c
Commit
41013d7c
authored
Jun 21, 2018
by
王迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
长时拍数据
parent
fca68a54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
index.js
src/api/index.js
+9
-4
auctionActions.js
src/reducers/auction/auctionActions.js
+2
-2
auctionReducer.js
src/reducers/auction/auctionReducer.js
+1
-0
No files found.
src/api/index.js
View file @
41013d7c
const
HOST
=
'http://localhost:3600/api/'
;
const
DEV
=
'http://192.168.155.56'
;
// 开发环境
const
TEST
=
'http://192.168.155.26'
;
// 测试环境
const
PRE
=
'http://test.biz.taoche.com'
;
// 预发布环境
const
PROD
=
'https://h5-biz.taoche.com'
;
// 生产环境
function
_apiFetch
(
ur
i
,
params
,
headers
,
method
=
'GET'
)
{
return
fetch
(
`
${
HOST
}${
uri
}
`
,
{
function
_apiFetch
(
ur
l
,
params
,
headers
,
method
=
'GET'
)
{
return
fetch
(
`
${
TEST
}${
url
}
`
,
{
headers
:
Object
.
assign
({
'Content-Type'
:
'application/json'
,
'Cache-Control'
:
'no-cache'
'Cache-Control'
:
'no-cache'
,
'x-access-token'
:
'd2de6bf1-6f29-4a8d-9bb3-d96789c3fd97'
},
headers
),
method
,
body
:
JSON
.
stringify
(
params
)
...
...
@@ -21,6 +26,6 @@ function _authFetch(config) {
export
default
{
getListData
(
params
)
{
return
_apiFetch
(
'
listdata'
,
params
);
return
_apiFetch
(
'
/v1/license-certificate/query'
,
{},
{},
'POST'
);
},
};
src/reducers/auction/auctionActions.js
View file @
41013d7c
...
...
@@ -14,8 +14,8 @@ export function getLongAuctionList(params) {
try
{
const
res
=
await
api
.
getListData
();
const
resJson
=
await
res
.
json
();
if
(
res
.
status
===
20
0
)
{
dispatch
(
getLoanListSucc
(
resJson
.
listData
));
if
(
res
Json
.
code
===
0
)
{
dispatch
(
getLoanListSucc
(
resJson
.
data
.
record
));
}
}
catch
(
err
)
{
console
.
warn
(
err
);
...
...
src/reducers/auction/auctionReducer.js
View file @
41013d7c
...
...
@@ -12,6 +12,7 @@ export default function auctionReducer (state = initialState, action) {
switch
(
action
.
type
)
{
case
GET_LIST_SUCC
:
{
const
listData
=
fromJS
(
action
.
payload
);
console
.
log
(
listData
);
return
state
.
setIn
([
'listData'
],
listData
);
}
}
...
...
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