4.1 学生端

4.1.1 登录

  • 接口地址:/api/user/login
  • 请求参数:
{
    "userName": "student",  //用户名
    "password": "",  //密码
    "remember": false  //下次自动登录
}
  • 返回参数:
{
        "userName": "student",  //用户名
        "imagePath": "",  //头像
}

4.1.2 注册

  • 接口地址:/api/student/user/register
  • 请求参数:
{
    "userName": "student5", //用户名
    "password": "123456",  //密码
    "userLevel": 1  //年级
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": null
}

4.1.3 登出

  • 接口地址:/api/user/logout
  • 请求参数:无
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": null
}

4.1.4 首页

  • 接口地址:/api/student/dashboard/index
  • 请求参数:无
  • 返回参数:
{
    "fixedPaper": [  //固定试卷
        {
            "id": 2399,  //试卷Id
            "name": "test33333",  //试卷名称
            "limitStartTime": null,  //考试开始时间
            "limitEndTime": null     //考试结束时间
        }
    ],
    "timeLimitPaper": []    //时段试卷
}

4.1.5 任务中心

  • 接口地址:/api/student/dashboard/task
  • 请求参数:无
  • 返回参数:
[
        {
            "id": 24,  //任务id
            "title": "2021-04-25作业",  //任务标题
            "paperItems": [
                {
                    "examPaperId": 181,   //任务试卷id
                    "examPaperName": "第一次出卷",  //任务试卷名称
                    "examPaperAnswerId": 579,  //答卷id
                    "status": 2  //答卷状态
                }
            ]
        }
    ]

4.1.6 学科列表

  • 接口地址:/api/student/education/subject/list
  • 请求参数:无
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": [
        {
            "id": "18",  //学科id
            "name": "英语"  //学科名称
        }
    ]
}

4.1.7 试卷分页

  • 接口地址:/api/student/exam/paper/pageList
  • 请求参数:
{
    "paperType": 1, //试卷类型
    "subjectId": 158, //学科id
    "pageIndex": 1, //页数
    "pageSize": 10  //每页条数
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": {
        "total": 1,
        "list": [
            {
                "id": 2520,  //试卷id
                "name": "生理卫生",  //试卷名称
                "questionCount": 1,  //题目数
                "score": 20,  //试卷分数
                "createTime": "2021-05-31 13:34:49", //创建时间
                "createUser": 2,   //创建人
                "subjectId": 158,  //学科
                "subjectName": "英语",  //学科
                "paperType": 1,   //试卷类型
                "frameTextContentId": 9016  //试卷内容
            }
        ]
    }
}

4.1.8 试卷查询

  • 接口地址:/api/student/exam/paper/select/9
  • 请求参数:无
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": {
        "id": 24,  //试卷id
        "level": 1,  //年级
        "subjectId": 1,  //学科
        "paperType": 1,  //试卷类型
        "name": "测试一",  //试卷名称
        "suggestTime": 22,  //建议时长
        "limitDateTime": null,  //考试时间限制
        "titleItems": [  
            {
                "name": "一、选择题",  //试卷标题
                "questionItems": [
                    {
                        "id": 24,      //题目id
                        "questionType": 5,  //题型
                        "subjectId": 1,  //学科
                        "title": "默写咏鹅",  //标题
                        "gradeLevel": 1,  //年级
                        "items": [],  //选项
                        "analyze": "咏鹅可以带拼音",  //解析
                        "correctArray": null,  //标答
                        "correct": "鹅鹅鹅, 曲项向天歌。 白毛浮绿水, 红掌拨清波。",  //标答
                        "score": "10", //分数
                        "difficult": 3,  //难度
                        "itemOrder": 1  //顺序
                    }
                ]
            }
        ],
        "score": "10"
    }
}

4.1.9 试卷提交

  • 接口地址:/api/student/exampaper/answer/answerSubmit
  • 请求参数:
{
    "questionId": null, 
    "doTime": 14,    //耗时
    "answerItems": [
        {
            "questionId": 4,  //题目id
            "content": null,  //答题内容
            "contentArray": [   //填空题内容
                "测试",
                "1"
            ],
            "completed": true, //是否完成
            "itemOrder": 1   //题目序号
        } 
    ],
    "id": 4   //试卷id
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": "2"   //试卷得分
}

4.1.10 答卷查询

  • 接口地址:/api/student/exampaper/answer/read/4
  • 请求参数:无
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": {
        "paper": {  //试卷信息
            "id": 24,  //试卷id
            "level": 1, //年级
            "subjectId": 1,  //学科
            "paperType": 4,  //试卷类型
            "name": "限时考试二",  //试卷名称
            "suggestTime": 20,  //考试时长
            "limitDateTime": [  //考试时间限制
                "2021-06-22 00:00:00",
                "2021-08-06 00:00:00"
            ],
            "titleItems": [
                {
                    "name": "一、完成题目",  //标题
                    "questionItems": [   //题目列表
                        {
                            "id": 24,  //题目id
                            "questionType": 4,   //题目类型
                            "subjectId": 1,  //学科
                            "title": "曲项向天歌红掌拨清波",  //题目标题
                            "gradeLevel": 1,  //年级
                            "items": [   //题目选项
                                {
                                    "prefix": "1",   //选项标识
                                    "content": "鹅鹅鹅",   //选项内容
                                    "score": "2"  //选项分数
                                },
                                {
                                    "prefix": "2",
                                    "content": "白毛浮绿水",
                                    "score": "2"
                                }
                            ],
                            "analyze": "咏鹅",  //解析
                            "correctArray": [  //标答
                                "鹅鹅鹅",
                                "白毛浮绿水"
                            ],
                            "correct": "",  //标答
                            "score": "4",  //题目分数
                            "difficult": 4, //题目难度
                            "itemOrder": 1 //题目顺序
                        }
                    ]
                }
            ],
            "score": "18"   //试卷分数
        },
        "answer": {  //答卷信息
            "id": 24,  //答卷id
            "doTime": 14,  //耗时
            "score": "2",  //得分
            "answerItems": [   //答题信息
                {
                    "id": 24,  //答题id
                    "questionId": 4,  //题目id
                    "doRight": null,  //是否正确
                    "content": null, //答题内容
                    "itemOrder": 1, //题序
                    "contentArray": [  //答题内容
                        "测试",
                        "1"
                    ],
                    "score": "0", //得分
                    "questionScore": "4"  //题目分数
                }
            ]
        }
    }
}

4.1.11 试卷批改

  • 接口地址:/api/student/exampaper/answer/edit
  • 请求参数:
{
    "id": 24,  //答卷id
    "doTime": 14,  //耗时
    "score": "2",  //得分数
    "answerItems": [
        {
            "id": 24, //答题id
            "questionId": 4, //题目id
            "doRight": null,  //是否正确
            "content": null,  //答题内容
            "itemOrder": 1,  //题目顺序
            "contentArray": [  //答题内容
                "测试",
                "1"
            ],
            "score": "4",  //得分
            "questionScore": "4"  //题目分数
        }
    ]
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": "16"  //试卷得分
}

4.1.12 考试记录分页

  • 接口地址:/api/student/exampaper/answer/pageList
  • 请求参数:
{
    "pageIndex": 1, //页码
    "pageSize": 10  //每页条数
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": {
        "total": 6204,
        "list": [
            {
                "id": 6534,  //试卷id
                "createTime": "2021-06-01 17:56:38",  //创建时间
                "userScore": "0",  //考试分数
                "subjectName": "数学",  //考试学科
                "subjectId": 129, //学科id
                "questionCount": 1,  //题目数量
                "questionCorrect": 0,  //题目正确数
                "paperScore": "3",  //试卷总分
                "doTime": "4 秒",  //耗时
                "paperType": 7,  //试卷类型
                "systemScore": "0",  //系统批改得分
                "status": 2,   //试卷状态
                "paperName": "智能训练试卷 - 1845",  //试卷名称
                "userName": null  //用户名
            }
        ]
    }
}

4.1.13 错题本分页

  • 接口地址:/api/student/question/answer/page
  • 请求参数:
{
    "pageIndex": 1, //页码
    "pageSize": 10  //每页条数
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": {
        "total": 17002,
        "list": [
            {
                "id": 24928,   //题目id
                "questionType": 1,  //题型
                "createTime": "2021-06-02 16:07:11",  //创建时间
                "subjectName": "语文",  //学科
                "shortTitle": "666"  //题干
            }
        ]
    }
}

4.1.14 答题详情

  • 接口地址:/api/student/question/answer/select/25067
  • 请求参数:
{
    "pageIndex": 1, //页码
    "pageSize": 10  //每页条数
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": {
        "questionVM": {
            "id": 507,    //题目id
            "questionType": 1,   //题目类型
            "subjectId": 46,  //学科id
            "title": "111",   //题干
            "gradeLevel": 12,    //年级
            "items": [        //选项
                {
                    "prefix": "A",  //选项
                    "content": "A",  //选项内容
                    "score": null    //选项分数
                }
            ],
            "analyze": "D",     //解析
            "correctArray": null,  //标答
            "correct": "D",   //标答
            "score": "2",  //分数
            "difficult": 3,  //难度
            "itemOrder": null  //排序
        },
        "questionAnswerVM": {   //用户答案
            "id": 25067,  
            "questionId": 507,  //题目id
            "doRight": false,   //是否正确
            "content": "A",   //用户答案
            "itemOrder": 2,   //排序
            "contentArray": null,   //用户答案
            "score": "0",  //得分
            "questionScore": "2"  //题目分数
        }
    }
}

4.1.15 用户动态

  • 接口地址:/api/student/user/log
  • 请求参数:无
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": [
        {
            "id": 1812,  
            "userId": 1,  //用户id
            "userName": "student",  //用户名
            "realName": "Test",  //用户真实姓名
            "content": "student 登录了学之思开源考试系统",  //动态内容
            "createTime": "2021-06-08 17:12:50"  //创建时间
        }
    ]
}

4.1.16 当前用户信息

  • 接口地址:/api/student/user/current
  • 请求参数:无
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": {
        "id": 24,
        "userUuid": "d2d29da2-dcb3-4013-b874-727626236f47",
        "userName": "student",  //用户名
        "realName": "Test",  //真实姓名
        "age": 18,   //年龄
        "role": 1,   //角色
        "sex": 1,  //性别
        "birthDay": "2019-09-01 00:00:00",  //生日
        "phone": "158800882",  //手机号
        "lastActiveTime": "",
        "createTime": "2019-09-07 18:55:02",
        "modifyTime": "2021-06-09 17:04:31",
        "status": 1,  //状态
        "userLevel": 1,   //年级
        "classes": "1班",  //用户班级
        "imagePath": ""  //用户头像
    }
}

4.1.17 修改用户信息

  • 接口地址:/api/student/user/update
  • 请求参数:
{
    "id": 24,
    "userUuid": "d2d29da2-dcb3-4013-b874-727626236f47",
    "userName": "student",  //用户名
    "realName": "Test",  //真实姓名
    "age": 18,   //年龄
    "role": 1,   //角色
    "sex": 1,  //性别
    "birthDay": "2019-09-01 00:00:00",  //生日
    "phone": "158800882",  //手机号
    "lastActiveTime": "",
    "createTime": "2019-09-07 18:55:02",
    "modifyTime": "2021-06-09 17:04:31",
    "status": 1,  //状态
    "userLevel": 1,   //年级
    "classes": "1班",  //用户班级
    "imagePath": ""  //用户头像
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": null
}

4.1.18 消息分页

  • 接口地址:/api/student/user/message/page
  • 请求参数:
{
    "pageIndex": 1, //页码
    "pageSize": 10  //每页条数
}
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": {
        "total": 5,
        "list": [
            {
                "id": 24,
                "title": "rwerw",   //消息标题
                "messageId": 10,
                "content": "sfsdf",  //消息内容
                "readed": true, //是否已读
                "createTime": "2021-06-11 16:32:40",   //创建时间
                "sendUserName": "admin"  //发送人
            }
        ]
    }
}

4.1.19 消息标记已读

  • 接口地址:/api/student/user/message/read/14
  • 请求参数:无
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": null
}

4.1.20 未读消息数量

  • 接口地址:/api/student/user/message/unreadCount
  • 请求参数:无
  • 返回参数:
{
    "code": 1,
    "message": "成功",
    "response": 0  //未读消息数量
}
Last Updated:
Contributors: mindskip, 思维跳跃科技