main
kgdxpr 2 years ago
parent 24ce9b29ab
commit 5099a5709a

@ -132,8 +132,9 @@
</header>
<div class="mui-content mui-scroll-wrapper">
<div style="margin-left: 10px;margin-top: 10px;"><span class="mui-icon-extra mui-icon-extra-outline"
id="time">123</span></div>
<div style="margin-left: 10px;margin-top: 10px;"><span
class="mui-icon-extra mui-icon-extra-outline"></span>考试剩余时间:<span id="time"
style="color: red;font-weight: bold;"></span></div>
<div class="mui-card" id="examinfo"></div>
@ -198,11 +199,56 @@
<script>
$(function () {
$.ajax({
url: "/FengHuang/exam/getRemainSecond",
async: false,
type: 'GET',
success: function (res) {
var remainSecond = res.remainSecond;
if (remainSecond > 0) {
var timer = new easytimer.Timer();
timer.start({ countdown: true, startValues: { seconds: remainSecond } });
$('#time').html(timer.getTimeValues().toString());
$(function () {
timer.addEventListener('secondsUpdated', function (e) {
$('#time').html(timer.getTimeValues().toString());
});
timer.addEventListener('targetAchieved', function (e) {
mui.alert('考试时间已到,将自动提交!', '提示', function () {
$.ajax({
url: "/FengHuang/exam/jiaoJuan",
type: 'POST',
success: function (res) {
window.location = "./result.html";
}
});
});
});
} else if (remainSecond == 0) {
mui.alert('考试时间已到,将自动提交!', '提示', function () {
$.ajax({
url: "/FengHuang/exam/jiaoJuan",
type: 'POST',
success: function (res) {
window.location = "./result.html";
}
});
});
} else if (remainSecond == -1) {
mui.alert('您的考试已完成,无需重复考试!', '提示', function () {
window.location = "./result.html";
});
} else if (remainSecond == -2) {
window.location = "./login.html";
}
}
});
@ -250,7 +296,7 @@
}
});
}
})
});
});
// 侧边栏对象
@ -384,18 +430,7 @@
}
var timer = new easytimer.Timer();
timer.start({ countdown: true, startValues: { seconds: 30 } });
$('#time').html(timer.getTimeValues().toString());
timer.addEventListener('secondsUpdated', function (e) {
$('#time').html(timer.getTimeValues().toString());
});
timer.addEventListener('targetAchieved', function (e) {
$('#time').html('KABOOM!!');
});

@ -97,13 +97,15 @@
<div class="mui-content">
<div class="mui-card">
<div class="mui-card-content">
<div class="mui-content-padded">
<p style="text-align: center;color: orange;font-size: 16px;">本次成绩</p>
<p style="text-align: center;font-size: 12px;">交卷时间2023-05-06 13:45:10 </p>
<p style="text-align: center;font-size: 16px;">得分:<span style="color: red;">100</span>
&nbsp&nbsp&nbsp&nbsp 用时:<span style="color: red;">1小时36分05秒</span></p>
<div class="flex-container" id="answers"></div>
<div class="mui-content-padded" id="answers">
<script id="answersTemplate" type="text/x-jsrender">
<p style="text-align: center;color: orange;font-size: 16px;">本次成绩</p>
<p style="text-align: center;font-size: 12px;">交卷时间:{{:end_time}} </p>
<p style="text-align: center;font-size: 16px;">得分:<span style="color: red;">{{:sum}}</span>
&nbsp&nbsp&nbsp&nbsp 用时:<span style="color: red;">1小时36分05秒</span></p>
<div class="flex-container" >
{{for list}}
{{if flag == 0}}
<a>{{:order_id}}</a>
@ -113,7 +115,8 @@
<a class="wrong">{{:order_id}}</a>
{{/if}}
{{/for}}
{{/for}}
</div>
</script>
</div>
<div class="legend">
@ -153,16 +156,16 @@
</script>
</div>
<script src="../js/jquery.min.js"></script>
<script src="../js/jquery.min.js"></script>
<script src="../js/mui.min.js"></script>
<script src="../js/jsrender.min.js"></script>
<script>
$(function () {
$(function () {
//获取答题卡信息
getAnswerSheet();
mui(".mui-content").on("tap", "a", function () {
mui(".mui-content").on("tap", "a", function () {
orderId = this.textContent;
getQuestionInfo(this.textContent);
})

Loading…
Cancel
Save