[TOC] ## 已购套餐列表 ~~~[api] get:/v1/user-packages integer:page=1#当前页码 integer:limit=10#单页显示数量 <<< 返回结果 { "code": 0, "count": 1, "data": [ { ".cname_domain": "cdnfly.com", "backup_node_group": null, "cname_domain": "cdnfly.com", "cname_hostname": "v325sf8j-u", "cname_hostname2": "", "cname_mode": "site", "create_at": null, "custom_cc_rule": 0, "domain": 13, "enable_backup_group": 0, "end_at": null, "end_at2": "2021-12-16 14:47:38", "http_port": 3, "id": 425, "month_price": 0, "name": "ff", "node_group_id": 490, "package": 384, "package_name": "ff", "quarter_price": 0, "record_id": "730250034299123712", "region_id": 646, "start_at": null, "start_at2": "2021-11-16 14:47:38", "stream_port": 30, "task_id": 94734, "traffic": 100, "uid": 2, "user_name": "jason", "user_package_name": "ff", "websocket": 1, "year_price": 0 } ] } ~~~ ## 购买套餐 ~~~[api] post:/v1/user-packages *integer:package#在售套餐ID name#自定义套餐名称,留空则使用在售套餐名称 *duration#购买的时长,可选值为month、quarter、year <<< 返回结果 { "code":0, "data": "1", "msg": "套餐添加成功" } <<< 提交内容 { "package": 384, "duration": "month", "name": "ff" } ~~~ ## 获取指定已购套餐详情 ~~~[api] get:/v1/user-packages/<套餐ID> duration#获取续费价格,可选值为month、quarter、year <<< 返回结果 { "code": 0, "data": { "backup_node_group": null, "cname_domain": "cdnfly.com", "cname_hostname": "v325sf8j-u", "cname_hostname2": "", "cname_mode": "site", "create_at": null, "custom_cc_rule": 0, "domain": 13, "enable_backup_group": 0, "end_at": null, "end_at2": "2021-12-16 14:47:38", "http_port": 3, "id": 425, "month_price": 0, "name": "ff", "node_group_id": 490, "node_group_name": null, "p.custom_cc_rule": 0, "p.domain": 13, "p.http_port": 3, "p.stream_port": 30, "p.traffic": 100, "package": 384, "package_name": "ff", "quarter_price": 0, "record_id": "730250034299123712", "region_id": 646, "start_at": null, "start_at2": "2021-11-16 14:47:38", "stream_port": 30, "task_id": 94734, "traffic": 100, "uid": 2, "websocket": 1, "year_price": 0 }, "msg": "" } ~~~ ## 续费套餐 ~~~[api] put:/v1/user-packages/<套餐ID> duration#续费时长,可选值为month、quarter、year <<< 返回结果 { "code":0, "data": "", "msg": "更新用户套餐成功" } <<< 提交内容 { "duration": "month" } ~~~ ## 删除套餐 ~~~[api] delete:/v1/user-packages/<套餐ID,多个以逗号分隔> <<< 返回结果 { "code": 0, "data": "", "msg": "用户套餐删除成功" } ~~~