Commit 1264e486 by garyZlot

use real API

parent d30ba9d2
...@@ -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)
// }); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment