Prechádzať zdrojové kódy

考试交卷时间未到提示

chenxiong 3 rokov pred
rodič
commit
8106b991e4
1 zmenil súbory, kde vykonal 20 pridanie a 0 odobranie
  1. 20 0
      pages2/bank/questionBank.vue

+ 20 - 0
pages2/bank/questionBank.vue

@@ -1330,6 +1330,26 @@ export default {
 					return;
 				}
 			// } 
+			
+				if(this.bankType == 2) {
+					if(this.lastTime > 0) {
+						let lastTime = this.countdown(this.lastTime)
+						uni.showModal({
+							title:'提示',
+							content:`时间还剩余${lastTime},确定交卷吗?`,
+							confirmText:'交卷',
+							cancelText:'继续答题',
+							success:(res) => {
+								if(res.confirm) { //确定
+									this.submit();
+								} else {  //取消
+									
+								}
+							}
+						})
+						return;
+					}
+				}
 			this.submit();
 		},
 		/**