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.

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