diff --git a/api/eduApp/index.js b/api/eduApp/index.js index 2bd41db..a1daf44 100644 --- a/api/eduApp/index.js +++ b/api/eduApp/index.js @@ -1,10 +1,83 @@ -import request from "@/utils/request"; +import request from '@/utils/request' // 我的消息 export function getNoticeAnnoByUserId(data) { - return request({ - 'url': '/app/index/getNoticeAnnoByUserId', - 'method': 'post', - 'data': data - }) + return request({ + url: '/app/index/getNoticeAnnoByUserId', + method: 'post', + data: data + }) +} + +// 考试-列表 /personalCenter/getStudentExamList +export function getStudentExamList(params) { + return request({ + url: '/personalCenter/getStudentExamList', + method: 'post', + data: params + }) +} + +// 考试-题目 /studentExam/getExamQuestionList +export function getExamQuestionList(params) { + return request({ + url: '/studentExam/getExamQuestionList', + method: 'post', + data: params + }) +} + +// 考试-做题 /studentExam/insertQuestionAnswerById +export function insertQuestionAnswerById(params) { + return request({ + url: '/studentExam/insertQuestionAnswerById', + method: 'post', + data: params + }) +} + +// 考试-交卷+结果 /studentExam/commitExamByRecordId +export function commitExamByRecordId(params) { + return request({ + url: '/studentExam/commitExamByRecordId', + method: 'post', + data: params + }) +} + +// 考试-查询结果列表 /studentExam/getExamRecordById +export function getExamRecordById(params) { + return request({ + url: '/studentExam/getExamRecordById', + method: 'get', + data: params + }) +} + +// 考试-结果详情 studentExam/getExamRecordAnswer +export function getExamRecordAnswer(params) { + return request({ + url: '/studentExam/getExamRecordAnswer', + method: 'post', + data: params + }) +} + +// 考试-排名 studentExam/getExamRankById +export function getExamRankById(params) { + return request({ + url: '/studentExam/getExamRankById', + method: 'post', + data: params + }) +} + + +// 练习-列表 /personalCenter/getStudentPracticeList +export function getStudentPracticeList(params) { + return request({ + url: '/personalCenter/getStudentPracticeList', + method: 'post', + data: params + }) } diff --git a/config.js b/config.js index 2844361..aa253f8 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,11 @@ // 应用全局配置 module.exports = { // baseUrl:'/prod-api', - baseUrl:'http://112.29.103.165:1616/ynuw', + // baseUrl:'http://112.29.103.165:1616/ynuw', + baseUrl:'http://192.168.0.32:2900/exam-student', + // 上传文件地址 + uploadUrl: 'http://192.168.0.137:2909/exam-file/file/uploadBase64', + bmwUrl: 'http://192.168.0.137:2911/exam-bmw', // 应用信息 appInfo: { // 应用名称 diff --git a/pages.json b/pages.json index 9971d16..ff2c78d 100644 --- a/pages.json +++ b/pages.json @@ -154,7 +154,10 @@ "path" : "pages/YNEduApp/exam/examination", "style" : { - "navigationStyle" : "custom" + "navigationStyle" : "custom", + "app-plus": { + "popGesture": "none" + } } }, { diff --git a/pages/YNEduApp/exam/beforeExam.vue b/pages/YNEduApp/exam/beforeExam.vue index a340c65..e9c360f 100644 --- a/pages/YNEduApp/exam/beforeExam.vue +++ b/pages/YNEduApp/exam/beforeExam.vue @@ -49,26 +49,46 @@ export default { return { showModal: false, // 标题 - title: '2023年送配电线路架设工模拟考试', + title: '', // 副标题 - subtitle: '不限期', + subtitle: '', // 考试时长 - duration: '120', + duration: '', // 考试次数 count: '不限次', // 切屏次数 - switchCount: '不限次', - content: '是否确认进入考试?' + switchCount: '', + content: '是否确认进入考试?', + examId: '', + examNum: 0, // 考试次数 + examCount: 1, // 1: 不限次 2: 及格终止 3: 自定义 + examCustom: 0, // 自定义次数 } }, + onLoad(opt) { + opt = JSON.parse(opt.params) + console.log('🚀 ~ onLoad ~ opt:', opt) + this.examId = opt.id + this.title = opt.name + this.subtitle = opt.validityDate + this.duration = opt.responseTime + this.switchCount = opt.cutNum.includes('null') || opt.cutNum.includes('undefined') ? '不限次' : opt.cutNum + }, methods: { openModal() { this.showModal = true }, // 进入考试 handleEnterExam() { + const params = { + examId: this.examId, // 考试id + switchCount: this.switchCount, // 切屏次数 + examNum: this.examNum, + examCount: this.examCount, + examCustom: this.examCustom + } uni.navigateTo({ - url: '/pages/YNEduApp/exam/examination' + url: `/pages/YNEduApp/exam/examination?params=${JSON.stringify(params)}` }) } } diff --git a/pages/YNEduApp/exam/exam.vue b/pages/YNEduApp/exam/exam.vue index c966151..96d17bc 100644 --- a/pages/YNEduApp/exam/exam.vue +++ b/pages/YNEduApp/exam/exam.vue @@ -11,22 +11,26 @@