import ajax from './ajax'
import { LOCATION_URL } from '@/config/config'
// 1. 定义基础路径
// const BASE_URL = '/huiqicha'
const BASE_URL = LOCATION_URL
// const BASE_URL = 'https://lhlas-dev.zrubft.com'
// const BASE_URL = 'http://158.226.90.148:10022'
//调试
export const custBaseInfoList = (params) => ajax(BASE_URL + '/system/custBaseInfo/list', params, 'POST');



// 2. 查热搜企业列表
export const getQueryCompanyHotSearch = () => ajax(BASE_URL + '/huiqicha/mobile/company/queryCompanyHotSearch', {}, 'POST');


// 2. 首页-查热搜排行榜列表
export const getQueryHotWordList = () => ajax(BASE_URL + '/huiqicha/mobile/company/queryHotWordList', {}, 'POST');

// 3. 首页-分页查公司列表
export const getQueryCompanyPage = (params) => ajax(BASE_URL + '/huiqicha/mobile/company/queryCompanyPage', params, 'POST');


// 4. 首页-查案件
export const getQueryZhixing = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/queryZhixing', params, 'POST');

// 5. 首页-查失信
export const getQueryShixin = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/queryShixin', params, 'POST');

// 6. 首页-失信人热搜
export const getQueryShiXinHotWordList = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/queryShiXinHotWordList', params, 'POST');


// 7. 首页-查融资
export const getQueryFinancing = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/queryFinancing', params, 'POST');

// 8. 首页-查舆情
export const getQueryNewsinfo = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/queryNewsinfo', params, 'POST');

// 9. 首页-查舆情热搜榜
export const getQueryNewsHotSearch = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/queryNewsHotSearch', params, 'POST');

// 10. 首页-查舆情详情
export const getNewsinfoById = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/getNewsinfoById', params, 'POST');

// 11. 首页-查舆情详情 》关注
export const addAttentionCompany = (params) => ajax(BASE_URL + '/huiqicha/mobile/attention/addAttentionCompany', params, 'POST');


// 12. 首页-查舆情详情 》添加分组
export const addGroupInfo = (params) => ajax(BASE_URL + '/huiqicha/mobile/attention/addGroupInfo', params, 'POST');

// 13. 首页-查关系 》热门搜索
export const getQueryRelationHotWordList = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/queryRelationHotWordList', params, 'POST');


// 14. 首页-查关系
export const getQueryRelationshipPage = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/queryRelationshipPage', params, 'POST');

// 16. 首页-监控
export const getQueryAttentionInfoList = (params) => ajax(BASE_URL + '/huiqicha/mobile/monitor/queryAttentionInfoList', params, 'POST');

// 17. 查商机
export const getQueryOpportyPage = (params) => ajax(BASE_URL + '/huiqicha/mobile/opporty/queryOpportyPage', params, 'POST');

//18.查业务---资产业务
export const getAssetBusiness = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/asset/getAssetBusiness?uniscid=${uniscid}` , 'GET');

//19.查业务详情
export const getBaseInfo = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/info/queryBaseInfo?uniscid=${uniscid}` , 'GET');

//20.查业务-贷款明细
export const getLoanList = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/loan/getLoanList?uniscid=${uniscid}` , 'GET');

//21.查业务-负债业务
export const getDebtBusiness = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/debt/getDebtBusiness?uniscid=${uniscid}` , 'GET');


//22.查业务-中间业务
export const getMiddleBusiness = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/middle/getMiddleBusiness?uniscid=${uniscid}` , 'GET');

//23.查信用-详情
export const getCreditFeature = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/credit/getCreditFeature?uniscid=${uniscid}` , 'GET');

//24.查信用-详情-交易明细
export const getBorrowList = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/borrow/getBorrowList?uniscid=${uniscid}` , 'GET');

//25.查信用-详情-对外担保
export const getGuaranteeInfo = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/guarinfo/getGuaranteeInfo?uniscid=${uniscid}` , 'GET');

//26.查信用-详情-对外担保-明细
export const getGuaranteeList = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/guardetail/getGuarDetailList?uniscid=${uniscid}` , 'GET');

//27.抵押
export const getMortgageList = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/assure/mortgage/getMortgageList?uniscid=${uniscid}` , 'GET');

//27.保证
export const queryGuaranteeList = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/guarantee/getGuaranteeList?uniscid=${uniscid}` , 'GET');

//27.质押
export const getImpawnList = (uniscid) => ajax(BASE_URL + `/huiqicha/mobile/assure/impawn/getImpawnList?uniscid=${uniscid}` , 'GET');

//27.获取园区
export const getParkList = (params) => ajax(BASE_URL + '/huiqicha/mobile/park/getParkList', params, 'POST');
//28.查关系详情
export const getRelationshipDetail = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/getRelationshipDetail', params, 'POST');

//28.查关系详情--人员
export const getStockRelation = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/getStockRelation', params, 'POST');

//28.查关系详情--企业
export const getStockInvest = (params) => ajax(BASE_URL + '/huiqicha/mobile/customer/investigation/getStockInvest', params, 'POST');

//28.问题反馈新增
export const feedbackAdd = (params) => ajax(BASE_URL + '/huiqicha/system/feedback/add', params, 'POST');
//28.问题反馈列表
export const feedbackList = (params) => ajax(BASE_URL + '/huiqicha/system/feedback/list', params, 'POST');

// 获取token
export const getToken = (params) => ajax(BASE_URL + `/api/mobile/qy/weixin/userinfo?code=${params.code}&orgId=${params.orgId}`, {}, 'GET');
export const getTokenPc = (params) => ajax(BASE_URL + `/api/mobile/qy/weixin/getLoginUser?userName=${params.userName}`, {}, 'GET');

// 查询用户信息
export const getUserInfo = () => ajax(BASE_URL + `/getInfo`, {}, 'GET');

// 获取企微配置
export const getQiWeiConfig = (params) => ajax(BASE_URL + `/api/mobile/qy/weixin/ticket?qyUrl=${params.qyUrl}&orgId=${params.orgId}`,{}, 'GET');

// 获取白名单
export const getWhiteIp = (params) => ajax(BASE_URL + `/api/mobile/qy/weixin/getIp?orgId=${params.orgId}`, {}, 'GET');

// 查询我的工作清单
export const workRecordList = (params) => ajax(BASE_URL + `/work/record/list?frequencyType=${params.frequencyType}&postId=${params.postId}&status=${params.status}&validTime=${params.validTime}&workType=${params.workType}&pageNum=${params.pageNum}&pageSize=${params.pageSize}`, {}, 'GET');
// 查询工作清单完成情况
export const workRecordCompleteStatus = (params) => ajax(BASE_URL + `/work/record/complete/status?frequencyType=${params.frequencyType}&postId=${params.postId}&status=${params.status}&validTime=${params.validTime}&workType=${params.workType}&pageNum=${params.pageNum}&pageSize=${params.pageSize}`, {}, 'GET');
// 岗位下拉接口
export const systemUserOptionselect = (params) => ajax(BASE_URL + `/system/user/optionselect`, {}, 'GET');
// 工作类型下拉接口
export const systemUserType = (params) => ajax(BASE_URL + `/system/user/type/${params.distType}`, {}, 'GET');
//批量更新工作清单
export const workRecordSubmit = (params) => ajax(BASE_URL + '/work/record/submit', params, 'POST');
// 查询预警类型接口
export const workWarningListType = (params) => ajax(BASE_URL + `/work/record/alter/types`, {}, 'GET');
// 查询预警工作清单
export const workWarningList = (params) => ajax(BASE_URL + `/work/record/alter/list?alterType=${params.alterType}&status=${params.status}&pageNum=${params.pageNum}&pageSize=${params.pageSize}`, {}, 'GET');
//更新预警工作清单
export const warningworkRecordSubmit = (params) => ajax(BASE_URL + '/work/record/alter/edit', params, 'POST');

// 预警任务已读
export const recordRead = (params) => ajax(BASE_URL + `/work/record/read?id=${params.id}`, {}, 'POST');
