index.js 1008 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import request from '@/config/axios'
  2. // 发送验证码
  3. export const sendSmsCode = async (data) => {
  4. return await request.post({
  5. url: '/app-api/menduner/system/auth/send-sms-code',
  6. data
  7. })
  8. }
  9. // 验证码登录
  10. export const smsLogin = async (data) => {
  11. return await request.post({
  12. url: '/app-api/menduner/system/auth/sms-login',
  13. data
  14. })
  15. }
  16. // 密码登录
  17. export const passwordLogin = async (data) => {
  18. return await request.post({
  19. url: '/app-api/menduner/system/auth/login',
  20. data
  21. })
  22. }
  23. // 退出登录
  24. export const logout = async () => {
  25. return await request.post({
  26. url: '/app-api/menduner/system/auth/logout'
  27. })
  28. }
  29. // 修改密码
  30. export const updatePassword = async (data) => {
  31. return await request.post({
  32. url: '/app-api/menduner/system/mde-user/update-password',
  33. data
  34. })
  35. }
  36. // 重置密码
  37. export const resetPassword = async (data) => {
  38. return await request.post({
  39. url: '/admin-api/menduner/system/mde-user/update-password',
  40. data
  41. })
  42. }