|
|
|
@ -118,7 +118,11 @@
|
|
|
|
|
{{for xuanxiang}}
|
|
|
|
|
<div class="mui-input-row mui-checkbox mui-left">
|
|
|
|
|
<label>{{:key}}. {{:value}}</label>
|
|
|
|
|
<input name="checkbox" value="{{:key}}" type="checkbox">
|
|
|
|
|
{{if checked}}
|
|
|
|
|
<input name="checkbox" value="{{:key}}" type="checkbox" checked>
|
|
|
|
|
{{else}}
|
|
|
|
|
<input name="checkbox" value="{{:key}}" type="checkbox">
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
|
|
|
|
{{/for}}
|
|
|
|
|
</div>
|
|
|
|
@ -160,7 +164,7 @@
|
|
|
|
|
if ($.cookie('order_id')) {
|
|
|
|
|
orderId = $.cookie('order_id');
|
|
|
|
|
} else {
|
|
|
|
|
$.cookie('order_id', orderId);
|
|
|
|
|
$.cookie('order_id', orderId, { path: '/' });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取一共有多少道题
|
|
|
|
@ -180,30 +184,34 @@
|
|
|
|
|
|
|
|
|
|
// 侧边栏对象
|
|
|
|
|
var offCanvasWrapper = mui('#offCanvasWrapper');
|
|
|
|
|
$("#showMenu").click(function () {
|
|
|
|
|
|
|
|
|
|
document.getElementById("showMenu").addEventListener("tap", function () {
|
|
|
|
|
offCanvasWrapper.offCanvas('show');
|
|
|
|
|
});
|
|
|
|
|
$("#closeMenu").click(function () {
|
|
|
|
|
|
|
|
|
|
document.getElementById("closeMenu").addEventListener("tap", function () {
|
|
|
|
|
offCanvasWrapper.offCanvas('close');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#next").click(function () {
|
|
|
|
|
document.getElementById("next").addEventListener("tap", function () {
|
|
|
|
|
if (orderId < queCount) {
|
|
|
|
|
orderId++;
|
|
|
|
|
$.cookie('order_id', orderId);
|
|
|
|
|
$.cookie('order_id', orderId, { path: '/' });
|
|
|
|
|
getQuestionInfo(orderId);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#previous").click(function () {
|
|
|
|
|
document.getElementById("previous").addEventListener("tap", function () {
|
|
|
|
|
if (orderId > 1) {
|
|
|
|
|
orderId--;
|
|
|
|
|
$.cookie('order_id', orderId);
|
|
|
|
|
$.cookie('order_id', orderId, { path: '/' });
|
|
|
|
|
getQuestionInfo(orderId);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 根据题号获取题的信息
|
|
|
|
|
function getQuestionInfo(orderId) {
|
|
|
|
|
$.ajax({
|
|
|
|
|