import service from "~/service";

import { newApi, oldApi } from "./../baseUrl"

enum HomeAPI {
  seek = "/admin/consultbidlist",
  seekDetail = "/admin/consultfeadinfo",
  seekStatus = '/admin/bidscheck',

  cost = '/admin/gooduplist',
  costDetail = '/admin/goodupinfo',
  costStatus = '/admin/goodexam',

  categories = '/user/TaxCategory/listByCompany'
}


export const requestSeeklist = (data: any, cancelToken) => {
  return service.post<any>({ url: oldApi + HomeAPI.seek, data , cancelToken});
};

export const requestSeekdetail = (data: any) => {
  return service.post<any>({ url: oldApi + HomeAPI.seekDetail, data});
};

export const requestSeekstatus = (data: any) => {
  return service.post<any>({ url: oldApi + HomeAPI.seekStatus, data});
};


export const requestCostlist = (data: any, cancelToken) => {
  return service.post<any>({ url: newApi + '/admin/good/list', data , cancelToken});
};

export const requestCostdetail = (data: any) => {
  return service.post<any>({ url: oldApi + HomeAPI.costDetail, data });
};

export const requestCoststatus = (data: any) => {
  return service.post<any>({ url: oldApi + HomeAPI.costStatus, data });
};

export const requestCompanyCategores = (data: any) => {
  return service.post<any>({ url: newApi + 'user/TaxCategory/listByCompany', data })
}

export const requestSupplierInfo = (data: any) => {
  return service.post<any>({ url: newApi + 'user/supplier/info', data })
}

export const requestBusinessInfo = (data: any) => {
  return service.post<any>({ url: oldApi + 'admin/businesssinfo', data })
}

