workbenches.uts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // 导入请求
  2. import { request } from '../request.uts'
  3. // 基础 URL 配置
  4. // #ifdef APP-ANDROID
  5. const BASE_URL = 'https://dev.xiaodingyun.cn'
  6. // #endif
  7. // #ifdef APP-IOS
  8. const BASE_URL = 'https://dev.xiaodingyun.cn'
  9. // #endif
  10. // #ifdef H5
  11. const BASE_URL = ''
  12. // #endif
  13. // #ifdef MP-WEIXIN
  14. const BASE_URL = 'https://dev.xiaodingyun.cn'
  15. // #endif
  16. // #ifdef MP-HARMONY
  17. const BASE_URL = 'https://dev.xiaodingyun.cn'
  18. // #endif
  19. //获取技师统计数据
  20. export function getAllData(params : any) : Promise<any> {
  21. return request({
  22. url: `${BASE_URL}/api/coach/v3/orders/statistics`,
  23. method: "GET",
  24. params: params
  25. })
  26. }
  27. //修改技师工作状态
  28. export function editCoachWorkState(data : any) : Promise<any> {
  29. return request({
  30. url: `${BASE_URL}/api/coach/v3/account/work-status`,
  31. method: "POST",
  32. data: data
  33. })
  34. }
  35. // 获取技师工作状态
  36. export function getCoachWorkState() : Promise<any> {
  37. return request({
  38. url: `${BASE_URL}/api/coach/v3/account/work-status`,
  39. method: "GET"
  40. })
  41. }
  42. // 获取技师工作时间设置
  43. export function getWorkTimeSetting() : Promise<any> {
  44. return request({
  45. url: `${BASE_URL}/api/coach/v3/account/schedule`,
  46. method: "GET"
  47. })
  48. }
  49. //修改技师工作时间设置
  50. export function editWorkTimeSetting(data : any) : Promise<any> {
  51. return request({
  52. url: `${BASE_URL}/api/coach/v3/account/schedule`,
  53. method: "POST",
  54. data: data
  55. })
  56. }
  57. // 获取技师服务项目
  58. export function getCoachItems() : Promise<any> {
  59. return request({
  60. url: `${BASE_URL}/api/coach/v3/project`,
  61. method: "GET"
  62. })
  63. }
  64. // 获取可开通项目列表
  65. export function getAvailableProjects() : Promise<any> {
  66. return request({
  67. url: `${BASE_URL}/api/coach/v3/projects/available`,
  68. method: "GET"
  69. })
  70. }
  71. // 开通/关闭项目并设置路费
  72. export function toggleProject(data : any) : Promise<any> {
  73. return request({
  74. url: `${BASE_URL}/api/coach/v3/projects/open`,
  75. method: "POST",
  76. data: data
  77. })
  78. }
  79. // 获取技师本月数据
  80. export function getMonthData() : Promise<any> {
  81. return request({
  82. url: `${BASE_URL}/api/coach/v3/orders/statistics_month`,
  83. method: "GET"
  84. })
  85. }