41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
|
|
import api from './index';
|
||
|
|
|
||
|
|
// OPC认证接口
|
||
|
|
/**
|
||
|
|
* @author xujl
|
||
|
|
* Api说明: getCertifications 接口
|
||
|
|
*/
|
||
|
|
export const getCertifications = (params?: any) => api.get('/certifications/', { params });
|
||
|
|
/**
|
||
|
|
* @author xujl
|
||
|
|
* Api说明: getCertificationDetail 接口
|
||
|
|
*/
|
||
|
|
export const getCertificationDetail = (id: string) => api.get(`/certifications/${id}/`);
|
||
|
|
/**
|
||
|
|
* @author xujl
|
||
|
|
* Api说明: submitCertification 接口
|
||
|
|
*/
|
||
|
|
export const submitCertification = (data: { real_name: string; id_card?: string; skills?: string[]; experience?: string; resume_url?: string; attachments?: any[] }) => api.post('/certifications/', data);
|
||
|
|
/**
|
||
|
|
* @author xujl
|
||
|
|
* Api说明: updateCertification 接口
|
||
|
|
*/
|
||
|
|
export const updateCertification = (id: string, data: any) => api.put(`/certifications/${id}/`, data);
|
||
|
|
/**
|
||
|
|
* @author xujl
|
||
|
|
* Api说明: deleteCertification 接口
|
||
|
|
*/
|
||
|
|
export const deleteCertification = (id: string) => api.delete(`/certifications/${id}/`);
|
||
|
|
|
||
|
|
// 管理员审核操作
|
||
|
|
/**
|
||
|
|
* @author xujl
|
||
|
|
* Api说明: approveCertification 接口
|
||
|
|
*/
|
||
|
|
export const approveCertification = (id: string) => api.post(`/certifications/${id}/approve/`);
|
||
|
|
/**
|
||
|
|
* @author xujl
|
||
|
|
* Api说明: rejectCertification 接口
|
||
|
|
*/
|
||
|
|
export const rejectCertification = (id: string, reject_reason: string) => api.post(`/certifications/${id}/reject/`, { reject_reason });
|