| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- // 导入请求
- import { request } from '../request.uts'
- // 基础 URL 配置
- // #ifdef APP-ANDROID
- const BASE_URL = 'https://dev.xiaodingyun.cn'
- // #endif
- // #ifdef APP-IOS
- const BASE_URL = 'https://dev.xiaodingyun.cn'
- // #endif
- // #ifdef H5
- const BASE_URL = ''
- // #endif
- // #ifdef MP-WEIXIN
- const BASE_URL = 'https://dev.xiaodingyun.cn'
- // #endif
- // #ifdef MP-HARMONY
- const BASE_URL = 'https://dev.xiaodingyun.cn'
- // #endif
- //获取技师统计数据
- export function getAllData(params : any) : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/orders/statistics`,
- method: "GET",
- params: params
- })
- }
- //修改技师工作状态
- export function editCoachWorkState(data : any) : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/account/work-status`,
- method: "POST",
- data: data
- })
- }
- // 获取技师工作状态
- export function getCoachWorkState() : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/account/work-status`,
- method: "GET"
- })
- }
- // 获取技师工作时间设置
- export function getWorkTimeSetting() : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/account/schedule`,
- method: "GET"
- })
- }
- //修改技师工作时间设置
- export function editWorkTimeSetting(data : any) : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/account/schedule`,
- method: "POST",
- data: data
- })
- }
- // 获取技师服务项目
- export function getCoachItems() : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/project`,
- method: "GET"
- })
- }
- // 获取可开通项目列表
- export function getAvailableProjects() : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/projects/available`,
- method: "GET"
- })
- }
- // 开通/关闭项目并设置路费
- export function toggleProject(data : any) : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/projects/open`,
- method: "POST",
- data: data
- })
- }
- // 获取技师本月数据
- export function getMonthData() : Promise<any> {
- return request({
- url: `${BASE_URL}/api/coach/v3/orders/statistics_month`,
- method: "GET"
- })
- }
|