import apiInstance from "./index";

// 选择叶酸发放单位
export const getProvideUnit = unitName => {
    return apiInstance.get(`/v1/folacin-resident-app/resident/unit/${unitName}`);
};

export const getProvideUnitById = unitId => {
    return apiInstance.get(`/v1/folacin-resident-app/resident/unit-id/${unitId}`);
};
// 叶酸领取申请
export const addReceiveApply = params => {
    return apiInstance.post('/v1/folacin-resident-app/resident/apply', params);
};
// 申请记录
export const getApplyRecord = residentId => {
    return apiInstance.get(`/v1/folacin-resident-app/resident/apply-record/${residentId}`);
};
// 发放详情
export const getProvideDetail = id => {
    return apiInstance.get(`/v1/folacin-resident-app/resident/apply-details/${id}`);
};
// 签名图片上传
export const uploadEsignPng = file => {
    return apiInstance.post('/v1/folacin-resident-app/resident/upload-image', file);
};
// 获取知情同意书内容
export const getInformedConsentForm = unitId => {
    return apiInstance.get(`/v1/folacin-resident-app/resident/consent/${unitId}`);
};
// 查询最近的一次申请记录信息
export const getUserInfoLast = residentId => {
    return apiInstance.get(`/v1/folacin-resident-app/resident/last-record/${residentId}`);
};
// 查询最近的一次申请记录信息
export const getChildAreaByParentCode = areaCode => {
    return apiInstance.get(`/v1/folacin-resident-app/resident/area-child/${areaCode}`);
};
