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.

122 lines
1.7 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: '/UserLogin/login',
  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: {
  33. data
  34. }
  35. })
  36. }
  37. /**
  38. * 发送手机验证码
  39. * @param {*} email
  40. * @returns
  41. */
  42. export const SendPhoneCodeApi = (data) => {
  43. return http({
  44. method: 'POST',
  45. url: '/UserLogin/sendPhone',
  46. data: {
  47. data
  48. }
  49. })
  50. }
  51. /**
  52. * 注册
  53. */
  54. export const register = (data) => {
  55. return http({
  56. method: 'GET',
  57. url: '/register',
  58. data: {
  59. data
  60. },
  61. })
  62. }
  63. /**
  64. * 修改密码
  65. *
  66. */
  67. export const updatePassword = (data) => {
  68. return http({
  69. method: 'GET',
  70. url: '/updatePassword',
  71. data: {
  72. data
  73. },
  74. })
  75. }
  76. /**
  77. * 通过苹果登录
  78. */
  79. export const postLoginAppleSimpleAPI = (phoneNumber) => {
  80. return http({
  81. method: 'POST',
  82. url: '/login',
  83. data: {
  84. phoneNumber,
  85. },
  86. })
  87. }
  88. /**
  89. * 通过谷歌登录
  90. */
  91. export const postLoginGoogleSimpleAPI = (phoneNumber) => {
  92. return http({
  93. method: 'POST',
  94. url: '/login/wxMin/simple',
  95. data: {
  96. phoneNumber,
  97. },
  98. })
  99. }