Skip to content

线下活动

获取线下活动列表

GET /offline_activities

权限

  • 需要认证

响应

json
{
    "data": [
        {
            "id": "2",
            "title": "黑客马拉松",
            "summary": "<p>第二届黑客马拉松</p>\n",
            "cover": {
                "large": "http://dev.training.com/files/default/2018/01-10/11085025aa31402230.png",
                "middle": "http://dev.training.com/files/default/2018/01-10/11085025b7d7393321.png",
                "small": "http://dev.training.com/files/default/2018/01-10/11085025c4d9501811.png"
            },
            "startDate": "1515552600",
            "endDate": "1516416300",
            "enrollmentEndDate": "1515551600",
            "address": "301办公室",
            "studentNum": "1",
            "maxStudentNum": "0",
            "status": "published",
            "activityTimeStatus": "ongoing",
            "categoryName": "默认分类",
            "applyStatus": "join"
        }
    ],
    "paging": {
        "total": 1,
        "offset": 0,
        "limit": 10
    }
}

参数说明

字段描述
activityTimeStatus活动状态:end(已结束),ongoing(进行中)

字段说明

字段描述
id线下活动id
titile线下活动标题
sumary活动介绍
cover活动封面
satrtDate活动开始时间
endDate活动结束时间
enrollmentEndDate报名截止时间
address活动地址
studentNum参加活动学员数
maxStudetNum活动最大人数(0表示不限制人数)
status活动状态(draft(草稿), published(已发布), closed(关闭))
activityTimeStatus活动状态(end:结束,ongoing:进行中,notStart:未开始)
categoryName分类名称
applyStatus活动申请状态(join:报名成功,enrollmentEnd:报名结束,submitted:审核中,enrollAble:能报名,enrollUnable:名额已满,rejected:审核未通过, notAvailableForYou: 暂未对您开放)

显示规则说明

  • 当activityTimeStatus为end时显示活动已结束
  • 当activityTimeStatus为ongoing时表示活动还在进行中

获取线下活动详情

GET /offline_activities/{id}

权限

  • 需要认证

响应

json
{
    "id": "1",
    "title": "测试创建活动",
    "summary": "",
    "cover": {
        "small": "http://dev.training.com/assets/img/default/course.png",
        "middle": "http://dev.training.com/assets/img/default/course.png",
        "large": "http://dev.training.com/assets/img/default/course.png"
    },
    "startDate": "1513669800",
    "endDate": "1513928700",
    "enrollmentEndDate": "1515551600",
    "address": "test",
    "maxStudentNum": "0",
    "studentNum": "8",
    "status": "published",
    "activityTimeStatus": "end",
    "categoryName": "默认分类",
    "applyStatus": "join"
}

字段说明

字段描述
id线下活动id
titile线下活动标题
sumary活动介绍
cover活动封面
satrtDate活动开始时间
endDate活动结束时间
enrollmentEndDate报名截止时间
address活动地址
studentNum参加活动学员数
maxStudetNum活动最大人数(0表示不限制人数)
status活动状态(draft(草稿), published(已发布), closed(关闭))
activityTimeStatus活动状态(end:结束,ongoing:进行中)
categoryName分类名称
applyStatus活动申请状态(join:报名成功,enrollmentEnd:报名结束,submitted:审核中,enrollAble:能报名,enrollUnable:名额已满,rejected:审核未通过, notAvailableForYou: 暂未对您开放)

报名线下活动

POST /offline_activity/{offlineActivityId}/members

权限

  • 需要认证

响应成功

{
    "result": true
}

错误

失败响应Error结构体,错误码有

Code错误说明HTTP状态码
10教学计划不存在404

获取线下活动成员列表

GET /offline_activity/{offlineAcivityId}/members

权限

  • 不需要认证
json
{
    "data": [
        {
            "offlineActivityId": "1",
            "user": {
                "id": "9",
                "nickname": "iron4",
                "title": "",
                "postName": "",
                "avatar": {
                    "small": "http://dev.training.com/assets/img/default/avatar.png",
                    "middle": "http://dev.training.com/assets/img/default/avatar.png",
                    "large": "http://dev.training.com/assets/img/default/avatar.png"
                }
            }
        },
        {
            "offlineActivityId": "1",
            "user": {
                "id": "8",
                "nickname": "iron3",
                "title": "",
                "postName": "java开发工程师",
                "avatar": {
                    "small": "http://dev.training.com/assets/img/default/avatar.png",
                    "middle": "http://dev.training.com/assets/img/default/avatar.png",
                    "large": "http://dev.training.com/assets/img/default/avatar.png"
                }
            }
        }
    ],
    "paging": {
        "total": 2,
        "offset": 0,
        "limit": 10
    }
}