三期pk功能开发以及积分两个页
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
import request from '@/api/request'
|
||||
|
||||
const module_url = '/traexam'
|
||||
|
||||
// 查询竞赛列表
|
||||
export const queryTraCompetitionInfoPaging = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/queryTraCompetitionInfoPaging',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 查询试卷
|
||||
export const queryTestPapers = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/queryTestPapers',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 查询PK人员+试题
|
||||
export const queryTraCompetitionInfoByPkUser = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/queryTraCompetitionInfoByPkUser',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 循环获取简答题结果
|
||||
export const queryCompetitionPracticeAnswerResult = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/queryCompetitionPracticeAnswerResult',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 答题结束
|
||||
export const competitionAnswerEnd = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/competitionAnswerEnd',
|
||||
method: 'post',
|
||||
data,
|
||||
suppressErrors: true // 屏蔽报错信息
|
||||
});
|
||||
};
|
||||
|
||||
// 竞赛答题
|
||||
export const competitionAnswer = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/competitionAnswer',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 查询答题结果
|
||||
export const queryCompetitionAnswerResult = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/queryCompetitionAnswerResult',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 竞赛排行榜
|
||||
export const queryTraCompetitionRankingList = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/queryTraCompetitionRankingList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 全行的机构数据
|
||||
export const queryOrgTree = (data) => {
|
||||
return request({
|
||||
url: module_url + '/traCompetitionInfo/queryOrgTree',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,111 @@
|
||||
import request from '@/api/request'
|
||||
const base_url = '/traapp'
|
||||
|
||||
/**
|
||||
* 查询签到
|
||||
* userId 学员ID String
|
||||
* checkInToday 今日是否签到 String
|
||||
* days 连续签到天数 int
|
||||
*/
|
||||
export const queryCheckIn = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traPointsInfo/queryCheckIn',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击签到
|
||||
*/
|
||||
export const addPointsByCheckIn = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traPointsInfo/addPointsByCheckIn',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 每次完成任务获得弹窗奖励
|
||||
* 入参:
|
||||
taskId 必输项:true 类型:String
|
||||
type 必输项:true 类型:String
|
||||
出参:
|
||||
userId 学员ID String
|
||||
badgeName 徽章名称 String
|
||||
badgeImg 徽章图片 String
|
||||
num 次数 int
|
||||
name 描述 String
|
||||
pointsBadgeName 积分徽章名称 String
|
||||
pointsBadgeImg 徽章图片 String
|
||||
currentPoints 当前积分 int
|
||||
changePoints 本次获得积分 int
|
||||
*/
|
||||
export const addPointsByTask = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traPointsInfo/addPointsByTask',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询积分明细
|
||||
* 出参:
|
||||
detailId 明细ID String
|
||||
userId 学员ID String
|
||||
mattr 积分来源事项 String
|
||||
mattrDesc 积分来源描述 String
|
||||
changeValue 积分变化值 String
|
||||
currentPoints 当前积分 int
|
||||
countPoints 累计积分 int
|
||||
ctTime 创建时间 String
|
||||
*/
|
||||
export const queryPointsDetail = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traPointsInfo/queryPointsDetail',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 查询段位明细
|
||||
* 出参:
|
||||
rankId 段位ID String
|
||||
rankName 段位名称 String
|
||||
currentRankName 当前段位名称 String
|
||||
ossAddr 段位图片 String
|
||||
pointsStart 段位开始区间 int
|
||||
pointsEnd 段位结束区间 int
|
||||
countPoints 累计积分 int
|
||||
*/
|
||||
export const queryRankDetail = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traPointsInfo/queryRankDetail',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 查询当前状态
|
||||
* 出参:
|
||||
userId 学员ID String
|
||||
orgId 机构ID String
|
||||
countPoints 累计积分 int
|
||||
currentPoints 当前积分 int
|
||||
currentRankName 当前段位 String
|
||||
badgeNum 徽章数 int
|
||||
*/
|
||||
export const queryCurrentStatus = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traPointsInfo/queryCurrentStatus',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
+20
-2
@@ -4,9 +4,27 @@ import {
|
||||
import common from '@/common/common.js'
|
||||
|
||||
const ENV = import.meta.env
|
||||
// function getBrowserInfo() {
|
||||
// const userAgent = navigator.userAgent;
|
||||
// let browserName = '未知浏览器';
|
||||
// let version = '未知版本';
|
||||
|
||||
// // 检测 Chrome
|
||||
// if (userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Edg') === -1) {
|
||||
// browserName = 'Chrome';
|
||||
// version = userAgent.match(/Chrome\/(\d+\.\d+)/)[1];
|
||||
// }
|
||||
|
||||
// return {
|
||||
// browser: browserName,
|
||||
// version: version,
|
||||
// userAgent: userAgent
|
||||
// };
|
||||
// }
|
||||
|
||||
|
||||
export const get_base_url = (url = '') => {
|
||||
if (ENV.MODE === 'development') { // 开发环境
|
||||
if (['development', 'development.rd', 'development.yh', 'development.ty'].includes(ENV.MODE)) { // 开发环境
|
||||
// #ifdef H5
|
||||
if (url) {
|
||||
let _str = (url.split('/')[0] || url.split('/')[1])?.toUpperCase()
|
||||
@@ -20,7 +38,7 @@ export const get_base_url = (url = '') => {
|
||||
return ENV.VITE_APP_BASE_API_Url
|
||||
// #endif
|
||||
} else { // 其他环境,包括生产环境,sit环境,uat环境
|
||||
|
||||
|
||||
return ENV.VITE_APP_BASE_API_Url
|
||||
// return ENV.VITE_APP_BASE_API_Url
|
||||
|
||||
|
||||
+19
-1
@@ -36,4 +36,22 @@ export const updateDfSysUserExtandInfoGender = (data) => {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 设置匿名 是Y 否N
|
||||
export const updateTraUserAnony = (data) => {
|
||||
return request({
|
||||
url: '/traapp/traUserAnony/updateTraUserAnony',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 查询是否匿名 是Y 否N
|
||||
export const queryTraUserAnonyByUserId = (data) => {
|
||||
return request({
|
||||
url: '/traapp/traUserAnony/queryTraUserAnonyByUserId',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user