• 地址 GET 或者 /api/index
  • 请求类型 application/x-www-form-urlencoded
  • 参数
    • pageNo: 页码
    • tab: 分类,分别是 精华:good 无人评论:noanswer 热门:hot 最新:newest
  • 返回 Result(IPage)

登录

  • 地址 POST /api/login
  • 请求类型 application/json
  • 参数
    • username: 用户名
    • password: 密码
    • captcha: 图片验证码
  • 返回 Result(Map)
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": {
  5. "user": {
  6. "id": 1,
  7. "username": "tomoya",
  8. "telegramName": null,
  9. "avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
  10. "email": null,
  11. "website": null,
  12. "bio": null,
  13. "inTime": 1548992041000,
  14. "emailNotification": false
  15. },
  16. "token": "208bb4c1-daf1-4a32-b198-7f4db8f6d565"
  17. }
  18. }
  • 地址 POST /api/register
  • 请求类型 application/json
  • 参数
    • username: 用户名
    • password: 密码
    • email: 邮箱地址
    • captcha: 图片验证码
  • 返回 Result(Map)

发送手机验证码

  • 地址 GET /api/send_code
  • 请求类型 application/x-www-form-urlencoded
  • 参数
    • mobile: 手机号
    • captcha: 图片验证码
  • 返回 Result(Map)
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": null
  5. }
  • 地址 POST /api/mobile_login
  • 请求类型 application/json
  • 参数
    • mobile: 手机号
    • code: 手机验证码
    • captcha: 图片验证码

标签

  • 地址 POST /api/tags
  • 请求类型 application/x-www-form-urlencoded
  • 参数
    • pageNo
  • 返回 Result(List)
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "records": [
  5. {
  6. "id": 1,
  7. "name": "一个标签",
  8. "description": "标签描述,解释一下标签让人能更明白它的意思",
  9. "icon": "http://spring.io/img/homepage/icon-spring-boot.svg",
  10. "topicCount": 1,
  11. "inTime": 1548992281000
  12. }
  13. ],
  14. "total": 1,
  15. "size": 20,
  16. "current": 1,
  17. "searchCount": true,
  18. "pages": 1
  19. }
  20. }
  • 地址 POST /api/upload
  • 请求类型 application/form-data
  • 参数
    • token
    • file: 上传图片的文件对象
  • 返回 Result(String) // 上传成功后,会返回图片的访问地址