openapi: 3.0.3 info: title: 'Laravel 接口文档' description: '站点开放 JSON 接口说明(v1)。' version: 1.0.0 servers: - url: 'http://api.qyz.com' tags: - name: 产品中心 description: "\n产品增删查改" - name: 产品分类 description: "\n产品分类增删查改" - name: 后台认证 description: "\n后台管理系统登录接口" - name: 图片上传 description: "\n上传图片并返回可访问的 URL。" - name: 新闻资讯 description: "\n新闻列表与详情(只读)" - name: 案例 description: "\n案例列表与详情(只读)" - name: 解决方案 description: "\n方案列表与详情(只读)" paths: /api/v1/products: get: summary: 产品列表 operationId: '' description: 分页返回产品,含分类关联。 parameters: - in: query name: page description: 页码 example: 1 required: false schema: type: integer description: 页码 example: 1 - in: query name: per_page description: '每页条数,最大 50' example: 15 required: false schema: type: integer description: '每页条数,最大 50' example: 15 responses: 200: description: '' content: application/json: schema: type: object example: message: 查询产品列表成功 data: - id: 1 title: 测试产品 product_category_id: null body: '

图片112321312313

' cover_photo_path: uploads/images/N3gcYVGZp0xG1EEItHGqTvZbPYiKVO3nRmI8GITf.png summary: 测试摘要 author: null date: null created_at: '2026-03-21T01:39:56.000000Z' updated_at: '2026-03-21T01:39:56.000000Z' total: 1 page: 1 per_page: 15 code: 200 properties: message: type: string example: 查询产品列表成功 data: type: array example: - id: 1 title: 测试产品 product_category_id: null body: '

图片112321312313

' cover_photo_path: uploads/images/N3gcYVGZp0xG1EEItHGqTvZbPYiKVO3nRmI8GITf.png summary: 测试摘要 author: null date: null created_at: '2026-03-21T01:39:56.000000Z' updated_at: '2026-03-21T01:39:56.000000Z' items: type: object properties: id: type: integer example: 1 title: type: string example: 测试产品 product_category_id: type: string example: null nullable: true body: type: string example: '

图片112321312313

' cover_photo_path: type: string example: uploads/images/N3gcYVGZp0xG1EEItHGqTvZbPYiKVO3nRmI8GITf.png summary: type: string example: 测试摘要 author: type: string example: null nullable: true date: type: string example: null nullable: true created_at: type: string example: '2026-03-21T01:39:56.000000Z' updated_at: type: string example: '2026-03-21T01:39:56.000000Z' total: type: integer example: 1 page: type: integer example: 1 per_page: type: integer example: 15 code: type: integer example: 200 tags: - 产品中心 security: [] post: summary: 新增产品 operationId: '' description: '' parameters: [] responses: { } tags: - 产品中心 requestBody: required: true content: application/json: schema: type: object properties: title: type: string description: 产品标题 example: 智能机器人 product_category_id: type: integer description: 分类ID example: 1 nullable: true cover_photo_path: type: string description: 封面图路径 example: /images/cover.png nullable: true summary: type: string description: 简介 example: 简介内容 nullable: true body: type: string description: 正文 example: 正文内容 nullable: true author: type: string description: 作者 example: 张三 nullable: true date: type: string description: 日期 example: '2026-03-20' nullable: true required: - title security: [] '/api/v1/products/{id}': get: summary: 产品详情 operationId: '' description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 title: 测试产品 product_category_id: null body: '

图片112321312313

' cover_photo_path: uploads/images/N3gcYVGZp0xG1EEItHGqTvZbPYiKVO3nRmI8GITf.png summary: 测试摘要 author: null date: null created_at: '2026-03-21T01:39:56.000000Z' updated_at: '2026-03-21T01:39:56.000000Z' product_category: null properties: id: type: integer example: 1 title: type: string example: 测试产品 product_category_id: type: string example: null nullable: true body: type: string example: '

图片112321312313

' cover_photo_path: type: string example: uploads/images/N3gcYVGZp0xG1EEItHGqTvZbPYiKVO3nRmI8GITf.png summary: type: string example: 测试摘要 author: type: string example: null nullable: true date: type: string example: null nullable: true created_at: type: string example: '2026-03-21T01:39:56.000000Z' updated_at: type: string example: '2026-03-21T01:39:56.000000Z' product_category: type: string example: null nullable: true tags: - 产品中心 security: [] put: summary: '' operationId: putApiV1ProductsId description: '' parameters: [] responses: { } tags: - 产品中心 requestBody: required: true content: application/json: schema: type: object properties: title: type: string description: validation.max. example: vmqeopfuudtdsufvyvddq product_category_id: type: integer description: '' example: 17 nullable: true cover_photo_path: type: string description: validation.max. example: mqeopfuudtdsufvyvddqa nullable: true summary: type: string description: validation.max. example: mniihfqcoynlazghdtqtq nullable: true body: type: string description: '' example: consequatur nullable: true author: type: string description: validation.max. example: mqeopfuudtdsufvyvddqa nullable: true date: type: string description: validation.max. example: mniihfqcoynlazghdtqtq nullable: true required: - title security: [] delete: summary: 删除产品 operationId: '' description: '' parameters: [] responses: { } tags: - 产品中心 security: [] parameters: - in: path name: id description: '产品 ID' example: 1 required: true schema: type: integer /api/v1/products/update: post: summary: '更新产品(POST,body 中带 id,兼容前端)' operationId: POSTbodyId description: '' parameters: [] responses: { } tags: - 产品中心 requestBody: required: true content: application/json: schema: type: object properties: id: type: integer description: '产品 ID' example: 17 category_id: type: integer description: '分类 ID(与 product_category_id 二选一)' example: 17 required: - id security: [] /api/v1/product_categories: get: summary: 分类列表 operationId: '' description: '' parameters: - in: query name: page description: 页码 example: 1 required: false schema: type: integer description: 页码 example: 1 - in: query name: per_page description: '每页条数,最大 50' example: 15 required: false schema: type: integer description: '每页条数,最大 50' example: 15 responses: 200: description: '' content: application/json: schema: type: object example: message: 查询分类列表成功 data: - id: 1 name: 测试logo11 icon: uploads/images/Wu5JVNHx4HFxBB3DsHEFbNHDhseMBVUmzer9163u.png created_at: '2026-03-20T08:38:48.000000Z' updated_at: '2026-03-20T08:42:54.000000Z' total: 1 page: 1 per_page: 15 code: 200 properties: message: type: string example: 查询分类列表成功 data: type: array example: - id: 1 name: 测试logo11 icon: uploads/images/Wu5JVNHx4HFxBB3DsHEFbNHDhseMBVUmzer9163u.png created_at: '2026-03-20T08:38:48.000000Z' updated_at: '2026-03-20T08:42:54.000000Z' items: type: object properties: id: type: integer example: 1 name: type: string example: 测试logo11 icon: type: string example: uploads/images/Wu5JVNHx4HFxBB3DsHEFbNHDhseMBVUmzer9163u.png created_at: type: string example: '2026-03-20T08:38:48.000000Z' updated_at: type: string example: '2026-03-20T08:42:54.000000Z' total: type: integer example: 1 page: type: integer example: 1 per_page: type: integer example: 15 code: type: integer example: 200 tags: - 产品分类 security: [] post: summary: 新增分类 operationId: '' description: '' parameters: [] responses: { } tags: - 产品分类 requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 分类名称 example: 显示器 nullable: true icon: type: string description: 图标 example: /images/icon.png nullable: true security: [] '/api/v1/product_categories/{id}': get: summary: 分类详情 operationId: '' description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 name: 测试logo11 icon: uploads/images/Wu5JVNHx4HFxBB3DsHEFbNHDhseMBVUmzer9163u.png created_at: '2026-03-20T08:38:48.000000Z' updated_at: '2026-03-20T08:42:54.000000Z' properties: id: type: integer example: 1 name: type: string example: 测试logo11 icon: type: string example: uploads/images/Wu5JVNHx4HFxBB3DsHEFbNHDhseMBVUmzer9163u.png created_at: type: string example: '2026-03-20T08:38:48.000000Z' updated_at: type: string example: '2026-03-20T08:42:54.000000Z' tags: - 产品分类 security: [] delete: summary: 删除分类 operationId: '' description: '' parameters: [] responses: { } tags: - 产品分类 security: [] parameters: - in: path name: id description: '分类 ID' example: 1 required: true schema: type: integer /api/v1/product_categories/update: post: summary: 更新分类 operationId: '' description: '' parameters: [] responses: { } tags: - 产品分类 requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 分类名称 example: 显示器 nullable: true icon: type: string description: 图标 example: /images/icon.png nullable: true security: [] parameters: - in: path name: id description: '分类 ID' example: 1 required: true schema: type: integer /api/v1/admin/login: post: summary: 后台登录 operationId: '' description: '使用邮箱或账号(name)和密码进行登录校验,成功后返回访问令牌(Bearer Token)和用户信息。' parameters: [] responses: { } tags: - 后台认证 requestBody: required: true content: application/json: schema: type: object properties: login: type: string description: 登录标识(邮箱或账号) example: admin nullable: true email: type: string description: 兼容字段:登录邮箱 example: admin@example.com nullable: true name: type: string description: '兼容字段:账号(同 login)' example: admin nullable: true password: type: string description: 登录密码 example: '123456' required: - password security: [] /api/v1/admin/userlist: get: summary: '' operationId: getApiV1AdminUserlist description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: message: 请求用户信息成功 data: total: 1 page: 1 per_page: 15 list: - id: 1 name: admin email: admin@example.com code: 200 properties: message: type: string example: 请求用户信息成功 data: type: object properties: total: type: integer example: 1 page: type: integer example: 1 per_page: type: integer example: 15 list: type: array example: - id: 1 name: admin email: admin@example.com items: type: object properties: id: type: integer example: 1 name: type: string example: admin email: type: string example: admin@example.com code: type: integer example: 200 tags: - 后台认证 security: [] /api/v1/admin/users: post: summary: '' operationId: postApiV1AdminUsers description: '' parameters: [] responses: { } tags: - 后台认证 requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: validation.max. example: vmqeopfuudtdsufvyvddq email: type: string description: 'validation.email validation.max.' example: kunde.eloisa@example.com password: type: string description: validation.min. example: '4[*UyPJ"}6' required: - name - email - password security: [] '/api/v1/admin/users/{id}': put: summary: '' operationId: putApiV1AdminUsersId description: '' parameters: [] responses: { } tags: - 后台认证 requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: validation.max. example: vmqeopfuudtdsufvyvddq email: type: string description: 'validation.email validation.max.' example: kunde.eloisa@example.com password: type: string description: validation.min. example: '4[*UyPJ"}6' nullable: true required: - name - email security: [] parameters: - in: path name: id description: 'The ID of the user.' example: 1 required: true schema: type: integer /api/v1/upload/image: post: summary: 图片上传 operationId: '' description: '使用 `multipart/form-data` 上传文件。' parameters: [] responses: { } tags: - 图片上传 requestBody: required: true content: multipart/form-data: schema: type: object properties: file: type: string format: binary description: 上传文件(图片) nullable: true image: type: string format: binary description: '10MB. Must be a file. validation.image validation.max.' nullable: true required: - file security: [] /api/v1/news: get: summary: 新闻列表 operationId: '' description: '' parameters: - in: query name: page description: 页码 example: 1 required: false schema: type: integer description: 页码 example: 1 - in: query name: per_page description: '每页条数,最大 50' example: 15 required: false schema: type: integer description: '每页条数,最大 50' example: 15 responses: 200: description: '' content: application/json: schema: type: object example: current_page: 1 data: [] first_page_url: 'http://api.qyz.com/api/v1/news?page=1' from: null last_page: 1 last_page_url: 'http://api.qyz.com/api/v1/news?page=1' links: - url: null label: pagination.previous active: false - url: 'http://api.qyz.com/api/v1/news?page=1' label: '1' active: true - url: null label: pagination.next active: false next_page_url: null path: 'http://api.qyz.com/api/v1/news' per_page: 15 prev_page_url: null to: null total: 0 properties: current_page: type: integer example: 1 data: type: array example: [] first_page_url: type: string example: 'http://api.qyz.com/api/v1/news?page=1' from: type: string example: null nullable: true last_page: type: integer example: 1 last_page_url: type: string example: 'http://api.qyz.com/api/v1/news?page=1' links: type: array example: - url: null label: pagination.previous active: false - url: 'http://api.qyz.com/api/v1/news?page=1' label: '1' active: true - url: null label: pagination.next active: false items: type: object properties: url: type: string example: null nullable: true label: type: string example: pagination.previous active: type: boolean example: false next_page_url: type: string example: null nullable: true path: type: string example: 'http://api.qyz.com/api/v1/news' per_page: type: integer example: 15 prev_page_url: type: string example: null nullable: true to: type: string example: null nullable: true total: type: integer example: 0 tags: - 新闻资讯 security: [] '/api/v1/news/{id}': get: summary: 新闻详情 operationId: '' description: '' parameters: [] responses: 404: description: '' content: application/json: schema: type: object example: message: 'No query results for model [App\Models\News] 1' properties: message: type: string example: 'No query results for model [App\Models\News] 1' tags: - 新闻资讯 security: [] parameters: - in: path name: id description: '新闻 ID' example: 1 required: true schema: type: integer /api/v1/anlis: get: summary: 案例列表 operationId: '' description: '' parameters: - in: query name: page description: 页码 example: 1 required: false schema: type: integer description: 页码 example: 1 - in: query name: per_page description: '每页条数,最大 50' example: 15 required: false schema: type: integer description: '每页条数,最大 50' example: 15 responses: 200: description: '' content: application/json: schema: type: object example: current_page: 1 data: [] first_page_url: 'http://api.qyz.com/api/v1/anlis?page=1' from: null last_page: 1 last_page_url: 'http://api.qyz.com/api/v1/anlis?page=1' links: - url: null label: pagination.previous active: false - url: 'http://api.qyz.com/api/v1/anlis?page=1' label: '1' active: true - url: null label: pagination.next active: false next_page_url: null path: 'http://api.qyz.com/api/v1/anlis' per_page: 15 prev_page_url: null to: null total: 0 properties: current_page: type: integer example: 1 data: type: array example: [] first_page_url: type: string example: 'http://api.qyz.com/api/v1/anlis?page=1' from: type: string example: null nullable: true last_page: type: integer example: 1 last_page_url: type: string example: 'http://api.qyz.com/api/v1/anlis?page=1' links: type: array example: - url: null label: pagination.previous active: false - url: 'http://api.qyz.com/api/v1/anlis?page=1' label: '1' active: true - url: null label: pagination.next active: false items: type: object properties: url: type: string example: null nullable: true label: type: string example: pagination.previous active: type: boolean example: false next_page_url: type: string example: null nullable: true path: type: string example: 'http://api.qyz.com/api/v1/anlis' per_page: type: integer example: 15 prev_page_url: type: string example: null nullable: true to: type: string example: null nullable: true total: type: integer example: 0 tags: - 案例 security: [] '/api/v1/anlis/{id}': get: summary: 案例详情 operationId: '' description: '' parameters: [] responses: 404: description: '' content: application/json: schema: type: object example: message: 'No query results for model [App\Models\Anli] 1' properties: message: type: string example: 'No query results for model [App\Models\Anli] 1' tags: - 案例 security: [] parameters: - in: path name: id description: '案例 ID' example: 1 required: true schema: type: integer /api/v1/solutions: get: summary: 方案列表 operationId: '' description: '' parameters: - in: query name: page description: 页码 example: 1 required: false schema: type: integer description: 页码 example: 1 - in: query name: per_page description: '每页条数,最大 50' example: 15 required: false schema: type: integer description: '每页条数,最大 50' example: 15 responses: 200: description: '' content: application/json: schema: type: object example: current_page: 1 data: [] first_page_url: 'http://api.qyz.com/api/v1/solutions?page=1' from: null last_page: 1 last_page_url: 'http://api.qyz.com/api/v1/solutions?page=1' links: - url: null label: pagination.previous active: false - url: 'http://api.qyz.com/api/v1/solutions?page=1' label: '1' active: true - url: null label: pagination.next active: false next_page_url: null path: 'http://api.qyz.com/api/v1/solutions' per_page: 15 prev_page_url: null to: null total: 0 properties: current_page: type: integer example: 1 data: type: array example: [] first_page_url: type: string example: 'http://api.qyz.com/api/v1/solutions?page=1' from: type: string example: null nullable: true last_page: type: integer example: 1 last_page_url: type: string example: 'http://api.qyz.com/api/v1/solutions?page=1' links: type: array example: - url: null label: pagination.previous active: false - url: 'http://api.qyz.com/api/v1/solutions?page=1' label: '1' active: true - url: null label: pagination.next active: false items: type: object properties: url: type: string example: null nullable: true label: type: string example: pagination.previous active: type: boolean example: false next_page_url: type: string example: null nullable: true path: type: string example: 'http://api.qyz.com/api/v1/solutions' per_page: type: integer example: 15 prev_page_url: type: string example: null nullable: true to: type: string example: null nullable: true total: type: integer example: 0 tags: - 解决方案 security: [] '/api/v1/solutions/{id}': get: summary: 方案详情 operationId: '' description: '' parameters: [] responses: 404: description: '' content: application/json: schema: type: object example: message: 'No query results for model [App\Models\Solution] 1' properties: message: type: string example: 'No query results for model [App\Models\Solution] 1' tags: - 解决方案 security: [] parameters: - in: path name: id description: '方案 ID' example: 1 required: true schema: type: integer