From 8af1229f66ecc29b35152a7ce766e7dd8ce51fcd Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Fri, 19 May 2023 09:22:36 +0800 Subject: [PATCH] 'commit' --- WebRoot/html/dangjian/view/exam.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/WebRoot/html/dangjian/view/exam.html b/WebRoot/html/dangjian/view/exam.html index 35aceee..289ecce 100644 --- a/WebRoot/html/dangjian/view/exam.html +++ b/WebRoot/html/dangjian/view/exam.html @@ -393,6 +393,8 @@ orderId--; $.cookie('order_id', orderId, { path: '/' }); getQuestionInfo(); + } else { + mui.alert('已到第一题', '提示'); } }); @@ -439,12 +441,16 @@ // 获取选中的radio元素的值 var reply = $(this).val(); saveReply(orderId, reply); - setTimeout(function () { - orderId++; - console.log(orderId); - $.cookie('order_id', orderId, { path: '/' }); - getQuestionInfo(orderId); - }, 500); + if (orderId < queCount) { + setTimeout(function () { + orderId++; + console.log(orderId); + $.cookie('order_id', orderId, { path: '/' }); + getQuestionInfo(orderId); + }, 500); + } else { + mui.alert('已到最后一题', '提示'); + } });