123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- /**
- * 授权 API
- */
- import {
- http
- } from '../request/main.js'
- /**
- * 开始答题
- *
- * @returns {Promise}
- */
- export function startChallenge() {
- return http.post('/examine/startChallenge')}
- /**
- * 获取新题
- *
- * @returns {Promise}
- */
- export function getNew(session_id) {
- return http.post('/examine/getNew', {
- session_id
- })}
- /**
- * 提交答案
- *
- * @returns {Promise}
- */
- export function submitAnswer(id, answer) {
- return http.post('/examine/submitAnswer', {
- id,
- answer
- })
- }
- /**
- * 获取考核结果
- *
- * @returns {Promise}
- */
- export function getSummary(session_id) {
- return http.post('/examine/getSummary', {
- session_id
- })
- }
- /**
- * 获取考核历史
- *
- * @returns {Promise}
- */
- export function getHistory(session_id, page, page_size) {
- return http.post('/examine/getHistory', {
- session_id,
- page,
- page_size
- })
- }
- /**
- * 获取答题结果
- *
- * @returns {Promise}
- */
- export function getResult(id) {
- return http.post('/examine/getResult', {
- id
- })
- }
- /**
- * 获取排行数据
- *
- * @returns {Promise}
- */
- export function getTopList(group, page, page_size) {
- return http.post('/examine/getTopList', {
- group,
- page,
- page_size
- })
- }
- /**
- * 获取我的排行
- *
- * @returns {Promise}
- */
- export function getMineTop(group) {
- return http.post('/examine/getMineTop', {
- group
- })
- }
- /**
- * 获取全部排行和个人排行
- * 比赛专用
- *
- * @returns {Promise}
- */
- export function getRankingList() {
- return http.post('/examine/getRankingList', {
- })
- }
|