🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
#### 登录 ~~~[api] post:/admin/index/index/login *string:username#用户名 *string:password#密码 <<< success { "code": 1, "msg": "success", "time": "2018-10-20 22:01:56", "data": { "id": 1, "username": "admin", "mobile": "18600000000", "sort": 1, "status": 1, "created_at": "2016-01-01 00:00:00", "updated_at": "2018-08-08 22:52:36", "status_text": "正常", "auth": [ 1 ] } } <<< exmaple { "username": "admin", "password": "123456" } <<< error { "code": 20001, "msg": "用户名密码错误", "time": "2018-01-03 16:40:59", "data": [] } <<< error { "code": 20011, "msg": "已登录", "time": "2018-01-03 16:41:15", "data": [] } ~~~ #### 登出 ~~~[api] post:/admin/index/index/logout <<< success { "code": 1, "msg": "success", "time": "2017-12-26 13:57:04", "data": [] } ~~~ #### 个人信息 ~~~[api] get:/admin/index/index/personal <<< success { "code": 1, "msg": "success", "time": "2018-10-20 22:03:11", "data": { "id": 1, "username": "admin", "mobile": "18600000000", "sort": 1, "status": 1, "created_at": "2016-01-01 00:00:00", "updated_at": "2018-08-08 22:52:36", "status_text": "正常", "auth": [ 1 ] } } ~~~ #### 更改密码 ~~~[api] post:/admin/index/index/changePassword *string:newpassword#新密码 *string:renewpassword#确认新密码 <<< success { "code": 1, "msg": "success", "time": "2018-01-13 23:37:50", "data": [] } <<< example { "newpassword": "1234567", "renewpassword": "1234567" } <<< error { "code": 0, "msg": "新密码与重复新密码不能为空", "time": "2018-01-13 22:50:09", "data": [] } <<< error { "code": 0, "msg": "新密码与重复新密码不一致", "time": "2018-01-13 22:49:54", "data": [] } ~~~