朗读比赛

1 比赛

    1.1 赛事列表

        url: match_list

        return :

{
  "code": 200,
  "msg": "获取赛事列表",
  "data": [
    {
      "ID": 19,
      "title": "测试赛事",
      "pca": "_244_",
      "address": "_沈阳_",
      "per_limit": 100,
      "content": "测试赛事测试赛事",
      "clause_id": 5,
      "start": "2018-06-22 00:00:00",
      "end": "2018-06-23 23:59:59",
      "created_at": "2018-06-22 14:41:00",
      "updated_at": "2018-06-22 14:41:00",
      "welcome_img_id": 5,
      "common_img_id": 0,
      "certificate_img_id": 0,
      "state": 0
    }
  ]
}

    1.2比赛详细

        url: match/上一步的ID

        return:

{
  "code": 200,
  "msg": "获取赛事详细",
  "data": {
    "ID": 19,
    "title": "测试赛事",
    "pca": "_244_",
    "address": [
      "",       //省
      "沈阳",    //市
      ""        //区
    ],
    "per_limit": 100,//人数上限
    "content": "测试赛事测试赛事",//描述
    "start": "2018-06-22 00:00:00",//开始时间
    "end": "2018-06-23 23:59:59",//结束时间
    "welcome_img_id": 5,//欢迎图片
    "common_img_id": 0,//普通背景
    "certificate_img_id": 0,//证书图片
    "state": 0,
    "clause": "

测试赛事测试赛事测试赛事


"//须知 } }

    1.3 地区列表

        url : getaddress

        返回

{
  "code": 200,
  "msg": "获取赛事列表",
  "data": {
    " province": {
      "18": "辽宁省"
    },
    "city": [
      {
        "region_id": 244,//城市id
        "region_name": "沈阳"
      },
      {
        "region_id": 245,
        "region_name": "大连"
      },
     ........
    ],
     "area": {
      "244": [//对应城市id
        {
          "region_id": 2060,//区id
          "region_name": "沈河区",
          "parent_id": 244
        },
        {
          "region_id": 2061,
          "region_name": "皇姑区",
          "parent_id": 244
        }, 

 

 

 

    1.4 用户中心提醒

        url : user_avatar_state/id  当前授权用户Id

        返回

{
  "code": 200,
  "msg": "用户报名列表",
  "data": {
    "state": {
      "new": false,//红点
      "show": false//显示头像
    },
    "user_id": "3"
  }
}

 

2 报名

 

    2.1 获取上传配置

     url:oss_signature

    参数:match=赛事id&user_id=当前用户id

    返回值:

{
  "code": 200,
  "msg": "获取赛事详细",
  "data": {
    "accessid": "6MKOqxGiGU4AUk44",
    "host": "http://post-test.oss-cn-hangzhou.aliyuncs.com",
    "policy": "eyJleHBpcmF0aW9uIjoiMjAxOC0wNi0yNlQxMTozNDo0MVoiLCJjb25kaXRpb25zIjpbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMCwxMDQ4NTc2MDAwXSxbInN0YXJ0cy13aXRoIiwiJGtleSIsIlwvcmVhZGVyXC9tYXRjaF8xOVwvMjZcLzFcLyJdXX0=",
    "signature": "O/xb3Y2CJmqaTuOQNy39HQbKHhU=",
    "expire": 1529984081,
    "dir": "/reader/match_19/26/1/",//问价路径
    "filename": "2018-06-26-11-34-11-5b31b433be272" //图片名称 
  }
}

    2.2 上传后返回

    url: attachment/callback

    参数:match=赛事id&user_id=当前用户id&filename=文件名称(带后缀名)

    返回值:

{
  "code": 200,
  "msg": "上传后调返回媒体id",
  "data": 2
}

 

    2.3 填写地址

 

    url : address/add

      参数:

    match=19
    city_id=159
    area_id=160
    user_id=1
    school=1

    grade=3//年级

    class=2//班级

    name=嗷嗷叫唤

    phone=15382081985   

返回:

{
  "code": 200,
  "msg": "地址补完返回选手id",
  "data": {
    "customer_id": 2//新添用户信息id
  }
}

    2.4 报名

    url: reader/signup

    参数:

            match=19

            user_id=1

            customer_id=3

            attachment_id=2

            content='' //作品说明,100个字之内(小程序限制)

            formid= //发送模版消息的凭证

      返回

{
  "code": 200,
  "msg": "报名成功"
}

    2.5 用户删除媒体

    url:attachment/del/2 ( 媒体id)

    返回

{
  "code": 200,
  "msg": "删除成功"
}

 

    2.6 获取用户地址详细

 

    url :address/get/1 (上一步上传回调的customer_id)

    返回

{
  "code": 200,
  "msg": "用户提交的地址信息",
  "data": {
    "ID": 1,
    "name": "姓名",
    "phone": "电话",
    "city_id": 0,
    "area_id": 0,
    "school_id": 0,
    "grade": "三年二班"
  }
}

 

    2.7 学校列表

 

        url: school/1 (区域id)

        返回:

{
  "code": 200,
  "msg": "区学校列表",
  "data": [
    {
      "name": "浑南一中"
    },
    {
      "name": "浑南一中"
    },
    {
      "name": "浑南一中"
    },
      .......
  ]
}

 

    2.8 班级最大值

 

        url: grade

        返回值

{
  "code": 200,
  "msg": "班级最大值",
  "data": {
    "grade": 20
  }
}

 

    2.9 用户地址修改

 

        url: address/update/28 (用户地址id: customer_id)

        参数:

                city_id=159
                area_id=160
                school=1

                grade=3//年级

                class=2//班级

                name=嗷嗷叫唤

                phone=15382081985
 

        返回值

{
  "code": 200,
  "msg": "修改地址成功",
  "data": {
    "customer_id": "28"
  }
}

 

3 用户

 

    3.1 用户授权登录

    3.2用户中心

        url: use_attachment/list

        参数:

                match=19

                user_id=1

        返回

{
  "code": 200,
  "msg": "用户报名列表",
  "data": [
    {
      "ID": 88,
      "user_id": 2,
      "type": "video",
      "signurl": "https://ls.kakapic.cn/ln_reader/match_19/05/2/2018-07-05-16-24-27-5b3dd5bba5161.mp4?OSSAccessKeyId=LTAII1sl0aDhtnEQ&Expires=1530843768&Signature=86Hyyfw1RxRjgGbPKt7wPnb4r70%3D",
      "created_at": "2018-07-05 16:24:28",
      "updated_at": "2018-07-06 10:22:48",
      "state": 0,
      "student": 96,
      "content": "N;",
      "school": "3小学3小学3小学3小学3小学3小学3小学",
      "name": "嗷嗷",
      "phone": "15000000000",
      "grade": "1",
      "class": "2",
      "city": "沈阳",
      "area": "沈河区",
      "certificate":NULL // 证书地址 如果存在
    }
  ]
}

    3.3  用户查看报名详细

    url: use/attachment/媒体id(int)

    返回

{
  "code": 200,
  "msg": "用户报名列表",
  "data": {
      "ID": 2,
      "signurl": null,//视频url
      "created_at": "2018-06-26 11:51:56",//创建时间
      "state": 0,//当前状态
      "grade": "三年二班",
      "content": "N;",//描述
      "school": "浑南一中",
      "name": "嗷嗷叫唤",//姓名
      "phone": "15382081985"//电话
 }
}

 

 

你可能感兴趣的:(api)