問題描述:
知識付費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);
});
}