Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kfw_web_js
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AppWaiBao
kfw_web_js
Commits
1264e486
Commit
1264e486
authored
Mar 22, 2021
by
garyZlot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use real API
parent
d30ba9d2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
97 deletions
+97
-97
Poster.js
src/components/Poster.js
+97
-97
No files found.
src/components/Poster.js
View file @
1264e486
...
@@ -29,102 +29,102 @@ class Poster extends Component {
...
@@ -29,102 +29,102 @@ class Poster extends Component {
cookie
:
this
.
state
.
cookie
cookie
:
this
.
state
.
cookie
};
};
//
axios.post((this.state.showHistory ? "/flow/v1_0/activity/activity_history" : "/flow/v1_0/activity/courier_activity"), paramData).then(res => {
axios
.
post
((
this
.
state
.
showHistory
?
"/flow/v1_0/activity/activity_history"
:
"/flow/v1_0/activity/courier_activity"
),
paramData
).
then
(
res
=>
{
//mock data
//mock data
const
mockRes
=
{
//
const mockRes = {
"resperr"
:
""
,
//
"resperr": "",
"respcd"
:
"0000"
,
//
"respcd": "0000",
"respmsg"
:
""
,
//
"respmsg": "",
"data"
:
{
//
"data": {
"kind"
:
"CourierActivity"
,
//
"kind": "CourierActivity",
"data"
:
[
//
"data": [
{
//
{
"status"
:
1
,
//
"status": 1,
"courier_record"
:
{
//
"courier_record": {
"finish_count"
:
17
,
//
"finish_count": 17,
"reward_amount"
:
0
//
"reward_amount": 0
},
//
},
"task_id"
:
2
,
//
"task_id": 2,
"remain_minutes"
:
58
,
//
"remain_minutes": 58,
"start_time"
:
"2021-03-14 19:00:40"
,
//
"start_time": "2021-03-14 19:00:40",
"end_time"
:
"2021-03-25 19:00:40"
,
//
"end_time": "2021-03-25 19:00:40",
"type_json"
:
[
//
"type_json": [
{
//
{
"count"
:
12
,
//
"count": 12,
"price"
:
600
//
"price": 600
},
//
},
{
//
{
"count"
:
20
,
//
"count": 20,
"price"
:
1800
//
"price": 1800
},
//
},
{
//
{
"count"
:
30
,
//
"count": 30,
"price"
:
3000
//
"price": 3000
},
//
},
{
//
{
"count"
:
36
,
//
"count": 36,
"price"
:
6000
//
"price": 6000
},
//
},
{
//
{
"count"
:
45
,
//
"count": 45,
"price"
:
8400
//
"price": 8400
},
//
},
{
//
{
"count"
:
50
,
//
"count": 50,
"price"
:
11000
//
"price": 11000
}
//
}
],
//
],
"reward_type"
:
1
,
//
"reward_type": 1,
"remain_hours"
:
7
//
"remain_hours": 7
},
//
},
{
//
{
"status"
:
0
,
//
"status": 0,
"courier_record"
:
{
//
"courier_record": {
"finish_count"
:
40
,
//
"finish_count": 40,
"reward_amount"
:
0
//
"reward_amount": 0
},
//
},
"task_id"
:
1
,
//
"task_id": 1,
"remain_minutes"
:
""
,
//
"remain_minutes": "",
"start_time"
:
"2021-03-20 19:00:40"
,
//
"start_time": "2021-03-20 19:00:40",
"end_time"
:
"2021-03-30 19:00:40"
,
//
"end_time": "2021-03-30 19:00:40",
"type_json"
:
[
//
"type_json": [
{
//
{
"count"
:
12
,
//
"count": 12,
"price"
:
600
//
"price": 600
},
//
},
{
//
{
"count"
:
20
,
//
"count": 20,
"price"
:
1800
//
"price": 1800
},
//
},
{
//
{
"count"
:
30
,
//
"count": 30,
"price"
:
3000
//
"price": 3000
},
//
},
{
//
{
"count"
:
36
,
//
"count": 36,
"price"
:
6000
//
"price": 6000
},
//
},
{
//
{
"count"
:
45
,
//
"count": 45,
"price"
:
8400
//
"price": 8400
},
//
},
{
//
{
"count"
:
50
,
//
"count": 50,
"price"
:
11000
//
"price": 11000
}
//
}
],
//
],
"reward_type"
:
1
,
//
"reward_type": 1,
"remain_hours"
:
""
//
"remain_hours": ""
}
//
}
]
//
]
}
//
}
};
//
};
const
res
=
{
//
const res = {
status
:
200
,
//
status: 200,
data
:
mockRes
//
data: mockRes
};
//
};
//end mock data
//end mock data
...
@@ -156,9 +156,9 @@ class Poster extends Component {
...
@@ -156,9 +156,9 @@ class Poster extends Component {
historyRecordArr
:
historyArr
historyRecordArr
:
historyArr
});
});
//
}).catch(error => {
}).
catch
(
error
=>
{
//
console.error(error)
console
.
error
(
error
)
//
});
});
}
}
...
...
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