打卡后的分享
儿童编程
tag
课程返回的字段
查看课程是否有分享权限
Method and Url Structure
Method |
Resource URL |
POST |
/server/userinfo/check_share_right/ |
Request and Parameters
Name |
Description |
Required |
Default |
tag |
课程tag值 |
YES |
|
pk |
课程pk |
YES |
|
Request
{
"tag": "HTML&CSS&JavaScript",
"pk: "5"
}
cURL Example
curl -X GET -H 'Authorization: Token tester001' -d data{...}
https://app.bcjiaoyu.com/server/userinfo/check_share_right/
JSON Response
{
"cur_share_count": 0,
"tag": "HTML&CSS&JavaScript",
"next_act_name": "活动名下",
"cur_act_name": "前端编程入门(上)",
"owner": "13263699826",
"share_count": 10,
"share_amount": 99
}
# 或 status -4
{
"status": -4,
"message": "无分享权限"
}
领取分享奖励
Method and Url Structure
Method |
Resource URL |
POST |
/server/userinfo/receive_share_reward/ |
Request and Parameters
Name |
Description |
Required |
Default |
tag |
课程tag值 |
YES |
|
Request
{
"tag": "HTML&CSS&JavaScript"
}
cURL Example
curl -X GET -H 'Authorization: Token tester001' -d data{...}
https://app.bcjiaoyu.com/server/userinfo/receive_share_reward/
JSON Response
{
"status": 0,
"message": ""
}
# 或 4 种错误情况
{
"status": -4,
"message": "无分享记录/分享次数不足/活动中无课程/下期活动缺少tag数据"
}
分享成功后保存记录
Method and Url Structure
Method |
Resource URL |
POST |
/server/share/add_share_record/ |
cURL Example
curl -X POST -H -d data{...}
https://app.bcjiaoyu.com/server/share/add_share_record/
Request and Parameters
Name |
Description |
Required |
Default |
owner |
手机号 |
YES |
|
tag |
tag值 |
YES |
|
pk |
pk |
YES |
|
Request
{
"owner": "13266666666",
"tag": "HTML&CSS&JavaScript",
"pk": "pk"
}
JSON Response
{
"status": 0,
"message": ""
}
网页分享获取微信签名参数
Method and Url Structure
Method |
Resource URL |
POST |
/server/userinfo/wx_share_param/ |
cURL Example
curl -X POST -H -d data{...}
https://app.bcjiaoyu.com/server/userinfo/wx_share_param/
Request and Parameters
Name |
Description |
Required |
Default |
url |
页面地址 |
YES |
|
Request
{
"url": "www.baidu.com"
}
JSON Response
{
"url": "www.baidu.com",
"timestamp": 1532599124,
"jsapi_ticket": "HoagFKDcsGMVCIY2vOjf9nv347bzadHpMABDY9Tc6G2LxlzPmyK7b2cwJLm7W0Q3y3DKsMN1aGJCNv6d3aLBXA",
"signature": "9abfd956222459ddd1a3cf02cad35fb79733799e",
"appid": "wxdb060736fc592312",
"nonceStr": "zrgudTR6Dn8KPpj"
}
分享获取小程序码
Method and Url Structure
Method |
Resource URL |
POST |
/server/userinfo/qrcode_share/ |
cURL Example
curl -X POST -H -d data{...}
https://app.bcjiaoyu.com/server/userinfo/qrcode_share/
Request and Parameters
Name |
Description |
Required |
Default |
path |
小程序页面 |
YES |
|
tag |
活动标记 |
YES |
|
Request
{
"path": "/pages/getTelVerifycode/getTelVerifycode?pk=",
"tag": "SingleScratch"
}
JSON Response
{
"status": 0,
"url": "https://app.bcjiaoyu.com/media/weixin/2/c87095c421338c609dcc46b2d23197e31ff82932.jpg",
"message": ""
}