1 Star 0 Fork 0

Sadness / HanFu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

#hanfu

请求端口

一切请求都是post接口,并且为json数据上传。

登录接口

请求方式:POST

URL: http://localhost/API/login

请求格式:

{"account":"123456","password":"123456"}

返回参数

成功参数:

code 状态码 200成功 500失败

sex 性别 1男 2女 3保密

token 令牌

{"code":200,"data":{"account":"123456","name":"暖风","sex":"3","token":"令牌"},"message":"/getMessage"}

失败参数:

code 状态码 200成功 500失败

data 提示信息

message 无用信息

{"code":500,"data":"账户登录失败!","message":"/404"}

注册请求

请求方式:POST

URL: http://localhost/API/register

请求格式:

{
	"account":"123456",
	"password":"123456",
	"name": "name",
	"sex": "1"
}

返回参数

成功参数:

{"code":200,"message":"注册成功!"}

失败参数:

{"code":500,"data":"\r\n### Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '12345678' for key 'users_account_uindex'\r\n### The error may exist in com/yangjiaying/hanfu/modular/login/dao/loginMapper.java (best guess)\r\n### The error may involve com.yangjiaying.hanfu.modular.login.dao.loginMapper.register-Inline\r\n### The error occurred while setting parameters\r\n### SQL: insert into users(account,password,name,sex) values(?,?,?,?)\r\n### Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '12345678' for key 'users_account_uindex'\n; Duplicate entry '12345678' for key 'users_account_uindex'; nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '12345678' for key 'users_account_uindex'","message":"注册失败"}

注册时检测账户是否可注册

请求方式:POST

URL: http://localhost/API/isItRegistered

json请求格式:

{"account":"1234568"}

返回参数

成功参数:

{"code":500,"message":"账户1234568可注册!"}

失败参数:

{"code":200,"message":"账户已存在!"}

修改密码接口

请求方式:POST

URL: http://localhost/API/alepwd

请求头:

token:登录成功得到的那个令牌

json请求格式:

{"account":"123456","oldpassword":"123456","newpassword":"123123"}

返回参数

成功参数:

{"code":200,"data":true,"message":"账户:123456修改成功"}

失败参数:

{"code":500,"data":false,"message":"账户:123456修改失败"}

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sadnesses/HanFu.git
git@gitee.com:sadnesses/HanFu.git
sadnesses
HanFu
HanFu
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891