Rap 原分销系统代码Web
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
993B

  1. import request from '@/utils/request'
  2. import { encrypt } from '@/utils/rsaEncrypt'
  3. export function add(data) {
  4. return request({
  5. url: 'api/users',
  6. method: 'post',
  7. data
  8. })
  9. }
  10. export function del(ids) {
  11. return request({
  12. url: 'api/users',
  13. method: 'delete',
  14. data: ids
  15. })
  16. }
  17. export function edit(data) {
  18. return request({
  19. url: 'api/users',
  20. method: 'put',
  21. data
  22. })
  23. }
  24. export function editUser(data) {
  25. return request({
  26. url: 'api/users/center',
  27. method: 'put',
  28. data
  29. })
  30. }
  31. export function updatePass(user) {
  32. const data = {
  33. oldPass: encrypt(user.oldPass),
  34. newPass: encrypt(user.newPass)
  35. }
  36. return request({
  37. url: 'api/users/updatePass/',
  38. method: 'post',
  39. data
  40. })
  41. }
  42. export function updateEmail(form) {
  43. const data = {
  44. password: encrypt(form.pass),
  45. email: form.email
  46. }
  47. return request({
  48. url: 'api/users/updateEmail/' + form.code,
  49. method: 'post',
  50. data
  51. })
  52. }
  53. export default { add, edit, del }