#### 申请
~~~[api]
post:/agent/apply
*string:id_card_name#姓名
*string:id_card_number#身份证号码
<<<
success
{
"message": "申请成功,请等待审核",
"code": 1,
"data": []
}
<<<
error
{
"message": "已申请,请等待审核",
"code": 0,
"data": []
}
<<<
error
{
"message": "已申请,并且审核通过",
"code": 0,
"data": []
}
<<<
error
{
"message": "已申请,并且审核驳回",
"code": 0,
"data": []
}
~~~
#### 个人信息
~~~[api]
post:/agent/personal
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 1,
"member_id": 6,
"id_card_name": "谢煜程",
"id_card_number": "123456789012345678",
"level": 1,
"flow": 0,
"is_audit": 1,
"status": 10,
"created_at": 1525751583,
"updated_at": 1525751583
}
}
~~~
#### 流量价格
~~~[api]
get:/agent/flow-price
<<<
success
{
"message": "success",
"code": 1,
"data": [
{
"level": 1,
"price": 1,
"discount": "1"
},
{
"level": 2,
"price": 1,
"discount": "0.9"
},
{
"level": 3,
"price": 1,
"discount": "0.8"
},
{
"level": 4,
"price": 1,
"discount": "0.7"
},
{
"level": 5,
"price": 1,
"discount": "0.6"
}
]
}
~~~
#### 流量充值
~~~[api]
post:/agent/flow-recharge
*number:flow#流量
*number:pay_type#支付类型,1=>微信支付,2=>支付宝,3=>...
<<<
success
{
"message": "success",
"code": 1,
"data": {
"member_id": 20,
"sn": "20180504142926457962",
"price": 10,
"flow": 10,
"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": []
}
~~~
#### 流量赠送
~~~[api]
post:/agent/flow-give
*number:flow#流量
*string:mobile#手机号码
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 1,
"member_id": 6,
"id_card_name": "谢先生",
"id_card_number": "123456789012345678",
"level": 2,
"flow": 0,
"is_audit": 1,
"status": 10,
"created_at": 1525751583,
"updated_at": 1525856084
}
}
<<<
error
{
"message": "流量不足",
"code": 0,
"data": []
}
<<<
error
{
"message": "请输入有效的手机号码",
"code": 0,
"data": []
}
<<<
error
{
"message": "用户数据错误",
"code": 0,
"data": []
}
~~~
#### 流量记录
> 操作,0=>充值,1=>赠送
~~~[api]
get:/agent/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
}
}
~~~