|
|
|
import request from '@/utils/requset'
|
|
|
|
|
|
|
|
request.interceptors.response.use(response => {
|
|
|
|
// @ts-ignore
|
|
|
|
if (response.code >= 200 && response.code < 300) return response;
|
|
|
|
else return Promise.reject(response);
|
|
|
|
})
|
|
|
|
|
|
|
|
enum api {
|
|
|
|
liststu = '/abilityEvaluation/personalAbilityEvaluationCollect/liststu', // 个人能力评价列表
|
|
|
|
integral = '/annualScore/personalCompTotalScore/liststu', // 个人积分列表
|
|
|
|
PAGE_XSFXBG = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/xsfxbg', // 个人能力报告
|
|
|
|
competition = '/AnnualCompPoint/annualCompPoint/findcompp', // 比赛项目列表
|
|
|
|
competitionOne = '/AnnualCompPoint/annualCompPoint/findcomppxq', // 比赛项目单个
|
|
|
|
}
|
|
|
|
export const getlEvaluateApi = (params: Record<'pageNo' | 'pageSize', number>) => request.get(api.liststu, { params });
|
|
|
|
export const getlIntegralApi = (params: Record<'pageNo' | 'pageSize', number>) => request.get(api.integral, { params });
|
|
|
|
|
|
|
|
export const getXsfxbgApi = (params = {}) => {
|
|
|
|
const par = { recreateFlag: false, annualid: '' };
|
|
|
|
Object.assign(par, params);
|
|
|
|
return request.get(api.PAGE_XSFXBG, { params: par });
|
|
|
|
};
|
|
|
|
|
|
|
|
export const getCompetitionApi = (id: string) => request.get(api.competition, { params: { id } });
|
|
|
|
export const getCompetitionOneApi = (id: string) => request.get(api.competitionOne, { params: { id } });
|