api

api接口文档


获取全部文章

请求URL:

  • http://119.91.153.159:81/article

请求方式:

  • GET

参数:

参数名 必选 类型 说明
page int

返回示例

{
  "code": 200,
  "message": "success",
  "article": [
    {
      "id": "5",
      "title": "一个标题",
      "description": "一段描述",
      "content": "一篇文章",
      "img_src": "http://119.91.153.159:81/upload/2022/06/preview1.jpg",
      "create_time": "2022-07-27 14:13:37",
      "comments": "0",
      "browse": "0",
      "author": {
        "user_id": "7",
        "nickname": "test",
        "email": "esists@163.com",
        "head_img": "http://119.91.153.159:81/upload/2022/06/default.jpg"
      }
    },
    {
      "id": "6",
      "title": "一个测试标题",
      "description": "一段又一段描述",
      "content": "一篇又一篇文章",
      "img_src": "http://119.91.153.159:81/upload/2022/06/preview8.jpg",
      "create_time": "2022-07-27 14:14:36",
      "comments": "0",
      "browse": "0",
      "author": {
        "user_id": "7",
        "nickname": "test",
        "email": "esists@163.com",
        "head_img": "http://119.91.153.159:81/upload/2022/06/default.jpg"
      }
    },
    {
      "id": "7",
      "title": "又是一个标题",
      "description": "又是一段描述",
      "content": "又是一篇文章",
      "img_src": "http://119.91.153.159:81/upload/2022/06/preview3.jpg",
      "create_time": "2022-07-27 14:15:28",
      "comments": "0",
      "browse": "0",
      "author": {
        "user_id": "7",
        "nickname": "test",
        "email": "esists@163.com",
        "head_img": "http://119.91.153.159:81/upload/2022/06/default.jpg"
      }
    },
    {
      "id": "8",
      "title": "Token",
      "description": "Token权限验证",
      "content": "使用jwt单点登录",
      "img_src": "http://119.91.153.159:81/upload/2022/06/preview6.jpg",
      "create_time": "2022-07-29 18:42:00",
      "comments": "0",
      "browse": "0",
      "author": {
        "user_id": "38",
        "nickname": "我是谁",
        "email": "3195762813@qq.com",
        "head_img": "http://119.91.153.159:81/upload/2022/06/default.jpg"
      }
    }
  ],
  "page": 2,
  "count": 4,
  "total": 2,
  "login_user": null
}
返回参数说明
参数名 说明
id 文章id
title 文章标题
description 文章描述
content 文章内容
img_src 文章封面
create_time 文章创建时间
comments 文章评论数
page 当前页数
count 每页的文章数量
total 总页数
author参数
参数名 说明
user_id 文章作者id
nickname 作者昵称
email 作者邮箱
head_img 作者头像

页面列表

ITEM_HTML