import {
    request
} from '@/untils/AxiosUtils.js';
import website from "../config/website.js"
import store from '@/store/';
// 设置民族政治面貌  jobslink-api/user/user/setInfo
export const setInfo = (params) => request({
    url: "/api/jobslink-api/user/user/setInfo",
    method: 'post',
    data: params
});

// 获取用户工会状态  /jobslink-api/doc/user/labourUnion/info
export const labourUnionInfo = () => request({
    url: "/api/jobslink-api/doc/user/labourUnion/info",
    method: 'get'
});

// 申请入会
export const contract = (params) => request({
    url: "/api/jobslink-api/doc/user/labourUnion/apply",
    method: 'post',
    data: params
});

//会员信息--判断用户是否加入工会
export const labourUnionDetail = (no) => request({
    url: "/api/jobslink-api/doc/jkLabourUnionAppl/list",
    method: 'get',
    params: {
        no
    }
});
//提交会员申请
export const saveApplication = (labourunionId, applType, applComment) => {
    applComment = applComment.substring(0, 200)
    return request({
        url: "/api/jobslink-api/doc/jkLabourUnionDetail/save",
        method: 'post',
        data: {
            labourunionId,
            applType,
            applComment
        }
    });
}

//查询提交的申请内容
export const applicationInfo = (no) => request({
    url: "/api/jobslink-api/doc/jkLabourUnionDetail/list",
    method: 'get',
    params: {
        no
    }
});