login.js 955 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { request } from "@/utils/request";
  2. // 登录方法
  3. export function login(data) {
  4. return request({
  5. url: "/system/appLogin",
  6. headers: {
  7. isToken: false,
  8. },
  9. method: "POST",
  10. data: data,
  11. });
  12. }
  13. // 获取用户详细信息
  14. export function getInfo() {
  15. return request({
  16. url: "/system/getInfo",
  17. method: "get",
  18. });
  19. }
  20. // 退出方法
  21. export function logout(params) {
  22. return request({
  23. url: "/system/logout" + "?openId=" + params.openId,
  24. method: "delete",
  25. });
  26. }
  27. // 获取验证码
  28. export function getCodeImg(data) {
  29. return request({
  30. url: "/system/SendSms/noteSending",
  31. headers: {
  32. isToken: false,
  33. },
  34. method: "GET",
  35. data: data,
  36. });
  37. }
  38. /** 获取登录页数据 */
  39. export function getMobileTenantConfig(data) {
  40. return request({
  41. url: "/system/sysMobileTenantConfig/getAppTenantConfig",
  42. headers: {
  43. isToken: false,
  44. },
  45. method: "GET",
  46. data: data,
  47. });
  48. }