memberSetting.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import { requestApi } from '../util/network'
  2. // 发送验证码
  3. export const sendAuthCode =
  4. (type) =>
  5. requestApi(
  6. '/Memberaccount/send_auth_code',
  7. 'POST',
  8. {
  9. type: type
  10. },
  11. 'member'
  12. )
  13. // 验证码检测
  14. export const checkAuthCode =
  15. (authCode) =>
  16. requestApi(
  17. '/Memberaccount/check_auth_code',
  18. 'POST',
  19. {
  20. auth_code: authCode
  21. },
  22. 'member'
  23. )
  24. // 更新用户手机号
  25. export const updateUserMobile =
  26. (authCode) =>
  27. requestApi(
  28. '/Memberaccount/bind_mobile_step2',
  29. 'POST',
  30. {
  31. auth_code: authCode
  32. },
  33. 'member'
  34. )
  35. // 更新用户密码
  36. export const updateUserPassword =
  37. (password, password1) =>
  38. requestApi(
  39. '/Memberaccount/modify_password',
  40. 'POST',
  41. {
  42. password: password,
  43. password1: password1
  44. },
  45. 'member'
  46. )
  47. // 更新用户支付密码
  48. export const updateUserPaypwd =
  49. (password, password1) =>
  50. requestApi(
  51. '/Memberaccount/modify_paypwd',
  52. 'POST',
  53. {
  54. password: password,
  55. password1: password1
  56. },
  57. 'member'
  58. )
  59. // 绑定用户手机
  60. export const bindUserMobile =
  61. (mobile) =>
  62. requestApi(
  63. '/Memberaccount/bind_mobile_step1',
  64. 'POST',
  65. {
  66. mobile: mobile
  67. },
  68. 'member'
  69. )
  70. // 绑定用户邮箱
  71. export const bindUserEmail =
  72. (email) =>
  73. requestApi(
  74. '/Memberaccount/bind_email_step1',
  75. 'POST',
  76. {
  77. email: email
  78. },
  79. 'member'
  80. )