文档
测试

搜索博客(小程序)

POST
/blog/wxsearch

请求头

参数名
类型
描述
必填
token
String
登录时返回的token值
必填

请求参数

参数名
类型
描述
必填
search
String
搜索关键词
必填
timeType
String
0:综合排序 1:最新排序 2:最热排序
必填
selectType
String
0:时间不限 1:最新一天 2:最近一周 3:最近一月
必填
type
String
0:综合 1:文章
必填

响应参数

参数名
类型
描述
必填
code
int
状态码:1
必填
msg
String
搜索成功
必填
data
List<Blog>
包含所有搜索到的博客数据的集合
必填

说明 / 示例

``` { "code": 1, "message": "搜索成功", "data": [ { "id": 31, "title": "test", "username": "123", "nickname": null, "profile_photo": "/images/f580b6d8-1b86-4b72-9e8c-50accff482f3.jpg", "content": "test", "views": 0, "gttu": 0, "comment_num": 0, "filename": null, "tag": "python", "hot": null, "link": null, "create_time": "2023-05-07 19:14:11", "update_time": "2023-05-07 19:14:11" }, { "id": 32, "title": "test", "username": "123", "nickname": null, "profile_photo": "/images/f580b6d8-1b86-4b72-9e8c-50accff482f3.jpg", "content": "test", "views": 0, "gttu": 0, "comment_num": 0, "filename": null, "tag": "python", "hot": null, "link": null, "create_time": "2023-05-07 19:14:48", "update_time": "2023-05-07 19:14:48" }, { "id": 34, "title": "test", "username": "123", "nickname": null, "profile_photo": "/images/f580b6d8-1b86-4b72-9e8c-50accff482f3.jpg", "content": "test", "views": 0, "gttu": 0, "comment_num": 0, "filename": null, "tag": "python", "hot": null, "link": null, "create_time": "2023-05-07 19:31:01", "update_time": "2023-05-07 19:31:01" }, { "id": 35, "title": "test", "username": "123", "nickname": null, "profile_photo": "/images/f580b6d8-1b86-4b72-9e8c-50accff482f3.jpg", "content": "test", "views": 0, "gttu": 0, "comment_num": 0, "filename": null, "tag": "python", "hot": null, "link": null, "create_time": "2023-05-07 19:39:18", "update_time": "2023-05-07 19:39:18" } ] } ```