Rap 原分销系统代码Web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

551268fd75b89b83d0ee52edf54963de0071256f.svn-base 993B

5 maanden geleden
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 }