user.js 709 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { request } from '@/utils/request'
  2. export function getInfo() {
  3. return request({
  4. url: '/system/user/getInfo',
  5. method: 'get'
  6. })
  7. }
  8. // 用户密码重置
  9. export function updateUserPwd(oldPassword, newPassword) {
  10. const data = {
  11. oldPassword,
  12. newPassword
  13. }
  14. return request({
  15. url: '/system/user/profile/updatePwd',
  16. method: 'put',
  17. data: data
  18. })
  19. }
  20. // 修改用户个人信息
  21. export function updateUserProfile(data) {
  22. return request({
  23. url: '/system/user/profile',
  24. method: 'put',
  25. data: data
  26. })
  27. }
  28. /**
  29. * 账号注销
  30. * @Author: Antigravity
  31. */
  32. export function cancelUser() {
  33. return request({
  34. url: '/system/user/cancel',
  35. method: 'delete'
  36. })
  37. }