import request from './config'

let baseUrl = location.origin
// let baseUrl = 'http://192.168.1.67:8003'
let newPort = '8003'
baseUrl = baseUrl.replace(/:\d+/, ':' + newPort)

export const getExecuteList = () => {
  return request.get(baseUrl + '/webApi/job/list')
}

export const setExecuteStats = (data: any) => {
  return request.get(baseUrl + '/webApi/job/stats', data)
}

export const setExecuteCron = (data: any) => {
  return request.get(baseUrl + '/webApi/job/cron', data)
}

export const getSyncConfigLog = (data: any) => {
  return request.get(baseUrl + '/webApi/syncConfig/log', data)
}

export const setSyncConfigLog = (data: any) => {
  return request.get(baseUrl + '/webApi/syncConfig/log/update', data)
}

export const getSyncConfigScene = (data: any) => {
  return request.get(baseUrl + '/webApi/syncConfig/scene', data)
}

export const setSyncConfigScene = (data: any) => {
  return request.get(baseUrl + '/webApi/syncConfig/scene/update', data)
}
