diff --git a/manifest.json b/manifest.json index 9f867ab..3d8fa6b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,6 +6,9 @@ "versionCode" : 104, "transformPx" : false, "app-plus" : { + "compatible" : { + "ignoreVersion" : true + }, "popGesture" : "none", "useragent" : { "value" : "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/20) uni-app", @@ -24,7 +27,9 @@ }, "modules" : { "Camera" : {}, - "VideoPlayer" : {} + "VideoPlayer" : {}, + "Barcode" : {}, + "FaceID" : {} }, "distribute" : { "android" : { diff --git a/pages/YNEduApp/exam/beforeExam.vue b/pages/YNEduApp/exam/beforeExam.vue index 339a9a0..811a783 100644 --- a/pages/YNEduApp/exam/beforeExam.vue +++ b/pages/YNEduApp/exam/beforeExam.vue @@ -16,7 +16,7 @@
-
{{ switchCount }}
+
{{ '不允许切屏' }}
切屏次数
diff --git a/pages/YNEduApp/exam/exam.vue b/pages/YNEduApp/exam/exam.vue index cdc7022..d8d234a 100644 --- a/pages/YNEduApp/exam/exam.vue +++ b/pages/YNEduApp/exam/exam.vue @@ -114,6 +114,13 @@ export default { // 开始考试 handleExamination(item) { console.log('🚀 ~ handleExamination ~ item:', item) + if (item.examEquipment == 2) { + uni.showToast({ + title: '请在电脑端进行考试', + icon: 'none' + }) + return + } // examCount 1: 不限次 2: 及格终止 3: 自定义 if (item.examCount == 2 && item.results == 1) { uni.showToast({ diff --git a/pages/YNEduApp/exam/examination.vue b/pages/YNEduApp/exam/examination.vue index befbd21..3d27532 100644 --- a/pages/YNEduApp/exam/examination.vue +++ b/pages/YNEduApp/exam/examination.vue @@ -175,20 +175,21 @@ export default { this.score = opt.score this.passScore = opt.passScore }, - onShow() { - setTimeout(() => { - if (this.screenCount > this.switchCount) { - this.$refs.uToast.show({ - message: '切屏次数已达上限, 系统将自动提交', - duration: 1000 - }) - this.handleConfirmSubmit() - } - }, 1000) - }, + // onShow() { + // setTimeout(() => { + // if (this.screenCount > this.switchCount) { + // this.$refs.uToast.show({ + // message: '切屏次数已达上限, 系统将自动提交', + // duration: 1000 + // }) + // this.handleConfirmSubmit() + // } + // }, 1000) + // }, onHide() { - this.screenCount++ - console.log('🚀 ~ onHide ~ this.screenCount:', this.screenCount) + // this.screenCount++ + // console.log('🚀 ~ onHide ~ this.screenCount:', this.screenCount) + this.handleConfirmSubmit() }, mounted() { this.getList() @@ -197,9 +198,10 @@ export default { this.random2 = Math.floor(Math.random() * 100000) + 900000 // random2 在 15-19分钟之间 console.log('🚀 ~ mounted ~ this.random1:', this.random1, this.random2) }, - onUnload() { - this.handleConfirmSubmit() - }, + // onUnload() { + // console.log('🚀 ~ onUnload ~ 页面关闭') + // this.handleConfirmSubmit() + // }, methods: { // 获取列表 async getList() { diff --git a/pages/YNEduApp/exam/examinationDetails.vue b/pages/YNEduApp/exam/examinationDetails.vue index db8f121..84dba6b 100644 --- a/pages/YNEduApp/exam/examinationDetails.vue +++ b/pages/YNEduApp/exam/examinationDetails.vue @@ -132,26 +132,34 @@ export default { // }, // 重新考试 handleResetExamination() { - if (this.examNum > 10) { - uni.showToast({ - title: '已达到最大考试次数', - icon: 'none' - }) - return + let from = '' + if (this.studyId) { + from = '/pages/YNEduApp/learnProj/learnProjDetail?id=' + this.studyId + } else { + from = '/pages/YNEduApp/exam/exam' } + // examCount 1: 不限次 2: 及格终止 3: 自定义 if (this.examCount == 2 && this.results == 1) { uni.showToast({ title: '此考试及格终止, 考试以及格, 无需再次考试', icon: 'none' }) - return + setTimeout(() => { + uni.navigateTo({ + url: from + }) + }, 1000) } else if (this.examCount == 3 && this.examNum >= this.examCustom) { uni.showToast({ title: '此考试有次数限制, 考试次数已达上限, 无法再考试了', icon: 'none' }) - return + setTimeout(() => { + uni.navigateTo({ + url: from + }) + }, 1000) } const params = { examId: this.examId, @@ -161,6 +169,7 @@ export default { switchCount: this.switchCount, studyId: this.studyId } + console.log('🚀 ~ handleResetExamination ~ params:', params) uni.navigateTo({ url: `/pages/YNEduApp/exam/examination?params=${JSON.stringify(params)}` }) @@ -195,7 +204,7 @@ export default { success: res => { console.log('🚀 ~ getExamRankById ~ res:', res) res = res.data - this.rankList = res.data + this.rankList = res.data.slice(0, 3) }, fail: err => { console.log(err) diff --git a/pages/YNEduApp/learnProj/learnProjDetail.vue b/pages/YNEduApp/learnProj/learnProjDetail.vue index 5ccc97e..d087665 100644 --- a/pages/YNEduApp/learnProj/learnProjDetail.vue +++ b/pages/YNEduApp/learnProj/learnProjDetail.vue @@ -275,12 +275,12 @@ export default { allStudyDuration: item.allStudyDuration // 总时长 } console.log('🚀 ~ toggleTheoryLearn ~ params:', params) - console.log('🚀 ~ toggleTheoryLearn ~ item:', item.studyName) + console.log('🚀 ~ toggleTheoryLearn ~ item:', item.path) let url = '' - // 如果item.studyName 包含 .mp4 则跳转到视频播放页面 否则跳转到文档页面 - if (item.studyName.includes('.mp4')) { + // 如果item.path 包含 .mp4 则跳转到视频播放页面 否则跳转到文档页面 + if (item.path.includes('.mp4')) { url = '/pages/YNEduApp/learn/learn' - } else if (item.studyName.includes('.pdf')) { + } else if (item.path.includes('.pdf')) { url = '/pages/YNEduApp/learnProj/pdfStudy' // uni.removeStorageSync('pdfUrl') // uni.removeStorageSync('studyDuration') @@ -317,7 +317,14 @@ export default { }, // 跳转考试 toggleTheoryExam(item) { - console.log('🚀 ~ toggleTheoryExam ~ item:', item) + console.log('🚀 ~ toggleTheoryExam ~ item:', item, item.examMsg.examEquipment) + if (item.examMsg.examEquipment == 2) { + uni.showToast({ + title: '请在电脑端进行考试', + icon: 'none' + }) + return + } const params = { id: item.examMsg.id, // 考试id cutNum: item.examMsg.isCut, // 切屏次数