index.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.put({
  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. }
  43. // 字典
  44. export const getDictData = async (params) => {
  45. return await request.get({
  46. url: '/app-api/system/dict-data/type',
  47. params
  48. })
  49. }
  50. // 获取行业树形
  51. export const getIndustryTreeData = async (params) => {
  52. return await request.get({
  53. url: '/app-api/menduner/system/industry/get/tree',
  54. params
  55. })
  56. }
  57. // 获取行业列表
  58. export const getIndustryListData = async (params) => {
  59. return await request.get({
  60. url: '/app-api/menduner/system/industry/list',
  61. params
  62. })
  63. }