diff --git a/WebRoot/html/dangjian/.vscode/settings.json b/WebRoot/html/dangjian/.vscode/settings.json new file mode 100644 index 0000000..4798424 --- /dev/null +++ b/WebRoot/html/dangjian/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/WebRoot/html/dangjian/view/exam.html b/WebRoot/html/dangjian/view/exam.html index 6b94054..c85f090 100644 --- a/WebRoot/html/dangjian/view/exam.html +++ b/WebRoot/html/dangjian/view/exam.html @@ -39,6 +39,29 @@ background-clip: padding-box; } + .legend { + display: flex; + justify-content: space-around; + align-items: center; + } + + .legend a { + margin: 10px; + width: 20px; + height: 20px; + display: flex; + justify-content: center; + align-items: center; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 25px; + background-clip: padding-box; + } + + .legend span { + font-size: 14px; + } + .mui-content-padded a .mui-icon { margin-top: 12px; } @@ -76,29 +99,25 @@

答题卡

-
- 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -
+
+ +
+
+
已做
+
未做
-
+ style="padding: 5px 20px;margin-top: 10px;">关闭 @@ -176,10 +195,6 @@ $(function () { - - - - var orderId = 1; if ($.cookie('order_id')) { orderId = $.cookie('order_id'); @@ -190,8 +205,12 @@ // 获取一共有多少道题 var queCount = getExamInfo(); + //获取题的信息 getQuestionInfo(orderId); + //获取答题卡信息 + getAnswerSheet(); + // 右上角增加提交按钮 var header = document.getElementById("header"); var submitBtn = document.createElement('button'); @@ -200,11 +219,14 @@ header.appendChild(submitBtn); submitBtn.addEventListener('tap', function () { //提交的事件 + console.log("!23123"); }); // 侧边栏对象 var offCanvasWrapper = mui('#offCanvasWrapper'); document.getElementById("showMenu").addEventListener("tap", function () { + //获取答题卡信息 + getAnswerSheet(); offCanvasWrapper.offCanvas('show'); }); document.getElementById("closeMenu").addEventListener("tap", function () { @@ -233,7 +255,8 @@ }); - mui(".mui-content").on("tap", "a", function () { + mui(".mui-content").on("tap", "a", function () { + orderId = this.textContent; getQuestionInfo(this.textContent); offCanvasWrapper.offCanvas('close'); }) @@ -278,6 +301,21 @@ }); }; + // 获取答题卡信息 + function getAnswerSheet() { + $.ajax({ + url: "/FengHuang/exam/getPersonAllInfo", + async: false, + type: 'GET', + success: function (res) { + var template = $.templates('#answersTemplate'); + var htmlOutput = template.render(res); + $('#answers').html(htmlOutput); + } + }); + } + + function getExamInfo() { var queCount = 0; $.ajax({ diff --git a/WebRoot/html/dangjian/view/exam_copy.html b/WebRoot/html/dangjian/view/exam_copy.html index 6df9a6c..6ff564b 100644 --- a/WebRoot/html/dangjian/view/exam_copy.html +++ b/WebRoot/html/dangjian/view/exam_copy.html @@ -1,59 +1,31 @@ - + - - + Untitled + - - - - - a - - b - c - - - - - - - +
+
1
+
2
+
3
+
\ No newline at end of file