|
|
@ -97,7 +97,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 菜单具体展示内容 -->
|
|
|
|
<!-- 菜单具体展示内容 -->
|
|
|
|
<button id="offCanvasHide" type="button" class="mui-btn mui-btn-danger mui-btn-block"
|
|
|
|
<button id="closeMenu" type="button" class="mui-btn mui-btn-danger mui-btn-block"
|
|
|
|
style="padding: 5px 20px;">关闭侧滑菜单</button>
|
|
|
|
style="padding: 5px 20px;">关闭侧滑菜单</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -112,7 +112,7 @@
|
|
|
|
<div class="mui-content mui-scroll-wrapper">
|
|
|
|
<div class="mui-content mui-scroll-wrapper">
|
|
|
|
<div class="mui-card" id="examinfo"></div>
|
|
|
|
<div class="mui-card" id="examinfo"></div>
|
|
|
|
<script id="myTemplate" type="text/x-jsrender">
|
|
|
|
<script id="myTemplate" type="text/x-jsrender">
|
|
|
|
<div class="mui-card-header" style="font-size:18px">{{:content}}</div>
|
|
|
|
<div class="mui-card-header" style="font-size:18px;line-height: 1.8;">{{:order_id}}、<font style="color:#E73A30;">[{{:type_name}}]</font> {{:content}}</div>
|
|
|
|
<div class="mui-card-content" style="font-size:16px">
|
|
|
|
<div class="mui-card-content" style="font-size:16px">
|
|
|
|
<div class="mui-card-content-inner mui-input-group">
|
|
|
|
<div class="mui-card-content-inner mui-input-group">
|
|
|
|
{{for xuanxiang}}
|
|
|
|
{{for xuanxiang}}
|
|
|
@ -130,13 +130,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
<a class="mui-tab-item" href="#" id="showMenu">
|
|
|
|
<a class="mui-tab-item" href="#" id="showMenu">
|
|
|
|
<span class="mui-icon mui-icon-bars"></span>
|
|
|
|
<span class="mui-icon mui-icon-bars"></span>
|
|
|
|
<span class="mui-tab-label"></span>
|
|
|
|
<span class="mui-tab-label">答题卡</span>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<a class="mui-tab-item" href="#" id="next">
|
|
|
|
<a class="mui-tab-item" href="#" id="previous">
|
|
|
|
<span class="mui-icon mui-icon-arrowthinleft"></span>
|
|
|
|
<span class="mui-icon mui-icon-arrowthinleft"></span>
|
|
|
|
<span class="mui-tab-label">上一题</span>
|
|
|
|
<span class="mui-tab-label">上一题</span>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<a class="mui-tab-item" href="#" id="previous">
|
|
|
|
<a class="mui-tab-item" href="#" id="next">
|
|
|
|
<span class="mui-icon mui-icon-arrowthinright"></span>
|
|
|
|
<span class="mui-icon mui-icon-arrowthinright"></span>
|
|
|
|
<span class="mui-tab-label">下一题</span>
|
|
|
|
<span class="mui-tab-label">下一题</span>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
@ -148,18 +148,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="../js/jquery.min.js"></script>
|
|
|
|
<script src="../js/jquery.min.js"></script>
|
|
|
|
|
|
|
|
<script src="../js/jquery.cookie.min.js"></script>
|
|
|
|
<script src="../js/mui.min.js"></script>
|
|
|
|
<script src="../js/mui.min.js"></script>
|
|
|
|
<script src="../js/jsrender.min.js"></script>
|
|
|
|
<script src="../js/jsrender.min.js"></script>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
$(function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var orderId = 1;
|
|
|
|
|
|
|
|
if ($.cookie('order_id')) {
|
|
|
|
|
|
|
|
orderId = $.cookie('order_id');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$.cookie('order_id', orderId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getExamInfo(2);
|
|
|
|
// 获取一共有多少道题
|
|
|
|
|
|
|
|
var queCount = getExamInfo();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getQuestionInfo(orderId);
|
|
|
|
|
|
|
|
|
|
|
|
// 右上角增加提交按钮
|
|
|
|
// 右上角增加提交按钮
|
|
|
|
var header = document.getElementById("header");
|
|
|
|
var header = document.getElementById("header");
|
|
|
@ -168,20 +175,37 @@
|
|
|
|
submitBtn.innerText = '提交';
|
|
|
|
submitBtn.innerText = '提交';
|
|
|
|
header.appendChild(submitBtn);
|
|
|
|
header.appendChild(submitBtn);
|
|
|
|
submitBtn.addEventListener('tap', function () {
|
|
|
|
submitBtn.addEventListener('tap', function () {
|
|
|
|
offCanvasWrapper.offCanvas('show');
|
|
|
|
//提交的事件
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 侧边栏对象
|
|
|
|
// 侧边栏对象
|
|
|
|
var offCanvasWrapper = mui('#offCanvasWrapper');
|
|
|
|
var offCanvasWrapper = mui('#offCanvasWrapper');
|
|
|
|
document.getElementById('showMenu').addEventListener('tap', function () {
|
|
|
|
$("#showMenu").click(function () {
|
|
|
|
offCanvasWrapper.offCanvas('show');
|
|
|
|
offCanvasWrapper.offCanvas('show');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
document.getElementById('offCanvasHide').addEventListener('tap', function () {
|
|
|
|
$("#closeMenu").click(function () {
|
|
|
|
offCanvasWrapper.offCanvas('close');
|
|
|
|
offCanvasWrapper.offCanvas('close');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#next").click(function () {
|
|
|
|
|
|
|
|
if (orderId < queCount) {
|
|
|
|
|
|
|
|
orderId++;
|
|
|
|
|
|
|
|
$.cookie('order_id', orderId);
|
|
|
|
|
|
|
|
getQuestionInfo(orderId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#previous").click(function () {
|
|
|
|
|
|
|
|
if (orderId > 1) {
|
|
|
|
|
|
|
|
orderId--;
|
|
|
|
|
|
|
|
$.cookie('order_id', orderId);
|
|
|
|
|
|
|
|
getQuestionInfo(orderId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getExamInfo(orderId) {
|
|
|
|
// 根据题号获取题的信息
|
|
|
|
|
|
|
|
function getQuestionInfo(orderId) {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: "/FengHuang/exam/getQuestion?order_id=" + orderId,
|
|
|
|
url: "/FengHuang/exam/getQuestion?order_id=" + orderId,
|
|
|
|
async: false,
|
|
|
|
async: false,
|
|
|
@ -192,9 +216,19 @@
|
|
|
|
$('#examinfo').html(htmlOutput);
|
|
|
|
$('#examinfo').html(htmlOutput);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getExamInfo() {
|
|
|
|
|
|
|
|
var queCount = 0;
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
url: "/FengHuang/exam/getExamInfo",
|
|
|
|
|
|
|
|
async: false,
|
|
|
|
|
|
|
|
type: 'GET',
|
|
|
|
|
|
|
|
success: function (res) {
|
|
|
|
|
|
|
|
queCount = res.allCount;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return queCount;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|