描述
获取单个题目详情;
接口地址
http://api-class.e.vhall.com/api/class/question/detail
请求参数
公共参数需要每次请求都附带上,详细内容请参考公共参数
参数名 | 类型 | 必选 | 说明 |
---|---|---|---|
child_id | int | 否 | 子账户id |
question_id | int | 是 | 查询单个题目详情 |
响应参数
参数名 | 类型 | 说明 |
---|---|---|
created_at | string | 题目创建时间 |
type | string | 题目类型 radio(单选),checkbox(多选),judge(判断),text(问答) 中的其一 |
id | int | 题目id |
preset_answer | string | 如果题目题型为问答题类型,代表问答题的预设答案,否则为空 |
subject | string | 题目标题 |
items | array | 如题目类型为单选、多选、判断题型 代表题目选项列表 |
items下级id | int | 选项id |
items下级is_answer | int | 选项是否为正确答案 1 是 0否 |
items下级key | string | 选项所对应的下标索引 |
items下级value | string | 选项所对应的值 |
响应示例
{
"code": 200,
"msg": "success",
"data": {
"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": ""
}
错误码
code | 含义 |
---|---|
20000 | 子账号不存在 |
400 | 题目不存在 |