diff --git a/.env.development b/.env.development index 1f6443d3..03bb4069 100644 --- a/.env.development +++ b/.env.development @@ -2,32 +2,32 @@ ENV = 'development' # 'development' -#VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' -# VITE_APP_BASE_API_Url = ' http://25.18.122.66:9786' -#sit +# VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' +# VITE_APP_BASE_API_Url = 'http://192.168.247.200' +# VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001' +# VITE_APP_BASE_API_Url = 'http://192.168.108.129' +# dev +#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' +# sit # VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786' # UAT # VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786' # DEV - # app入口 -# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' + # VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786' # VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786' # h5专用地址x2 -VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' +# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' - -# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601' +# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://192.168.247.200' # VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.32.154:9602' -VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604' +# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://192.168.247.200' # VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.32.154:9605' - - diff --git a/.env.development.rd b/.env.development.rd new file mode 100644 index 00000000..b22814ce --- /dev/null +++ b/.env.development.rd @@ -0,0 +1,7 @@ +# 任东专用开发环境 +ENV = 'development.rd' +# 'development.rd' + +VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' + +VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604' diff --git a/.env.development.ty b/.env.development.ty new file mode 100644 index 00000000..15d511f0 --- /dev/null +++ b/.env.development.ty @@ -0,0 +1,9 @@ +# 田岩开发环境 +ENV = 'development.ty' +# 'development.ty' + +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' + +VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://192.168.108.129' + + diff --git a/.env.development.yh b/.env.development.yh new file mode 100644 index 00000000..55b67b98 --- /dev/null +++ b/.env.development.yh @@ -0,0 +1,10 @@ +# 杨航开发环境 +ENV = 'development.yh' +# 'development.yh' + +VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' + +VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604' + + + diff --git a/logo/Thumbs.db b/logo/Thumbs.db new file mode 100644 index 00000000..4aac3f54 Binary files /dev/null and b/logo/Thumbs.db differ diff --git a/package.json b/package.json index cc24343e..71972694 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "description": "", "scripts": { "dev:h5": "uni", + "dev:rd": "uni -p h5 --mode development.rd", + "dev:yh": "uni -p h5 --mode development.yh", + "dev:ty": "uni -p h5 --mode development.ty", "dev:h5:sit": "uni -p h5 --mode sit", "dev:h5:uat": "uni -p h5 --mode uat", "dev:h5:production": "uni -p h5 --mode production", diff --git a/src/App.vue b/src/App.vue index b5f9ab78..141b9280 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,23 +9,7 @@ }); }, onShow: function () { - // 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 - // }; - // } }, onHide: function () { } diff --git a/src/api/competition.js b/src/api/competition.js new file mode 100644 index 00000000..131a92ab --- /dev/null +++ b/src/api/competition.js @@ -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 + }); +}; diff --git a/src/api/pointsAndRank.js b/src/api/pointsAndRank.js new file mode 100644 index 00000000..490b1b86 --- /dev/null +++ b/src/api/pointsAndRank.js @@ -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 + }); +}; \ No newline at end of file diff --git a/src/api/request.js b/src/api/request.js index 50e865f0..e9a30160 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -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 diff --git a/src/api/user.js b/src/api/user.js index 87aa7224..b4a180b1 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -36,4 +36,22 @@ export const updateDfSysUserExtandInfoGender = (data) => { data }); }; - \ No newline at end of file + +// 设置匿名 是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 + }); +}; + diff --git a/src/common/imgSvg.ts b/src/common/imgSvg.ts index 4dbf34f4..ea02103c 100644 --- a/src/common/imgSvg.ts +++ b/src/common/imgSvg.ts @@ -5,7 +5,7 @@ export const optionSuccessIcon = (color : string) : string => { return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; }; -export const optionErrorIcon = (color: string='#F5212D') : string => { +export const optionErrorIcon = (color : string = '#F5212D') : string => { const svgXml = ` `.trim(); @@ -19,7 +19,7 @@ export const examinationSheetIcon = () : string => { return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; }; -export const markIcon = (color: string='#ABABAB') : string => { +export const markIcon = (color : string = '#ABABAB') : string => { const svgXml = ` `.trim(); @@ -34,7 +34,7 @@ export const feedbackIcon = () : string => { }; // 通过考试 -export const passTheExamIcon = (color: string) : string => { +export const passTheExamIcon = (color : string) : string => { const svgXml = ` `.trim(); @@ -42,7 +42,7 @@ export const passTheExamIcon = (color: string) : string => { }; // 完成练习 -export const completeTheExercisesIcon = (color: string) : string => { +export const completeTheExercisesIcon = (color : string) : string => { const svgXml = ` `.trim(); @@ -50,7 +50,7 @@ export const completeTheExercisesIcon = (color: string) : string => { }; // 锁定 -export const lockIcon = (color: string) : string => { +export const lockIcon = (color : string) : string => { const svgXml = ` `.trim(); @@ -66,3 +66,53 @@ export const practiceExitIcon = () : string => { return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; }; + +// Pk页规则图标 +export const pkRules = () : string => { + const svgXml = ` + +`.trim(); + return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; +}; + +// Pk页排行榜图标 +export const pkRankingList = () : string => { + const svgXml = ` + +`.trim(); + return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; +}; + +// Pk页匿名关 +export const pkAnonymousClose = () : string => { + const svgXml = ` + +`.trim(); + return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; +}; + +// Pk页匿名开 +export const pkAnonymousOpen = () : string => { + const svgXml = ` + +`.trim(); + return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; +}; + + +// 重置页图标 +export const resetIcon = () : string => { + const svgXml = ` + +`.trim(); + return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; +}; + + +// pk页切换图标 +export const switchIcon = () : string => { + const svgXml = ` + +`.trim(); + return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`; +}; diff --git a/src/components/cached-avatar/cached-avatar.vue b/src/components/cached-avatar/cached-avatar.vue new file mode 100644 index 00000000..ff1a20b6 --- /dev/null +++ b/src/components/cached-avatar/cached-avatar.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/components/examination/subject.vue b/src/components/examination/subject.vue index c1f6ba23..0bfd18fe 100644 --- a/src/components/examination/subject.vue +++ b/src/components/examination/subject.vue @@ -2,10 +2,11 @@ {{ subject_type_text }} - {{ item.tgtGrade }}分 + {{ item.tgtGrade }}分 + - 展开 收起 -