接口列表
1. 获取网站信息
- 请求方法: 
GET - 请求 URL: 
/api/site/getSiteInfo 
请求参数
无
返回结果
{
    "code": 1,
    "data": {
        "id": 1, // id
        "title": "Sample Site Name", // 网站名称
        "intro": "This is a brief introduction of the site.", // 网站简介
        "slogan": "Innovate and Inspire", // 个性签名
        "cover": "https://example.com/cover.jpg", // 网站背景图
        "copyright": "© 2024 Example Company", // 版权信息
        "icp": "ICP 12345678", // 备案号
        "updateTime": "2024-08-22T15:30:00Z", // 更新时间
        "extra": "{\"info\": \"Additional details here\"}", // 额外的信息, json字符串,具体有哪些信息,暂未定
        "status": 1 // 网站信息状态:0-未启用;1-已启用
        },
    "message": "获取成功"
}
2. 获取站长信息
- 请求方法: 
GET - 请求 URL: 
/api/site/getWebmasterInfo 
请求参数
无
返回结果
{
    "code": 1,
    "data": {
        "id": 1, // id
        "intro": "Sample introduction about the webmaster.", // 站长简介
        "slogan": "Leading with Vision", // 站长个性签名
        "nicker": "WebmasterNick", // 站长昵称
        "avatar": "https://example.com/avatar.jpg", // 站长头像
        "job": "Site Administrator", // 站长职业
        "email": "webmaster@example.com", // 站长邮箱
        "qq": "123456789", // 站长 QQ 号
        "wechat": "https://example.com/wechat-qrcode.jpg", // 站长微信二维码
        "rewardCode": "https://example.com/reward-qrcode.jpg", // 站长打赏二维码
        "status": 1, // 状态 0-未启用;1-已启用
        "updateTime": "2024-08-22T15:30:00Z" // 更新时间
    },
    "message": "获取成功"
}
3. 获取友链列表
- 请求方法: 
GET - 请求 URL: 
/api/site/getFriendLinkList 
请求参数
无
返回结果
{
    "code": 1,
    "data": {
        "count": 1122,  // 总条数
        "list": [
            {
                "id": 1, // id
                "title": "Sample Link Title", // 标题
                "url": "https://example.com", // 链接到的 URL
                "seq": 1, // 序号,从小到大排序
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 修改时间
                "validTime": "2024-09-01T00:00:00Z", // 有效时间
                "remark": "This is a sample remark.", // 备注
                "status": 1 // 状态 0-未启用;1-已启用
            }
        ]
    },
    "message": "获取成功"
}
4. 获取通知列表
- 请求方法: 
GET - 请求 URL: 
/api/site/getNoticeList 
请求参数
无
返回结果
{
    "code": 1,
    "data": {
        "count": 1122,  // 总条数
        "list": [
            {
                "id": 1, // id
                "title": "Important Announcement", // 公告标题
                "content": "This is the content of the announcement.", // 公告内容
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 更新时间
                "validTime": "2024-09-01T00:00:00Z", // 有效时间
                "status": 1 // 公告状态 1-上架 0-下架
            }
        ]
    },
    "message": "获取成功"
}
5. 获取轮播图列表
- 请求方法: 
GET - 请求 URL: 
/api/site/getBannerList 
请求参数
无
返回结果
{
    "code": 1,
    "data": {
        "count": 1122,  // 总条数
        "list": [
            {
                "id": 1, // banner id
                "title": "Sample Banner Title", // banner 标题
                "url": "https://example.com/banner.jpg", // 图片 url
                "targetUrl": "https://example.com/target", // 跳转到的目标 url
                "seq": 1, // 序号,从小到大排序
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "status": 1 // banner 状态 1-上架 0-下架
            }
        ]
    },
    "message": "获取成功"
}
6. 获取博客分类列表
- 请求方法: 
POST - 请求 URL: 
/api/blog/getCateList 
请求参数
无
返回结果
{
    "code": 1,
    "data": {
        "count": 1122,  // 总条数
        "list": [
            {
                "id": 1, // 分类 id
                "name": "Sample Category", // 名称
                "seq": 1, // 序号,从小到大排序
                "icon": "https://example.com/icon.png", // 分类图标 icon, url
                "font": "iconfont-name", // 字体,iconfont上的矢量字体
                "color": "#aa33ff", // 分类颜色,iconfont上的矢量字体颜色
                "createTime": "2024-08-22T15:30:00Z", // 分类创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 分类更新时间
                "status": 1  // 状态  1-上架 0-下架
            }
        ]
    },
    "message": "获取成功"
}
7. 获取分类下的博客列表
- 请求方法: 
POST - 请求 URL: 
/api/blog/getCateBlogList 
请求参数(JSON)
{
  "cateId": 1, // 分类 id  必填
  "pageNum": 1, // 第几页,从1开始  必填
  "pageSize": 20 // 每页的数量  必填
}
返回结果
{
    "code": 1,
    "data": {
        "hasMore": true,  // 还有更多
        "list": [
            {
                "id": 1, // 分类 id
                "name": "Sample Category", // 名称
                "seq": 1, // 序号,从小到大排序
                "icon": "https://example.com/icon.png", // 分类图标 icon, url
                "font": "iconfont-name", // 字体,iconfont上的矢量字体
                "color": "#aa33ff", // 分类颜色,iconfont上的矢量字体颜色
                "createTime": "2024-08-22T15:30:00Z", // 分类创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 分类更新时间
                "status": 1  // 状态  1-上架 0-下架
            }
        ]
    },
    "message": "获取成功"
}
8. 根据action获取博客列表
- 请求方法: 
POST - 请求 URL: 
/api/blog/getBlogListByAction 
请求参数(JSON)
{
  "action": 1, // 0:获取最新博客,1:获取最热博客 必填
  "pageNum": 1, // 第几页,从1开始  必填
  "pageSize": 20 // 每页的数量  必填
}
返回结果
{
    "code": 1,
    "data": {
        "hasMore": true,  // 还有更多
        "list": [
            {
                "id": 1, // 博客 id
                "title": "Sample Blog Title", // 博客的标题
                "intro": "This is a brief introduction to the blog.", // 博客的简介
                "content": "Markdown content here...", // md 编辑器产生的内容时,对应的 md 的内容
                "html": "<p>HTML content here...</p>", // md 编辑器产生的内容时,对应的生成的 html
                "isHtml": 0, // 0:md 编辑器产生的内容,1:富文本编辑器产生的内容
                "isTop": 1, // 是否置顶, 0: 不置顶,1:置顶
                "readCount": 123, // 阅读数
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 更新时间
                "publishTime": "2024-08-23T00:00:00Z", // 发布时间
                "thumbnail": "https://example.com/thumbnail.jpg", // 缩略图, 是一个 url
                "status": 10, // 博客状态 10-已创建;20-已下架;30-已发布
                "cateId": 9876543210987654321, // 博客分类 id
                "tags": "concurrency,threads,Java" // 标签,英文逗号分隔,如:"并发,线程,Java"
            }
        ]
    },
    "message": "获取成功"
}
9. 获取所有的标签
- 请求方法: 
POST - 请求 URL: 
/api/blog/getAllTags 
请求参数
无
返回结果
{
    "code": 1,
    "data": ["tag1", "tag2"],
    "message": "获取成功"
}
10. 根据标签获取博客
- 请求方法: 
POST - 请求 URL: 
/api/blog/getBlogListByTag 
请求参数(JSON)
{
  "name": 1, // 标签名字 必填
  "pageNum": 1, // 第几页,从1开始  必填
  "pageSize": 20 // 每页的数量  必填
}
返回结果
{
    "code": 1,
    "data": {
        "hasMore": true,  // 还有更多
        "list": [
            {
                "id": 1, // 博客 id
                "title": "Sample Blog Title", // 博客的标题
                "intro": "This is a brief introduction to the blog.", // 博客的简介
                "content": "Markdown content here...", // md 编辑器产生的内容时,对应的 md 的内容
                "html": "<p>HTML content here...</p>", // md 编辑器产生的内容时,对应的生成的 html
                "isHtml": 0, // 0:md 编辑器产生的内容,1:富文本编辑器产生的内容
                "isTop": 1, // 是否置顶, 0: 不置顶,1:置顶
                "readCount": 123, // 阅读数
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 更新时间
                "publishTime": "2024-08-23T00:00:00Z", // 发布时间
                "thumbnail": "https://example.com/thumbnail.jpg", // 缩略图, 是一个 url
                "status": 10, // 博客状态 10-已创建;20-已下架;30-已发布
                "cateId": 9876543210987654321, // 博客分类 id
                "tags": "concurrency,threads,Java" // 标签,英文逗号分隔,如:"并发,线程,Java"
            }
        ]
    },
    "message": "获取成功"
}
11. 搜索博客(只搜索标题)
- 请求方法: 
POST - 请求 URL: 
/api/blog/searchBlog 
请求参数(JSON)
{
  "word": "keyword", // 关键词 非必填
  "status": 1, // 博客状态 10-已创建;20-已下架;30-已发布 非必填
  "pageNum": 1, // 第几页,从1开始  必填
  "pageSize": 20 // 每页的数量  必填
}
返回结果
{
    "code": 1,
    "data": {
        "hasMore": true,  // 还有更多
        "list": [
            {
                "id": 1, // 博客 id
                "title": "Sample Blog Title", // 博客的标题
                "intro": "This is a brief introduction to the blog.", // 博客的简介
                "content": "Markdown content here...", // md 编辑器产生的内容时,对应的 md 的内容
                "html": "<p>HTML content here...</p>", // md 编辑器产生的内容时,对应的生成的 html
                "isHtml": 0, // 0:md 编辑器产生的内容,1:富文本编辑器产生的内容
                "isTop": 1, // 是否置顶, 0: 不置顶,1:置顶
                "readCount": 123, // 阅读数
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 更新时间
                "publishTime": "2024-08-23T00:00:00Z", // 发布时间
                "thumbnail": "https://example.com/thumbnail.jpg", // 缩略图, 是一个 url
                "status": 10, // 博客状态 10-已创建;20-已下架;30-已发布
                "cateId": 9876543210987654321, // 博客分类 id
                "tags": "concurrency,threads,Java" // 标签,英文逗号分隔,如:"并发,线程,Java"
            }
        ]
    },
    "message": "获取成功"
}
12. 获取博客详情
- 请求方法: 
POST - 请求 URL: 
/api/blog/getBlogDetail 
请求参数(JSON)
{
  "id": 1, // 博客id 必填
}
返回结果
{
    "code": 1,
    "data": {
        "blog": {
            "id": 1, // 博客 id
            "title": "Sample Blog Title", // 博客的标题
            "intro": "This is a brief introduction to the blog.", // 博客的简介
            "content": "Markdown content here...", // md 编辑器产生的内容时,对应的 md 的内容
            "html": "<p>HTML content here...</p>", // md 编辑器产生的内容时,对应的生成的 html
            "isHtml": 0, // 0:md 编辑器产生的内容,1:富文本编辑器产生的内容
            "isTop": 1, // 是否置顶, 0: 不置顶,1:置顶
            "readCount": 123, // 阅读数
            "createTime": "2024-08-22T15:30:00Z", // 创建时间
            "updateTime": "2024-08-22T15:45:00Z", // 更新时间
            "publishTime": "2024-08-23T00:00:00Z", // 发布时间
            "thumbnail": "https://example.com/thumbnail.jpg", // 缩略图, 是一个 url
            "status": 10, // 博客状态 10-已创建;20-已下架;30-已发布
            "cateId": 9876543210987654321, // 博客分类 id
            "tags": "concurrency,threads,Java" // 标签,英文逗号分隔,如:"并发,线程,Java"
        },
        "list": [
            {
                "id": 1, // 博客 id
                "title": "Sample Blog Title", // 博客的标题
                "intro": "This is a brief introduction to the blog.", // 博客的简介
                "content": "Markdown content here...", // md 编辑器产生的内容时,对应的 md 的内容
                "html": "<p>HTML content here...</p>", // md 编辑器产生的内容时,对应的生成的 html
                "isHtml": 0, // 0:md 编辑器产生的内容,1:富文本编辑器产生的内容
                "isTop": 1, // 是否置顶, 0: 不置顶,1:置顶
                "readCount": 123, // 阅读数
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 更新时间
                "publishTime": "2024-08-23T00:00:00Z", // 发布时间
                "thumbnail": "https://example.com/thumbnail.jpg", // 缩略图, 是一个 url
                "status": 10, // 博客状态 10-已创建;20-已下架;30-已发布
                "cateId": 9876543210987654321, // 博客分类 id
                "tags": "concurrency,threads,Java" // 标签,英文逗号分隔,如:"并发,线程,Java"
            }
        ]
    },
    "message": "获取博客成功"
}
13. 获取专栏列表
- 请求方法: 
POST - 请求 URL: 
/api/special/getSpecialList 
请求参数(JSON)
{
  "pageNum": 1, // 第几页,从1开始  必填
  "pageSize": 20 // 每页的数量  必填
}
返回结果
{
    "code": 1,
    "data": {
        "hasMore": true,  // 还有更多
        "list": [
            {
                "id": 1, // id
                "title": "Special Feature Title", // 标题
                "intro": "This is a brief introduction to the special feature.", // 简介
                "cover": "https://example.com/cover.jpg", // 封面
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 更新时间
                "publishTime": "2024-08-23T00:00:00Z", // 发布时间
                "status": 20, // 状态 10-已创建;20-已下架;30-已发布
                "publishedCount": 2, // 已发布的小节数
                "readCount": 3, // 章节的阅读数
            }
        ]
    },
    "message": "获取成功"
}
14. 获取专栏的详情
- 请求方法: 
POST - 请求 URL: 
/api/special/getSpecialDetail 
请求参数(JSON)
{
  "specialId": 1, // 专栏ID  必填
}
返回结果
{
    "code": 1,
    "data": {
        "special": {  // 专栏数据
            "id": 1, // id
                "title": "Special Feature Title", // 标题
                "intro": "This is a brief introduction to the special feature.", // 简介
                "cover": "https://example.com/cover.jpg", // 封面
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 更新时间
                "publishTime": "2024-08-23T00:00:00Z", // 发布时间
                "status": 20, // 状态 10-已创建;20-已下架;30-已发布
        },
        "list": [  // 专栏小节
            {
                "id": 1, // 小节 id
                "title": "Section Title", // 小节的标题
                "intro": "This is an introduction to the section.", // 小节的简介,暂时用不到
                "content": "Markdown content here...", // md 编辑器产生的内容时,对应的 md 的内容
                "html": "<p>HTML content here...</p>", // md 编辑器产生的内容时,对应的生成的 html
                "tags": "concurrency,threads,Java", // 标签,英文逗号分隔,如:"并发,线程,Java"
                "isHtml": 0, // 0:md 编辑器产生的内容,1:富文本编辑器产生的内容
                "readCount": 12345, // 阅读数
                "specialId": 9876543210987654321, // 所属专栏 id
                "seq": 100, // 序号,从小到大排序,默认100
                "createTime": "2024-08-22T15:30:00Z", // 创建时间
                "updateTime": "2024-08-22T15:45:00Z", // 更新时间
                "publishTime": "2024-08-23T00:00:00Z", // 发布时间
                "status": 30, // 小节状态 10-已创建;20-已下架;30-已发布
            }
        ]
    },
    "message": "获取成功"
}
15. 获取小节的详情
- 请求方法: 
POST - 请求 URL: 
/api/special/getSectionDetail 
请求参数(JSON)
{
  "sectionId": 1, // 小节ID  必填
}
返回结果
{
    "code": 1,
    "data": {
        "id": 1, // 小节 id
        "title": "Section Title", // 小节的标题
        "intro": "This is an introduction to the section.", // 小节的简介,暂时用不到
        "content": "Markdown content here...", // md 编辑器产生的内容时,对应的 md 的内容
        "html": "<p>HTML content here...</p>", // md 编辑器产生的内容时,对应的生成的 html
        "tags": "concurrency,threads,Java", // 标签,英文逗号分隔,如:"并发,线程,Java"
        "isHtml": 0, // 0:md 编辑器产生的内容,1:富文本编辑器产生的内容
        "readCount": 12345, // 阅读数
        "specialId": 9876543210987654321, // 所属专栏 id
        "seq": 100, // 序号,从小到大排序,默认100
        "createTime": "2024-08-22T15:30:00Z", // 创建时间
        "updateTime": "2024-08-22T15:45:00Z", // 更新时间
        "publishTime": "2024-08-23T00:00:00Z", // 发布时间
        "status": 30, // 小节状态 10-已创建;20-已下架;30-已发布
    },
    "message": "获取小节成功"
}
 
 
 

 
 