阳光沙滩博客系统后端api


以下内容就是api的具体详情


提示:以下是本篇文章正文内容,下面案例可供参考

一、用户中心接口

api地址:http://280sl28549.eicp.vip:10939/swagger-ui.html?urls.primaryName=%E7%94%A8%E6%88%B7%E4%B8%AD%E5%BF%83#/

1.删除用户

方法:delete
参数:无
 接口:/user /
body字段:用户id
实例:http://localhost:2021/user/743147755047747584
返回:
{
    "success": true,
    "code": 20000,
    "message": "删除成功",
    "data": null
}

2.初始化管理员账户

方法:post
参数:无
body字段:
	{
		"email": "2803062371@qq.com",
		 "password": "123456",
		"userName": "admin"
	}
接口:/user/admin_account
实例:http://localhost:2021/user/admin_account
返回:
{
  "success": true,
  "code": 20000,
  "message": "初始化成功",
  "data": null
	}

3.获取人类验证码

方法:get
参数:captcha_key,不能少于13位的key
接口:/user/captcha
实例:http://localhost:2021/user/captcha?captcha_key=1111111111111
注意:该验证码有效期为60秒
返回:一张具有验证码的照片

4.检查邮箱是否被注册

方法:get
参数:email
接口:/user/email
实例:http://localhost:2021/user/email?email=280306371@qq.com
返回:
{
"success": false,
"code": 40000,
"message": "邮箱未注册",
"data": null
}

5.发送箱验证码

方法:get
参数:email type
接口:/user/verify_code
实例:http://localhost:2021/user/verify_code?email=
2803062371%40qq.com&type=foget
返回:
{
  "success": true,
  "code": 20000,
  "message": "验证码发送成功",
  "data": null
}

6.更改邮箱

方法:put
参数:email verify_code
接口:/user/email
实例:http://localhost:2021/user/email?email= 		2477922515%40qq.com&verify_code=16245
返回:
{
  "success": true,
  "code": 20000,
  "message": "邮箱更改成功
  "data": null
}

7.注册

方法:post
参数:captcha_code captcha_key email_code
接口:/user/join_in

body字段:
{
  "email": "2803062371@qq.com",
  "password": "123456",
  "userName": "mytest1"
}
实例:
http://localhost:2021/user/join_in?captcha_code=d5esp&captcha_key=1111111111111&email_code=197275

8.列举用户

方法:get
参数:page size
接口:user/list
实例:http://localhost:2021/user/list?page=2&size=1
注意:如果返回没结果,最大可能就是你设置的访问的总量大于库里面的总量,比如你访问是3*5,也就是15个,但是库里面就10个,会导致最后一页一个都没有,所以返回接口为空.

9.登录

方法:post
接口:
参数:无
body参数:
	{
		"password": "123456",
	 	"userName": "mytest1"
	}
body字段:验证码 验证码key
实例:http://localhost:2021/user/login/xudzb/1111111111111

11.退出登录

方法:get
接口:/user/logout
实例:http://localhost:2021/user/logout
参数:无
返回:
{
  "success": true,
  "code": 40002,
  "message": "账号已退出",
  "data": null
}

12.更改密码

方法:
body字段:
{
 "email": "2803062371@qq.com",
  password": "123456"
}
body字段:验证码
参数:无
接口:/user/password
实例:http://localhost:2021/user/password/587025

13 通过id获取用户信息

方法:get
body字段:用户id
接口:/user/user_info
实例:http://localhost:2021/user/user_info/743147755047747584

14 更改用户信息

方法:put
body字段:人类验证码
接口:/user/user_info
实例:http://localhost:2021/user/user_info/758733490417041408

15:检查用户名是否被用

方法:get
参数:用户名
接口:/user/user_name
实例:http://localhost:2021/user/user_name?userName=string

其他接口

二.前端门户
三.管理中心

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值