user.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import upload from '@/utils/upload'
  2. import request from '@/utils/request'
  3. // 用户密码重置
  4. export function updateUserPwd(oldPassword, newPassword) {
  5. const data = {
  6. oldPassword,
  7. newPassword
  8. }
  9. return request({
  10. url: '/system/user/profile/updatePwd',
  11. method: 'post',
  12. params: data
  13. })
  14. }
  15. // 忘记密码发送短信
  16. export function getappForgetPW(data) {
  17. return request({
  18. url: '/applet/appForgetPW/'+data,
  19. method: 'get',
  20. })
  21. }
  22. // 重置密码
  23. export function getappCheck(data) {
  24. return request({
  25. url: '/applet/appCheck',
  26. method: 'get',
  27. 'data':data
  28. })
  29. }
  30. // 查询用户个人信息
  31. export function getUserProfile() {
  32. return request({
  33. url: '/system/user/profile',
  34. method: 'get'
  35. })
  36. }
  37. // 修改用户个人信息
  38. export function updateUserProfile(data) {
  39. return request({
  40. url: '/system/user/profile',
  41. method: 'post',
  42. data: data
  43. })
  44. }
  45. // 用户头像上传
  46. export function uploadAvatar(data) {
  47. return upload({
  48. url: '/system/user/profile/avatar',
  49. name: data.name,
  50. filePath: data.filePath
  51. })
  52. }
  53. // 下载版本更新
  54. export function findVersion(data) {
  55. return request({
  56. url: '/system/app/new',
  57. method: 'get',
  58. data: data
  59. })
  60. }