调试-与bug修改
This commit is contained in:
parent
0297094c68
commit
27697255e9
|
|
@ -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" : {
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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({
|
||||||
|
|
|
||||||
|
|
@ -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() {
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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, // 切屏次数
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue