问题描述:
知识付费PC提交考试报错。
解决方法:
修改的文件路径:application/web/view/topic/question_detail.html,修改submitPaper方法。
submitPaper: function () {
var vm = this;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
topicApi.submitTestPaper({
examination_id: this.recordId,
type: 2,
duration: this.paper.txamination_time * 60000 - this.leftTime
}).then(function (res) {
if (Object.prototype.toString.call(examTimeMap) == '[object Map]') {
if (examTimeMap.has(vm.recordId)) {
examTimeMap.delete(vm.recordId);
localStorage.setItem('exam_time', JSON.stringify(Array.from(examTimeMap)));
window.removeEventListener('beforeunload', vm.beforeunloadHandle);
}
}
window.location.replace(vm.$router.question_result + '?test_id=' + vm.testId + '&record_id=' + vm.recordId);
});
}