user.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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?oldPassword='+oldPassword+'&newPassword='+newPassword,
  11. method: 'post',
  12. })
  13. }
  14. // 忘记密码发送短信
  15. export function getappForgetPW(data) {
  16. return request({
  17. url: '/wuYe/applet/appForgetPW/'+data,
  18. method: 'get',
  19. })
  20. }
  21. // 重置密码
  22. export function getappCheck(data) {
  23. return request({
  24. url: '/system/user/profile/appCheck',
  25. method: 'get',
  26. 'data':data
  27. })
  28. }
  29. // 查询用户个人信息
  30. export function getUserProfile() {
  31. return request({
  32. url: '/system/user/profile',
  33. method: 'get'
  34. })
  35. }
  36. // 修改用户个人信息
  37. export function updateUserProfile(data) {
  38. return request({
  39. url: '/system/user/profile/put',
  40. method: 'post',
  41. data: data
  42. })
  43. }
  44. // 用户头像上传
  45. export function uploadAvatar(data) {
  46. return upload({
  47. url: '/system/user/profile/avatar',
  48. name: data.name,
  49. filePath: data.filePath
  50. })
  51. }
  52. // 下载版本更新
  53. export function findVersion(data) {
  54. return request({
  55. url: '/system/app/new',
  56. method: 'get',
  57. data: data,
  58. lhide:true,
  59. })
  60. }
  61. // 字典值yzdqId
  62. export function getDictionaryFn(data) {
  63. return request({
  64. url: '/system/dict/data/type/'+data,
  65. method: 'get',
  66. type:true
  67. })
  68. }