代码拉取完成,页面将自动刷新
#hanfu
请求方式: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修改失败"}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。