接口 | url | method |
---|---|---|
登录 | /user/login | post |
获取用户信息 | /user/info | get |
注销 | /user/logout | post |
// 登陆接口返回数据
{"code":20000,"data":{"token":"admin-token"}}
// 获取用户返回数据
{"code":20000,"data":{"roles":["admin"],"introduction":"I am a super administrator","avatar":"<https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif","name":"Super> Admin"}}
// 注销返回数据
{"code":20000,"data":"success"}
登陆流程
前端去掉mock
VUE_APP_BASE_API = '<http://localhost:9999>'