付费用户管理
儿童编程
还差根据微信昵称
查用户
获取付费用户列表
Method and Url Structure
Method |
Resource URL |
GET |
/server/userinfo/payer_list/ |
cURL Example
curl -X GET -H 'Authorization: Token admin123' -d data{...}
http://localhost:8000/server/userinfo/payer_list/
Request and Parameters
Name |
Description |
Required |
Default |
kw |
关键词 |
NO |
|
star |
是否星标 |
NO |
|
course |
课程pk |
NO |
|
extent |
学习进度名称 |
NO |
|
page_size |
每页数量 |
NO |
10 |
Request
kw=123
star=True/False
course=1
extent=Python
page_size=20
JSON Response
{
"count": 39,
"next": "http://localhost:8000/server/userinfo/payer_list/?page=2",
"previous": null,
"results": [
{
"pk": 98,
"owner": "12345678900",
"name": "昵称",
"avatar": "https://static1.bcjiaoyu.com/head1@3x.png",
"age": 0,
"points": 0,
"lesson_total": 0,
"is_seller": false,
"commission": "0.00",
"my_seller": null,
"remark": null,
"teacher": {
"owner": "12345",
"pk": 108
},
"student": {
"pk": 92,
"owner": "12345",
"name": "",
"nickname": "",
"avatar": "",
"sex": "S",
"birthday": null
},
"identity": "student",
"is_pay": true,
"is_bind": false,
"bind_account": "tester003",
"group_info": {
"status": 3,
"status_display": "未组队有资格"
},
"star": false,
"realname": null,
"city": null,
"learn_extent": null,
"follow_up": null,
"follow_up_display": null,
"deep_consume": null,
"deep_consume_display": null,
"sex": null,
"sex_display": null
},
...
}
更新用户信息
Method and Url Structure
Method |
Resource URL |
POST |
/course/my_new_homeworks/ |
Request and Parameters
Name |
Description |
Required |
Default |
username |
用户名 |
YES |
|
star |
星标 |
NO |
|
realname |
真实姓名 |
NO |
|
age |
年龄 |
NO |
|
sex |
性别 |
NO |
|
city |
城市 |
NO |
|
remark |
备注 |
NO |
|
follow_up |
后续状态 |
NO |
|
deep_consume |
深度付费课程 |
NO |
|
Request
{
"username": "tester001",
"star": false,
"realname": "真实姓名",
"age":100,
"sex": "male",
"city": "城市",
"remark": "备注备注",
"follow_up": "one2one",
"deep_consume": "5_class_bag"
}
# 可传的值
star: true / false
sex: 'male' / 'female'
follow_up:
'one2one' # 购买一对一
'consider' # 考虑中
'abandon' # 放弃购买
'appointment'# 预约试听
deep_consume:
'5_class_bag' # 5课时课时包
'30_class_bag' # 30
'60_class_bag' # 60
cURL Example
curl -X POST -H 'Authorization: Token admin123' -d data{...}
http://localhost:8000/server/userinfo/payer_update/
JSON Response
{
"pk": 1,
"owner": "tester001",
"name": "001tester",
"avatar": "http://test.png",
"age": 100,
"points": 0,
"lesson_total": 0,
"is_seller": false,
"commission": "0.00",
"my_seller": null,
"remark": "备注备注",
"teacher": {
"owner": "tester001",
"pk": 2
},
"student": {
"pk": 1,
"owner": "tester001",
"name": "tester",
"nickname": "test",
"avatar": "http://test.png",
"sex": "S",
"birthday": null
},
"identity": null,
"is_pay": true,
"is_bind": false,
"bind_account": "o-Iae4g9R2hdZNt0VMXWTrvb510Q",
"group_info": {
"status": 3,
"status_display": "未组队有资格"
},
"star": false,
"realname": "真实姓名",
"city": "城市",
"learn_extent": null,
"follow_up": "one2one",
"follow_up_display": "购买一对一",
"deep_consume": "5_class_bag",
"deep_consume_display": "5课时课时包",
"sex": "male",
"sex_display": "男"
}
获取访问记录
Method and Url Structure
Method |
Resource URL |
GET |
/server/userinfo/visit_records/ |
cURL Example
curl -X GET -H 'Authorization: Token admin123' -d data{...}
http://localhost:8000/server/userinfo/visit_records/?contact=tester001
Request and Parameters
Name |
Description |
Required |
Default |
contact |
手机号 |
YES |
|
Request
?contact=tester001
JSON Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"pk": 2,
"contact": "tester001",
"detail": "访问内容详情",
"visit_time": "2018-05-05"
},
{
"pk": 1,
"contact": "tester001",
"detail": "访问内容详情",
"visit_time": null
}
]
}
创建访问记录
Method and Url Structure
Method |
Resource URL |
POST |
/server/userinfo/visit_record_create/ |
Request and Parameters
Name |
Description |
Required |
Default |
contact |
手机号 |
YES |
|
detail |
详情 |
NO |
|
visit_time |
访问时间 |
NO |
|
Request
{
"contact": "tester001",
"detail": "访问内容详情",
"visit_time": "2018-5-5"
}
cURL Example
curl -X POST -H 'Authorization: Token admin123' -d data{...}
http://localhost:8000/server/userinfo/visit_record_create/
JSON Response
{
"pk": 2,
"contact": "tester001",
"detail": "访问内容详情",
"visit_time": "2018-05-05"
}