1092772959 / AppDevelopment

夏季小学期app开发
0 stars 1 forks source link

礼品信息以及兑换请求接口 #3

Open bnshen opened 5 years ago

bnshen commented 5 years ago

url:"/api/gift" // 请求1

{ "method":"GET", "headers":"你们看", "Content-Type":"application/json" }

// 返回1 { "items":[ { "name":"xiaomi", "id":"1",
"description":"Throughout the history of smartphones, Snapdragon™ has been there as an engine powering the world's devices. Now, the Snapdragon™ 855 presents another leap forward in performance. Made with 7nm process technology, it leads the pack, and we are proud to be the first to put it in your hands through Mi 9.", "redeemed":false, //是否兑换过,参照兑换记录 "available":false, //是否可兑换,否(固定) "year":2019,
"month":6, "day":10, "stepNeed":10000, //需要的步数 "stepNow":0, //0(固定) "img_url":"xxx" //有且只有一条 } ] }

//请求2 { "method":"POST", "headers":"你们看", "Content-Type":"application/x-www-form-urlencoded", "body":{ "user_id":"xxx", "prize_id":"xxx" } }

// 返回2 { "status":"200" }