import HttpAxios from '@/utils/axios'

const baseUrl = 'http://localhost/api/Customer_Service_Online/main_new_version.php'

/**
 * Tracking首页表格列数据
 */
export const getTrackingTableColumns = (params: any, config: any) => {
  return HttpAxios.get(
    `${baseUrl}`,
    {
      action: 'ocean_order',
      ...params
    },
    config
  )
}

/**
 * 获取Tracking首页表格数据
 */
export const getTrackingTableData = (params: any, config: any) => {
  return HttpAxios.post(
    `${baseUrl}`,
    {
      action: 'ocean_order',
      operate: 'search',
      _ntype: 'ocean_order',
      ...params
    },
    config
  )
}

/**
 * 获取Tracking详情页数据
 */
export const getTrackingDetail = (params: any, config: any) => {
  return HttpAxios.get(
    `${baseUrl}`,
    {
      action: 'ocean_order',
      operate: 'detail',
      _schemas: 'public',
      ...params
    },
    config
  )
}
