Bead 管理 开发者门户 · SQLite

文档 / 图纸社区 Patterns / 图纸社区列表(含搜索)

图纸社区列表(含搜索)

GET|POST /api/patterns 公开
列表项不含 images / liked / author.followed。详情接口才有。sort=following 需登录。

模拟请求

已预填本接口参数,可直接改 Body 后发送。 验证码 mock:1111;注册/登录成功后自动缓存 token。

POST

占位符 {{refresh_token}} / {{access_token}} 发送时自动替换。

点击「发送请求」查看结果

请求 Body 字段

字段说明
qstring, 可选, 搜索标题/画师昵称用户名/图纸ID
categorystring, 可选, 分类 slug
sortstring, 可选, hot|new|following,默认 new
pageint, 可选, 默认 1
page_sizeint, 可选, 默认 20,最大 50

响应 data 字段说明

字段类型 / 说明
list array, 图纸卡片列表(结构见下)
page int, 当前页
page_size int, 每页条数
total int, 总条数
has_more bool, 是否还有下一页
sort string, 实际排序:hot|new|following
q string, 回显搜索词
category object|null, {id, slug, name};name 随语言本地化,slug 固定;未分类为 null
--- list[] 单项 --- 以下为 list 数组元素字段
id int, 图纸 ID
title string, 标题
description string, 简介
cover_url string, 封面图 URL
width int, 格数宽
height int, 格数高
color_count int, 用色数
bead_count int, 拼豆数量
difficulty int, 难度 1–5
view_count int, 浏览量
like_count int, 点赞数
favorite_count int, 收藏数
heat int, 热度=like×3+favorite×2+view
published_at string|null, 发布时间 UTC
created_at string|null, 创建时间 UTC
author object, {id, username, nickname, avatar_url};作者已注销时 nickname 为本地化文案

完整响应示例

成功时的整包 JSON(APP 可按此解析)。统一外壳 code / message / data

{
    "code": 0,
    "message": "ok",
    "data": {
        "list": [
            {
                "id": 2,
                "title": "草莓拼豆图纸",
                "description": "可爱草莓,粉红主色,适合钥匙扣。",
                "cover_url": "/uploads/patterns/demo_strawberry.png",
                "category": {
                    "id": 5,
                    "slug": "fruit",
                    "name": "Fruit"
                },
                "width": 24,
                "height": 28,
                "color_count": 12,
                "bead_count": 520,
                "difficulty": 1,
                "view_count": 920,
                "like_count": 86,
                "favorite_count": 30,
                "heat": 1238,
                "published_at": "2026-08-02 08:04:54",
                "created_at": "2026-08-02 08:04:54",
                "author": {
                    "id": 2,
                    "username": "pixel_cat",
                    "nickname": "像素猫",
                    "avatar_url": ""
                }
            },
            {
                "id": 6,
                "title": "珍珠奶茶",
                "description": "可爱草莓,粉红主色,适合钥匙扣。",
                "cover_url": "/uploads/patterns/demo_strawberry.png",
                "category": {
                    "id": 6,
                    "slug": "food",
                    "name": "食品"
                },
                "width": 24,
                "height": 28,
                "color_count": 12,
                "bead_count": 520,
                "difficulty": 1,
                "view_count": 920,
                "like_count": 86,
                "favorite_count": 30,
                "heat": 1477,
                "published_at": "2026-08-02 08:04:54",
                "created_at": "2026-08-02 08:04:54",
                "author": {
                    "id": 2,
                    "username": "pixel_cat",
                    "nickname": "像素猫",
                    "avatar_url": ""
                }
            }
        ],
        "page": 1,
        "page_size": 20,
        "total": 2,
        "has_more": false,
        "sort": "hot",
        "q": "草莓",
        "category": "fruit"
    }
}