调试-与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, "versionCode" : 104,
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
"compatible" : {
"ignoreVersion" : true
},
"popGesture" : "none", "popGesture" : "none",
"useragent" : { "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", "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" : { "modules" : {
"Camera" : {}, "Camera" : {},
"VideoPlayer" : {} "VideoPlayer" : {},
"Barcode" : {},
"FaceID" : {}
}, },
"distribute" : { "distribute" : {
"android" : { "android" : {

View File

@ -16,7 +16,7 @@
</div> </div>
<div class="switch-count-wrapper"> <div class="switch-count-wrapper">
<u-icon name="/static/images/qiehuan.png"></u-icon> <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 class="explain">切屏次数</div>
</div> </div>
</div> </div>

View File

@ -114,6 +114,13 @@ export default {
// //
handleExamination(item) { handleExamination(item) {
console.log('🚀 ~ handleExamination ~ item:', item) console.log('🚀 ~ handleExamination ~ item:', item)
if (item.examEquipment == 2) {
uni.showToast({
title: '请在电脑端进行考试',
icon: 'none'
})
return
}
// examCount 1: 2: 3: // examCount 1: 2: 3:
if (item.examCount == 2 && item.results == 1) { if (item.examCount == 2 && item.results == 1) {
uni.showToast({ uni.showToast({

View File

@ -175,20 +175,21 @@ export default {
this.score = opt.score this.score = opt.score
this.passScore = opt.passScore this.passScore = opt.passScore
}, },
onShow() { // onShow() {
setTimeout(() => { // setTimeout(() => {
if (this.screenCount > this.switchCount) { // if (this.screenCount > this.switchCount) {
this.$refs.uToast.show({ // this.$refs.uToast.show({
message: '切屏次数已达上限, 系统将自动提交', // message: ', ',
duration: 1000 // duration: 1000
}) // })
this.handleConfirmSubmit() // this.handleConfirmSubmit()
} // }
}, 1000) // }, 1000)
}, // },
onHide() { onHide() {
this.screenCount++ // this.screenCount++
console.log('🚀 ~ onHide ~ this.screenCount:', this.screenCount) // console.log('🚀 ~ onHide ~ this.screenCount:', this.screenCount)
this.handleConfirmSubmit()
}, },
mounted() { mounted() {
this.getList() this.getList()
@ -197,9 +198,10 @@ export default {
this.random2 = Math.floor(Math.random() * 100000) + 900000 // random2 15-19 this.random2 = Math.floor(Math.random() * 100000) + 900000 // random2 15-19
console.log('🚀 ~ mounted ~ this.random1:', this.random1, this.random2) console.log('🚀 ~ mounted ~ this.random1:', this.random1, this.random2)
}, },
onUnload() { // onUnload() {
this.handleConfirmSubmit() // console.log('🚀 ~ onUnload ~ ')
}, // this.handleConfirmSubmit()
// },
methods: { methods: {
// //
async getList() { async getList() {

View File

@ -132,26 +132,34 @@ export default {
// }, // },
// //
handleResetExamination() { handleResetExamination() {
if (this.examNum > 10) { let from = ''
uni.showToast({ if (this.studyId) {
title: '已达到最大考试次数', from = '/pages/YNEduApp/learnProj/learnProjDetail?id=' + this.studyId
icon: 'none' } else {
}) from = '/pages/YNEduApp/exam/exam'
return
} }
// examCount 1: 2: 3: // examCount 1: 2: 3:
if (this.examCount == 2 && this.results == 1) { if (this.examCount == 2 && this.results == 1) {
uni.showToast({ uni.showToast({
title: '此考试及格终止, 考试以及格, 无需再次考试', title: '此考试及格终止, 考试以及格, 无需再次考试',
icon: 'none' icon: 'none'
}) })
return setTimeout(() => {
uni.navigateTo({
url: from
})
}, 1000)
} else if (this.examCount == 3 && this.examNum >= this.examCustom) { } else if (this.examCount == 3 && this.examNum >= this.examCustom) {
uni.showToast({ uni.showToast({
title: '此考试有次数限制, 考试次数已达上限, 无法再考试了', title: '此考试有次数限制, 考试次数已达上限, 无法再考试了',
icon: 'none' icon: 'none'
}) })
return setTimeout(() => {
uni.navigateTo({
url: from
})
}, 1000)
} }
const params = { const params = {
examId: this.examId, examId: this.examId,
@ -161,6 +169,7 @@ export default {
switchCount: this.switchCount, switchCount: this.switchCount,
studyId: this.studyId studyId: this.studyId
} }
console.log('🚀 ~ handleResetExamination ~ params:', params)
uni.navigateTo({ uni.navigateTo({
url: `/pages/YNEduApp/exam/examination?params=${JSON.stringify(params)}` url: `/pages/YNEduApp/exam/examination?params=${JSON.stringify(params)}`
}) })
@ -195,7 +204,7 @@ export default {
success: res => { success: res => {
console.log('🚀 ~ getExamRankById ~ res:', res) console.log('🚀 ~ getExamRankById ~ res:', res)
res = res.data res = res.data
this.rankList = res.data this.rankList = res.data.slice(0, 3)
}, },
fail: err => { fail: err => {
console.log(err) console.log(err)

View File

@ -275,12 +275,12 @@ export default {
allStudyDuration: item.allStudyDuration // allStudyDuration: item.allStudyDuration //
} }
console.log('🚀 ~ toggleTheoryLearn ~ params:', params) console.log('🚀 ~ toggleTheoryLearn ~ params:', params)
console.log('🚀 ~ toggleTheoryLearn ~ item:', item.studyName) console.log('🚀 ~ toggleTheoryLearn ~ item:', item.path)
let url = '' let url = ''
// item.studyName .mp4 // item.path .mp4
if (item.studyName.includes('.mp4')) { if (item.path.includes('.mp4')) {
url = '/pages/YNEduApp/learn/learn' url = '/pages/YNEduApp/learn/learn'
} else if (item.studyName.includes('.pdf')) { } else if (item.path.includes('.pdf')) {
url = '/pages/YNEduApp/learnProj/pdfStudy' url = '/pages/YNEduApp/learnProj/pdfStudy'
// uni.removeStorageSync('pdfUrl') // uni.removeStorageSync('pdfUrl')
// uni.removeStorageSync('studyDuration') // uni.removeStorageSync('studyDuration')
@ -317,7 +317,14 @@ export default {
}, },
// //
toggleTheoryExam(item) { 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 = { const params = {
id: item.examMsg.id, // id id: item.examMsg.id, // id
cutNum: item.examMsg.isCut, // cutNum: item.examMsg.isCut, //