import request from '@/utils/request'

enum API {
  GET_COMPANY_LIST = '/crmHighTechZoneEnterprises/getCreditScoreList'
}

export interface CompanyData{
  enterpriseName: string,
  grade: string,
  sortMark: number,
  total:number,
  unifiedSocialCreditCode: string
}

export interface CompanyListData extends pageAxiosResponse{
  result:CompanyData[];
}
export interface CompanyListDataType extends AxiosResponse{
  data:CompanyListData;
}

export const getCompanyList = (pageNum:number, pageSize:number, unifiedSocialCreditCode:string = '')=>{
  return request.get<any,CompanyListDataType>(API.GET_COMPANY_LIST,{
    params:{
      pageNum,
      pageSize,
      unifiedSocialCreditCode,
      condition:"A,AA,AAA"
    }
  });
};