main
kgdxpr 2 years ago
parent 2a1a36c7ca
commit 86e1a80043

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

Loading…
Cancel
Save