login.uts 781 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { request } from '../request.uts'
  2. // 基础 URL 配置
  3. // #ifdef APP-ANDROID
  4. const BASE_URL = 'https://dev.xiaodingyun.cn'
  5. // #endif
  6. // #ifdef APP-IOS
  7. const BASE_URL = 'https://dev.xiaodingyun.cn'
  8. // #endif
  9. // #ifdef H5
  10. const BASE_URL = ''
  11. // #endif
  12. // #ifdef MP-WEIXIN
  13. const BASE_URL = 'https://dev.xiaodingyun.cn'
  14. // #endif
  15. // #ifdef MP-HARMONY
  16. const BASE_URL = 'https://dev.xiaodingyun.cn'
  17. // #endif
  18. // 验证码登录
  19. export function fetchLogin(data : any) : Promise<any> {
  20. return request({
  21. url: `${BASE_URL}/api/coachapp/account/login`,
  22. method: "POST",
  23. data: data
  24. })
  25. }
  26. // 发送验证码
  27. export function fetchSendcode(data : any) : Promise<any> {
  28. return request({
  29. url: `${BASE_URL}/api/coachapp/account/sendcode`,
  30. method: "POST",
  31. data: data
  32. })
  33. }