workbenches.uts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // 导入请求
  2. import { request } from '../request.uts'
  3. // 基础 URL 配置
  4. // #ifdef APP-ANDROID
  5. const BASE_URL = 'http://192.168.0.9:8001'
  6. // #endif
  7. // #ifdef APP-IOS
  8. const BASE_URL = 'http://192.168.0.9:8001'
  9. // #endif
  10. // #ifdef H5
  11. const BASE_URL = ''
  12. // #endif
  13. // #ifdef MP-WEIXIN
  14. const BASE_URL = 'http://192.168.0.9:8001'
  15. // #endif
  16. // #ifdef MP-HARMONY
  17. const BASE_URL = 'http://192.168.0.9:8001'
  18. // #endif
  19. export function getAllData(params : any) : Promise<any> {
  20. return request({
  21. url: `${BASE_URL}/api/coach/v3/orders/statistics`,
  22. method: "GET",
  23. params: params
  24. })
  25. }
  26. export function editCoachWorkState(data : any) : Promise<any> {
  27. return request({
  28. url: `${BASE_URL}/api/coach/v3/account/work-status`,
  29. method: "POST",
  30. data: data
  31. })
  32. }
  33. export function editWorkTimeSetting(data : any) : Promise<any> {
  34. return request({
  35. url: `${BASE_URL}/api/coach/v3/account/schedule`,
  36. method: "POST",
  37. data: data
  38. })
  39. }
  40. export function toggleProject(data : any) : Promise<any> {
  41. return request({
  42. url: `${BASE_URL}/api/coach/v3/projects/open`,
  43. method: "POST",
  44. data: data
  45. })
  46. }