Tang 3 年之前
父節點
當前提交
4530d3ba2a
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      pages2/bank/questionBank.vue

+ 13 - 0
pages2/bank/questionBank.vue

@@ -772,6 +772,19 @@ export default {
 					examId: this.id
 				})
 				.then(res => {
+					if(!res.data.data.length){
+						this.hideDialog()
+						uni.showModal({
+							showCancel:false,
+							content:"该试卷暂无题目",
+							success:function(k){
+								if(k.confirm){
+									uni.navigateBack()
+								}
+							},
+						})
+						return
+					}
 					this.lastTime = res.data.data[0].answerTime && res.data.data[0].answerTime * 60;
 					//考试时间到了自动交卷
 					if (this.lastTime) {