线下活动

获取线下活动列表

GET /offline_activities

权限

  • 需要认证

响应

{
    "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:审核未通过)

显示规则说明

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

获取线下活动详情

GET /offline_activities/{id}

权限

  • 需要认证

响应

{
    "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:审核未通过)

报名线下活动

POST /offline_activity/{offlineActivityId}/members

权限

  • 需要认证

响应成功

{
    "result": true
}

错误

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

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

获取线下活动成员列表

GET /offline_activity/{offlineAcivityId}/members

权限

  • 不需要认证
{
    "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
    }
}

results matching ""

    No results matching ""