简要描述:

考试功能基础信息获取

请求域名:

  • http://xx.com

请求路由:

GET/&route=plugin.exam-engine.frontend.paper-management.index

请求参数说明:

参数名 类型 是否必需 说明

返回示例:

正确时返回:

{
    "result": 1,
    "msg": "获取成功",
    "data": {
        "total_questions": 10,
        "total_answer": 0,
        "total_right": 0,
        "right_rate": 0,
        "category": {
            "current_page": 1,
            "data": [
                {
                    "id": 2,
                    "uniacid": 1,
                    "name": "ccc",
                    "sort": 1,
                    "created_at": "2025-08-21 10:45:28",
                    "updated_at": "2025-08-21 10:45:28",
                    "total_questions": 10,
                    "total_answer": 0,
                    "total_right": 0,
                    "right_rate": 0
                }
            ],
            "first_page_url": "http://www.shop777.com/addons/yun_shop/api.php?page=1",
            "from": 1,
            "last_page": 1,
            "last_page_url": "http://www.shop777.com/addons/yun_shop/api.php?page=1",
            "links": [
                {
                    "url": null,
                    "label": "« 上一页",
                    "active": false
                },
                {
                    "url": "http://www.shop777.com/addons/yun_shop/api.php?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "下一页 »",
                    "active": false
                }
            ],
            "next_page_url": null,
            "path": "http://www.shop777.com/addons/yun_shop/api.php",
            "per_page": 15,
            "prev_page_url": null,
            "to": 1,
            "total": 1
        }
    }
}

返回参数说明:

参数名 类型 说明
result Integer 请求结果状态码。1 表示成功。
msg String 请求结果的文字描述信息,例如 "获取成功"。
data Object 返回的核心数据内容。
data.total_questions Integer 试卷的总题目数量。
data.total_answer Integer 总答题数(或已答题数)。
data.total_right Integer 总正确答题数。
data.right_rate String 正确率。示例中为 0,可能表示百分比或小数形式,具体需根据业务逻辑确定。
data.category Object 分类信息的分页对象。
data.category.current_page Integer 当前所在的页码。
data.category.data Array 当前页的分类数据列表。
data.category.data[].id Integer 分类的唯一标识 ID。
data.category.data[].uniacid Integer 可能关联的公众号或其他平台账户 ID。
data.category.data[].name String 分类的名称。
data.category.data[].sort Integer 分类的排序值。
data.category.data[].created_at String 分类的创建时间。
data.category.data[].updated_at String 分类的最后更新时间。
data.category.data[].total_questions Integer 该分类下的总题目数量。
data.category.data[].total_answer Integer 该分类下的总答题数(或已答题数)。
data.category.data[].total_right Integer 该分类下的总正确答题数。
data.category.data[].right_rate String 该分类下的正确率。
data.category.first_page_url String 第一页的 URL。
data.category.from Integer 当前页记录的起始 ID。
data.category.last_page Integer 最后一页的页码。
data.category.last_page_url String 最后一页的 URL。
data.category.links Array 分页链接数组,通常用于渲染分页导航。
data.category.links[].url String 分页链接的 URL。
data.category.links[].label String 分页链接的显示标签。
data.category.links[].active Boolean 指示该链接是否为当前页。
data.category.next_page_url String 下一页的 URL。如果为 null 则表示没有下一页。
data.category.path String 分页链接的基础路径。
data.category.per_page Integer 每页显示的数据条数。
data.category.prev_page_url String 上一页的 URL。如果为 null 则表示没有上一页。
data.category.to Integer 当前页记录的结束 ID。
data.category.total Integer 总记录数。