Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function getInfo(token) {
- return request({
- url: '/user/info',
- method: 'get',
- params: { token }
- })
- }
- export function logout() {
- return request({
- url: '/user/logout',
- method: 'post'
- })
- }
- info: передаю токен, полученный при логине и в ответ жду информацию о пользователе (хотя бы имя)
- {
- roles: ['admin'],
- introduction: 'I am a administrator',
- avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
- name: 'Пеляк В.С.'
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement