volunteer-secondary/src/service/requestApi.ts

288 lines
7.2 KiB
TypeScript

import request from '@/http/vue-query';
import { CustomRequestOptions } from '@/http/types';
import * as API from './types';
export const getAbilityDimension = () => { }
export const getMBTIDimension = () => { }
export const getHollandDimensionInfo = (options: any) => {
return request<API.Response>("/api/busScale/GetHollandDimension", { method: "GET", ...options })
}
export const getOpinionAbout = () => { }
export const getCustomScaleExplains = () => { }
export const getTagMapPro = () => { }
export const sysDictType = () => { }
export const getTagMapPerson = () => { }
export const getMyBusReports = (options: any) => {
return request<API.Response>('/api/busScale/GetBusCustomReports/v2', { method: "GET", ...options });
}
export const getSessionKey = (options: any) => {
return request<API.Response>('/api/sysWxOpen/wxOpenId', { method: "GET", ...options });
}
export const setWxInfo = ({
options,
}: {
options?: {query:{code:string, openId:string}};
}) => {
return request<API.Response>('/api/sysWxOpen/wxPhone', {
method: 'GET',
...(options || {}),
});
}
export const getWxUserInfo = () => {
return request<API.Response>('/api/weChatUserEx/UserInfo/v2', {
method: 'GET',
...({}),
});
}
export const getEvaluationList = (options: { query: { menuid: string } }) => {
return request<API.Response>('/api/busScale/list', {
method: 'GET',
...options,
})
}
export const getAssessmentQuestions = (options: { query: { ScaleId: number } }) => {
return request<API.Response>('/api/busScale/getscalequestions', {
method: 'GET',
...options,
})
}
export const getBusScaleDescription = (options: { query: { ScaleId: number } }) => {
return request<API.Response>('/api/busScale/GetBusScaleDescription', {
method: 'GET',
...options,
})
}
export const saveBusScaleAnswer = (options: {
data: {
customId: number
scaleId: number
inputs: { type: string; name: string; value: string }[]
}
}) => {
return request<API.Response>('/api/busScale/CustomBusScale/v2', {
method: "POST",
...options
})
}
export const getAssistant = () => {
return request<API.Response>('/api/weChatUserEx/areaExtend', {
method: 'GET',
...({}),
});
}
export const getGradeList = () => {
return request<API.Response>('/api/zhiYuan/getgradelist', {
method: 'GET',
...({}),
});
}
export const getAreaList = () => {
return request<API.Response>('/api/zhiYuan/areaList', {
method: 'GET',
...({}),
});
}
export const getTopNew = (options: { query: { Top: number, CategoryId?: number } }) => {
return request<API.Response>('/api/ZyNews/top', {
method: 'GET',
...options,
});
}
export const getNewsCategory = () => {
return request<API.Response>('/api/ZyNews/newsCategory', {
method: 'GET',
...({}),
});
}
export const getNewsPage = (options: { query: any }) => {
return request<API.Response>('/api/ZyNews/newsPage', {
method: 'GET',
...options,
});
}
export const getNewsDetail = (options: { query: any }) => {
return request<API.Response>('/api/ZyNews/detail', {
method: 'GET',
...options,
});
}
export const saveUserInfo = (options: { data: any }) => {
return request<API.Response>('/api/weChatUserEx/PerfectInfo/v2', {
method: "POST",
...options
})
}
export const getSchoolHistoricalScores = (options: { query: any }) => {
return request<API.Response>('/api/busSchoolAdmission/schoolHistoricalScores', {
method: 'GET',
...options,
});
}
export const getSchoolNature = () => {
return request<API.Response>('/api/zhiYuan/naturelist', {
method: 'GET',
});
}
export const getHightSchool = (options: { data: any }) => {
return request<API.Response>('/api/busHighSchoolInfo/dropList', {
method: "POST",
...options
})
}
export const logout = () => {
return request<API.Response>('/api/weChatUserEx/accountCancel', {
method: "POST",
})
}
export const getSchoolTypeList = () => {
return request<API.Response>('/api/zhiYuan/schoolTypelist', {
method: 'GET',
});
}
export const getBusHightSchoolList = (options: { data: any }) => {
return request<API.Response>('/api/busHighSchoolInfo/pageList', {
method: "POST",
...options
})
}
export const getSchoolInfo = (options: { query: any }) => {
return request<API.Response>('/api/busHighSchoolInfo/detailv2', {
method: 'GET',
...options
});
}
export const getSchoolQuotaScores = (options: { query: any }) => {
return request<API.Response>('/api/busSchoolAdmission/schoolQuotaScores', {
method: 'GET',
...options
});
}
export const starCollection = (options: { data: any }) => {
return request<API.Response>('/api/unCollection/toggleCollect', {
method: "POST",
...options
})
}
export const getSchoolCollection = () => {
return request<API.Response>('/api/unCollection/list', {
method: 'GET',
});
}
export const getStudentTalentedDetail = (options: { query: any }) => {
return request<API.Response>('/api/busSpecialtyStudent/detailV2', {
method: 'GET',
...options
});
}
export const getTalentAreaList = (options: { query: any }) => {
return request<API.Response>('/api/busSpecialtyStudent/areaList', {
method: 'GET',
...options
});
}
export const saveSpecialtyInfo = (options: { data: any }) => {
return request<API.Response>('/api/busSpecialtyStudent/add', {
method: "POST",
...options
})
}
export const getMyScore = () => {
return request<API.Response>('/api/busMiddleSchoolApply/detailV2', {
method: 'GET',
});
}
export const saveMyScore = (options: { data: any }) => {
return request<API.Response>('/api/busMiddleSchoolApply/add', {
method: "POST",
...options
})
}
export const getBusSchoolAdmission = (options: { data: any }) => {
return request<API.Response>('/api/busSchoolAdmission/goFill', {
method: "POST",
...options
})
}
export const saveWishlist = (options: { data: any }) => {
return request<API.Response>('/api/busStudentMiddleFill/add', {
method: "POST",
...options
})
}
export const getWishlist = () => {
return request<API.Response>('/api/busStudentMiddleFill/list', {
method: 'GET',
});
}
export const deleteWishlist = (options: { data: any }) => {
return request<API.Response>('/api/busStudentMiddleFill/delete', {
method: "POST",
...options
})
}
export const getCountdown = () => {
return request<API.Response>('/api/zhiYuan/countdown', {
method: 'GET',
});
}
export const getTimeList = () => {
return request<API.Response>('/api/busMiddleExamTimeSpan/list', {
method: 'GET',
});
}
export const getFirstPageInfo = () => {
return request<API.Response>('/api/busStudentMiddleFill/firstPageFillCount', {
method: 'GET',
});
}
export const getHistoryYearList = () => {
return request<API.Response>('/api/busSchoolAdmission/historicalYears', {
method: 'GET',
});
}