调试-与bug修改

This commit is contained in:
binbin_pan 2024-08-29 18:12:47 +08:00
parent 0297094c68
commit 27697255e9
6 changed files with 62 additions and 32 deletions

View File

@ -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" : {

View File

@ -16,7 +16,7 @@
</div>
<div class="switch-count-wrapper">
<u-icon name="/static/images/qiehuan.png"></u-icon>
<div class="switch-count">{{ switchCount }}</div>
<div class="switch-count">{{ '不允许切屏' }}</div>
<div class="explain">切屏次数</div>
</div>
</div>

View File

@ -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({

View File

@ -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() {

View File

@ -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)

View File

@ -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, //