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.

146 lines
2.0 KiB

  1. import { http } from '../../utils/http'
  2. /**
  3. *
  4. * @param data 模拟手机号码
  5. * {
  6. "loginType":"EMAIL", //登录方式
  7. "account":"q614588746@163.com" , //登陆账号 手机号/邮箱/dccode
  8. "verifyCode":"837012", //验证码
  9. "password":"", //密码
  10. "useCode":"true", //是否使用验证码 true/false
  11. "idToken":"", //第三方登录idToken
  12. }
  13. */
  14. export const LoginApi = (data) => {
  15. return http({
  16. method: 'POST',
  17. url: '/api/userLogin',
  18. data:
  19. data
  20. ,
  21. })
  22. }
  23. /**
  24. * 发送邮箱验证码
  25. * @param {*} email
  26. * @returns
  27. */
  28. export const SendEmailCodeApi = (data) => {
  29. return http({
  30. method: 'POST',
  31. url: '/UserLogin/sendEmail',
  32. data: data
  33. })
  34. }
  35. /**
  36. * 发送手机验证码
  37. * @param {*} email
  38. * @returns
  39. */
  40. export const SendPhoneCodeApi = (data) => {
  41. return http({
  42. method: 'POST',
  43. url: '/UserLogin/sendPhone',
  44. data:data
  45. })
  46. }
  47. /**
  48. * 注册
  49. */
  50. export const registerApi = (data) => {
  51. return http({
  52. method: 'POST',
  53. url: '/UserLogin/register',
  54. data: data,
  55. })
  56. }
  57. /**
  58. * 忘记密码校验验证码
  59. */
  60. export const verifyCodeApi = (data) => {
  61. return http({
  62. method: 'POST',
  63. url: '/UserLogin/verifyCode',
  64. data: data,
  65. })
  66. }
  67. /**
  68. * 忘记密码输入新的密码
  69. */
  70. export const forgetApi = (data) => {
  71. return http({
  72. method: 'POST',
  73. url: '/UserLogin/forget',
  74. data: data,
  75. })
  76. }
  77. /**
  78. * 修改密码
  79. *
  80. */
  81. export const updatePassword = (data) => {
  82. return http({
  83. method: 'GET',
  84. url: '/updatePassword',
  85. data: {
  86. data
  87. },
  88. })
  89. }
  90. /**
  91. * 通过苹果登录
  92. */
  93. export const postLoginAppleSimpleAPI = (phoneNumber) => {
  94. return http({
  95. method: 'POST',
  96. url: '/login',
  97. data: {
  98. phoneNumber,
  99. },
  100. })
  101. }
  102. /**
  103. * 通过谷歌登录
  104. */
  105. export const postLoginGoogleSimpleAPI = (phoneNumber) => {
  106. return http({
  107. method: 'POST',
  108. url: '/login/wxMin/simple',
  109. data: {
  110. phoneNumber,
  111. },
  112. })
  113. }