描述

获取用户创建的题目列表,单次最多支持查看50道题目;

接口地址

http://api-class.e.vhall.com/api/class/question/get-list

请求参数

公共参数需要每次请求都附带上,详细内容请参考公共参数

参数名 类型 必选 说明
child_id int 子账户id
type string 题目类型,如果不填默认查找所有题型,如果填写之后必须为 radio(单选),checkbox(多选),judge(判断),text(问答) 中的其一
curr_page int 页数 ,默认第一页
pagesize int 每页展示条数 ,默认50条,最大50
created_at string 根据创建时间查询,如果填写则筛选此时间段创建的题目,示例:2020-09-01 00:00:00,2020-10-01 23:59:59

响应参数

参数名 类型 说明
curr_page int 当前页数
total int 总条数
total_page int 总页数
list array 题目列表
list下级created_at string 题目创建时间
list下级type string 题目类型 radio(单选),checkbox(多选),judge(判断),text(问答) 中的其一
list下级id int 题目id
list下级preset_answer string 如果题目题型为问答题类型,代表问答题的预设答案,否则为空
list下级subject string 题目标题
list下级items array 如题目类型为单选、多选、判断题型 代表题目选项列表
items下级id int 选项id
items下级is_answer int 选项是否为正确答案 1 是 0否
items下级key string 选项所对应的下标索引
items下级value string 选项所对应的值

响应示例

{
  "code": 200,
  "msg": "success",
  "data": {
    "curr_page": 1,
    "total": 43,
    "total_page": 15,
    "list": [
      {
        "subject": "判断题",
        "created_at": "2019-08-29 16:58:05",
        "type": "judge",
        "id": 4660,
        "items": [
          {
            "id": 8743,
            "is_answer": 1,
            "key": "A",
            "value": "正确",
            "imgUrl": ""
          },
          {
            "id": 8744,
            "is_answer": 0,
            "key": "B",
            "value": "错误",
            "imgUrl": ""
          }
        ],
        "preset_answer": ""
      },
      {
        "subject": "单选题",
        "created_at": "2019-08-29 16:57:50",
        "type": "radio",
        "id": 4659,
        "items": [
          {
            "id": 8739,
            "is_answer": 1,
            "key": "A",
            "value": "2",
            "imgUrl": ""
          },
          {
            "id": 8740,
            "is_answer": 0,
            "key": "B",
            "value": "2",
            "imgUrl": ""
          },
          {
            "id": 8741,
            "is_answer": 0,
            "key": "C",
            "value": "3",
            "imgUrl": ""
          },
          {
            "id": 8742,
            "is_answer": 0,
            "key": "D",
            "value": "4",
            "imgUrl": ""
          }
        ],
        "preset_answer": ""
      },
      {
        "subject": "多选题",
        "created_at": "2019-08-28 13:54:25",
        "type": "checkbox",
        "id": 4629,
        "items": [
          {
            "id": 8689,
            "is_answer": 0,
            "key": "A",
            "value": "g555",
            "imgUrl": ""
          },
          {
            "id": 8690,
            "is_answer": 0,
            "key": "B",
            "value": "yy",
            "imgUrl": ""
          },
          {
            "id": 8691,
            "is_answer": 1,
            "key": "C",
            "value": "54",
            "imgUrl": ""
          },
          {
            "id": 8692,
            "is_answer": 0,
            "key": "D",
            "value": "4",
            "imgUrl": ""
          }
        ],
        "preset_answer": ""
      }
    ]
  }
}

错误码

code 含义
20000 子账号不存在
400 单次最多查询50条
400 题目类型错误