login.js 687 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { http } from '@/utils/https';
  2. export const userApi = {
  3. /**
  4. * 用户登录
  5. */
  6. postLogin: data => http({
  7. method: 'POST',
  8. url: '/login',
  9. data
  10. }),
  11. /**
  12. * 账号信息
  13. */
  14. getUserInfo: () => http({
  15. method: 'GET',
  16. url: '/getInfo'
  17. }),
  18. // getUserInfo: () => http.get('/getInfo'),
  19. /**
  20. * 退出登录
  21. */
  22. postLogout: () => http.post('/logout'),
  23. /**
  24. * 修改个人信息接口
  25. */
  26. UpUser: (data) => http.put('/system/user/profile', data),
  27. /**
  28. * 修改密码
  29. */
  30. putPassword: ({ oldPassword, newPassword }) => http.put(`/system/user/profile/updatePwd?oldPassword=${oldPassword}&newPassword=${newPassword}`),
  31. }