123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title></title>
- <meta charset="utf-8">
- <title>会计自学</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="../css/mui.min.css">
- <script src="../js/mui.min.js"></script>
- <script src="../js/app.js"></script>
- <script src="../js/service.js"></script>
- <style>
- html,
- body {
- background-color: #efeff4;
- }
- header.mui-bar {
- /*display: none;*/
- }
- .mui-bar-nav~.mui-content {
- padding: 0;
- }
- .mui-content-padded {
- /*padding: 10px;*/
- }
- .mui-content-padded a {
- margin: 5px;
- width: 45px;
- height: 45px;
- display: inline-block;
- border-radius: 5px;
- padding-top: 16px;
- }
- .mui-content-padded a {
- margin-top: 12px;
- }
- .mui-content a {
- color: #8F8F94;
- }
- .mui-content a.active {
- color: #007aff;
- }
- .my-result-span {
- color: white;
- font-size: 25px;
- }
- .my-jieguo {
- text-align: center;
- margin-top: 70px;
- font-size: 50px;
- font-family: '宋体';
- font-weight: 900;
- }
- .my-dati {
- text-align: center;
- font-size: 25px;
- margin-top: 20px;
- }
- .my-chengjidan {
- text-align: center;
- font-size: 1.5em;
- font-weight: bold;
- color: white;
- margin-top: 20px;
- margin-bottom: 30px;
- }
- .my-button {
- background-color: #323333;
- font-size: 1.3em;
- font-weight: bolder;
- margin-top: 30px;
- margin-bottom: 20px;
- color: white;
- border: 0px;
- padding: 10px 0px;
- }
- .my-div-outer {
- padding-right: 20px;
- padding-left: 20px;
- }
- .my-mui-card {
- background-color: #535353;
- top: 200px;
- margin: 20px;
- height: 300px;
- width: 90%;
- position: absolute;
- }
- </style>
- </head>
- <body>
- <header class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-pull-left" style="font-size: 18px;margin-top:5px;margin-left: 2px;">退出</a>
- <h1 class="mui-title">显示结果</h1>
- </header>
- <div class="mui-content">
- <h1 class="my-jieguo" id="result-id"></h1>
- <p id="overview-msg-id" class="my-dati"></p>
- <div class="mui-content-padded mui-card my-mui-card" style="height: auto;">
- <p class="my-chengjidan">成绩单</p>
- <div id="exam-order-id" style="text-align: center;">
- </div>
- <div class="my-div-outer">
- <button id="exam-parse" data-href="resolution.html" class="mui-btn mui-btn-block my-button">全部解析</button>
- </div>
- </div>
- </div>
- <script type="text/html" id="template-parse-id">
- <a style="{isOk}" data-indexed="{indexed}"><span class="my-result-span">{indexed}</span></a>
- </script>
- <script>
- function haveNoLogin() {
- mui.openWindow({
- id: 'login-win-' + window.sectionId,
- url: 'login.html',
- waiting: {
- autoShow: false
- },
- extras: {
- sectionId: window.sectionId,
- gotoUrl: 'resolution.html',
- serviceObj: window.serviceObj
- }
- });
- }
- function isGotoLogin() {
- var isAlreadyLogin = true;//window.localStorage.getItem('isAlreadyLogin');
- if (!isAlreadyLogin) {
- mui.openWindow({
- id: 'login-win-' + window.sectionId,
- url: 'login.html',
- waiting: {
- autoShow: false
- },
- extras: {
- sectionId: window.sectionId,
- gotoUrl:'resolution.html',
- serviceObj: window.serviceObj
- }
- });
- return false;
- }
- return true; //已经登陆
- }
- function parseEvent() {
- var examParse = document.getElementById('exam-parse');
- examParse.addEventListener('tap', function() {
- var href = this.getAttribute('data-href');
- alreadyLogin(function() { //已经登陆
- mui.openWindow({
- id: 'resolution-win-' + window.sectionId,
- url: href,
- waiting: {
- autoShow: false
- },
- extras: {
- sectionId: window.sectionId,
- isFromLoginPage: false,
- serviceObj: window.serviceObj
- }
- });
- }, haveNoLogin // 还没有登陆
- );
- });
- }
- mui("#exam-order-id").on('tap', 'a', function() {
- var indexed = this.getAttribute("data-indexed");
- alreadyLogin(function() { //已经登陆
- mui.openWindow({
- id: 'resolution-win-' + window.sectionId,
- url: "resolution.html",
- waiting: {
- autoShow: false
- },
- extras: {
- indexed: indexed,
- serviceObj: window.serviceObj
- }
- });
- }, haveNoLogin // 还没有登陆
- );
- });
- mui.plusReady(function() {
- var self = plus.webview.currentWebview();
- window.sectionId = self.sectionId;
- window.serviceObj = minix(self.serviceObj);
- window.questionList = window.serviceObj.questionList;
- var resultMsg = window.serviceObj.getResultMsg();
- if (resultMsg == "2") {
- resultMsg = "遗憾,不及格";
- document.getElementById("result-id").style.color = "red";
- } else {
- resultMsg = "恭喜,已及格";
- document.getElementById("result-id").style.color = "green";
- }
- document.getElementById("result-id").innerHTML = resultMsg;
- var questionCount = window.questionList.length;
- var okCount = 0;
- var tp = document.getElementById("template-parse-id").innerHTML;
- var htmlStr = '';
- for (var i = 0; i < window.questionList.length; i++) {
- var questionAll = window.questionList[i]
- var isOk = questionAll.question.isOk;
- if (isOk) {
- okCount = okCount + 1;
- isOk = 'padding-top: 13px;background-color: #2EB348';
- } else {
- isOk = 'padding-top: 13px;background-color: #FB1C1C';
- }
- htmlStr += render(tp, {
- isOk: isOk,
- indexed: questionAll.question.indexed
- });
- }
- document.getElementById("exam-order-id").innerHTML = htmlStr;
- document.getElementById('overview-msg-id').innerHTML = '共' + questionCount + '题,答对' + okCount + '道题';
- parseEvent();
- });
- var old_back = mui.back;
- mui.back = function() {
- var wv = plus.webview;
- var sectionId = window.serviceObj.getSectionId();
- var chapterId = window.serviceObj.getChapterId();
- plus.webview.getWebviewById('section-win-' + chapterId).evalJS('initDom();');
- wv.close('question-win-' + sectionId);
- wv.close('card-win-' + sectionId);
- wv.close('submit-win-' + sectionId);
- wv.show('section-win-' + chapterId)
- //执行mui封装好的窗口关闭逻辑;
- // old_back();
- };
- </script>
- </body>
- </html>
|