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.

116 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: 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. */
  61. export const updatePassword = (data) => {
  62. return http({
  63. method: 'GET',
  64. url: '/updatePassword',
  65. data: {
  66. data
  67. },
  68. })
  69. }
  70. /**
  71. * 通过苹果登录
  72. */
  73. export const postLoginAppleSimpleAPI = (phoneNumber) => {
  74. return http({
  75. method: 'POST',
  76. url: '/login',
  77. data: {
  78. phoneNumber,
  79. },
  80. })
  81. }
  82. /**
  83. * 通过谷歌登录
  84. */
  85. export const postLoginGoogleSimpleAPI = (phoneNumber) => {
  86. return http({
  87. method: 'POST',
  88. url: '/login/wxMin/simple',
  89. data: {
  90. phoneNumber,
  91. },
  92. })
  93. }