import {
    request
} from "@/untils/AxiosUtils.js";
/*我的简历-查看*/
export const myResume = () => {
    return request({
        url: "/api/jobslink-api/user/user/resume/find",
        method: "get",
    });
};

/*我的简历-查看-我的技能工种*/
export const mySkills = () => {
    return request({
        url: "/api/jobslink-api/user/user/skills/find",
        method: "get",
    });
};

/*我的简历-删除-我的技能工种*/
export const removeSkills = (id) => {
    return request({
        url: "/api/jobslink-api/user/user/skills/remove",
        method: "post",
        params: {
            id,
        },
    });
};

/*我的简历-设置我想工作的地点*/
export const setCity = (id, cityId) => {
    return request({
        url: "/api/jobslink-api/user/user/resume/update",
        method: "post",
        data: {
            id,
            workplace: cityId,
        },
    });
};

/*我的简历-设置我想学习的技能*/
export const setLearn = (id, learnSkill) => {
    return request({
        url: "/api/jobslink-api/user/user/resume/update",
        method: "post",
        data: {
            id,
            learnSkill,
        },
    });
};

/*保存我的简历信息*/
export const setResume = ({
    id,
    education,
    wage,
    workplace,
    telephone,
	wageUpper,
    workExperience
}) => {
    return request({
        url: "/api/jobslink-api/user/user/resume/update",
        method: "post",
        data: {
            id,
            education,
            wage,
            workplace,
            telephone,
            workExperience,
			wageUpper,
        },
    });
};

/*行业库*/
export const getTrade = () => {
    return request({
        url: "/api/jobslink-api/tenant/base/config/trade",
        method: "get",
    });
};

/*工种库*/
export const getWorktypes = (id) => {
    return request({
        url: "/api/jobslink-api/tenant/base/config/worktypes",
        method: "get",
        params: {
            id,
        },
    });
};

/*技能库*/
export const getSkills = (id) => {
    return request({
        url: "/api/jobslink-api/tenant/base/config/skills",
        method: "get",
        params: {
            id,
        },
    });
};

/*新增职业技能*****/
export const addSkills = (trade, worktypes, skills, type) => {
    return request({
        url: "/api/jobslink-api/user/user/skills/save",
        method: "post",
        data: {
            trade,
            worktypes,
            skills,
            type,
        },
    });
};
/*工种/岗位列表*****/
export const getWorktypesList = (type) => {
    console.log(type, "=================");
    return request({
        url: "/api/jobslink-api/tenant/worktypes/base/list",
        method: "get",
        params: {
            type,
        },
    });
};