import request from "../utils/request";
import qs from "qs";
let setqs = function (data) {
	return qs.stringify(data);
};
// 获取职位列表
export function JobListApi(data) {
	return request({
		url: "/yishoudan/store/job/list",
		method: "post",
		// data: setqs(data),
		// headers: { "Content-Type": "application/x-www-form-urlencoded" },
		data: setqs(data),
	});
}
// 获取职位详情
export function getJobDetailApi(data) {
	return request({
		url: `/yishoudan/store/job/getStoreJobDetailById?storeJobId=${data}`,
		method: "get",
	});
}
// 获取职位特色
export function getJobSpecialApi() {
	return request({
		url: `/yishoudan/labels/getListByTypeAndIndustry?type=90&industry=2`,
		method: "get",
	});
}
// 获取省份
export function getProvinceApi() {
	return request({
		url: `/yishoudan/city/getCityTree`,
		method: "get",
	});
}
// 获取市县
export function getCityApi(id) {
	return request({
		url: `/yishoudan/city/getCityByPid?pid=${id}`,
		method: "get",
	});
}
// 录单报名
export function recordBillApi(data) {
	return request({
		url: "/yishoudan/user/apply/order/addByAgency",
		method: "post",
		data:data,
		headers: { "Content-Type": "application/x-www-form-urlencoded" },
	});
}
// 报名上传识别身份证信息
export function getIdCardInfoApi(data) {
	return request({
		url: "/yishoudan/commons/idCardOcrRecognize",
		method: "post",
		data:setqs(data),
		headers: { "Content-Type": "multipart/form-data" },
	});
}
// 获取渠道经理对应代理id
export function getProxyInfoApi(data) {
	return request({
		url: `/yishoudan/agency/getByPmdUserId?pmdUserId=${data}`,
	});
}
// 根据关键字获取企业的列表
export function getStoreAliasApi(data) {
	return request({
		url: `/yishoudan/store/getAllStoreAliasName?keys=${data}`,
	});
}
// 根据关键字获取企业的列表
export function getStoreJobApi(data) {
	return request({
		url: `/yishoudan/store/job/getJobNameByStoreId?storeId=${data}`,
	});
}
// 根据岗位id获取政策
export function getPolicyByJobIdApi(data) {
	return request({
		url: `/yishoudan/store/job/getPolicyByStoreJobId?storeJobId=${data}`,
	});
}
// 获取热门职位城市
export function getHotCityApi() {
	return request({
		url: `/yishoudan/city/getHotCity`,
	});
}

// 获取热门职位城市
export function getCityWhichHasJobApi() {
	return request({
		url: `/yishoudan/city/getCityHasOnlineJob`,
	});
}
// 获取热门企业
export function getHotStoreApi() {
	return request({
		url: `/yishoudan/store/getHotStore`,
	});
}
