#### 充值价格
> 1元等于1M流量并赠送100积分
~~~[api]
get:/flow/recharge-price
<<<
success
{
"message": "success",
"code": 1,
"data": {
"price": 1,
"flow": 1,
"point": 100,
"package": [
{
"number": 1,
"price": 10,
"flow": 10,
"point": 1000
},
{
"number": 2,
"price": 49.5,
"flow": 50,
"point": 5000
},
{
"number": 3,
"price": 98,
"flow": 100,
"point": 10000
},
{
"number": 4,
"price": 488,
"flow": 500,
"point": 50000
}
]
}
}
~~~
#### 充值
~~~[api]
post:/flow/recharge
*number:number#套餐号码
number:flow#流量
*number:pay_type#支付类型,1=>微信支付,2=>支付宝,3=>...
<<<
success
{
"message": "success",
"code": 1,
"data": {
"member_id": 20,
"sn": "20180504142926457962",
"price": 10,
"flow": 10,
"point": 1000,
"pay_type": 1,
"status": 10,
"created_at": 1525415366,
"updated_at": 1525415366,
"id": 14,
"jsApiConfig": {
"appId": "xxxx",
"timeStamp": "1525415367",
"nonceStr": "5aebfdc723b86",
"package": "prepay_id=wx0414292708429083b40a71b70902607790",
"signType": "MD5",
"paySign": "B5079A03326956D29C3F49EF08B79C77"
}
}
}
<<<
error
{
"message": "不支持的支付方式",
"code": 0,
"data": []
}
<<<
example
{
"number": 1
}
<<<
example
{
"number": 0,
"flow": 20
}
~~~
#### 提取
~~~[api]
post:/flow/extract
*string:mobile#手机号码
*number:flow#流量
<<<
success
{
"message": "success",
"code": 1,
"data": {
"flow": 1009
}
}
<<<
error
{
"message": "流量不足",
"code": 0,
"data": []
}
~~~
#### 记录
> 操作,0=>充值,1=>提取,2=>获赠
~~~[api]
get:/flow/record
number:p=1#当前页数
number:ps=20#分页大小
<<<
success
{
"message": "success",
"code": 1,
"data": [
{
"id": "1",
"member_id": "6",
"flow_id": "6",
"operator_id": "1",
"recharge_sn": "",
"operate": "1",
"money": "10.00",
"before": "0.00",
"after": "10.00",
"remark": "",
"status": "10",
"created_at": "1451577600",
"updated_at": "1451577600"
}
],
"_meta": {
"totalCount": 1,
"pageCount": 1,
"currentPage": 1,
"perPage": 20
}
}
~~~