Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

156 linhas
4.0 KiB

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="css/mui.min.css" rel="stylesheet" />
  8. <link href="css/style.css" rel="stylesheet" />
  9. <style>
  10. .mui-table-view {
  11. margin-top: 10px;
  12. }
  13. .span3 {
  14. color: #0193DF;
  15. margin: 10px;
  16. line-height: 38px;
  17. }
  18. .span2 {
  19. color: #c70f1a;
  20. font-size: 13px;
  21. line-height: 24px;
  22. }
  23. .mui-ellipsis {
  24. line-height: 24px;
  25. }
  26. .mui-content-padded {
  27. margin-top: 10px;
  28. text-align: center;
  29. }
  30. .mui-content {
  31. background-color: #FFFFFF;
  32. }
  33. .span3 img {
  34. width: 6px;
  35. height: 14px;
  36. margin-right: 10px;
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <header class="mui-bar mui-bar-nav">
  42. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  43. <h1 class="mui-title">总校区专业</h1>
  44. </header>
  45. <div class="mui-content">
  46. <div class="bg">
  47. <span class="span3"><img src="images/gg_02.png">初中起点</span>
  48. <ul id="tablechu">
  49. </ul>
  50. <span class="span3"><img src="images/gg_02.png">高中起点</span>
  51. <ul id="tablegao">
  52. </ul>
  53. </div>
  54. </div>
  55. </div>
  56. </body>
  57. <script src="js/mui.min.js "></script>
  58. <script src="js/serverurl.js"></script>
  59. <script src="js/userinfos.js"></script>
  60. <script type="text/javascript">
  61. mui.plusReady(function() {
  62. GetProfession();
  63. });
  64. function GetProfession() {
  65. var schollid = plus.webview.currentWebview().schoolID;
  66. var tablechu = document.getElementById("tablechu");
  67. tablechu.innerHTML = "";
  68. tablechu.innerText = "";
  69. var tablegao = document.getElementById("tablegao");
  70. tablegao.innerHTML = "";
  71. tablegao.innerText = "";
  72. // var xhr = new plus.net.XMLHttpRequest();
  73. // xhr.responseType = "json";
  74. // xhr.onreadystatechange = function() {
  75. // switch(xhr.readyState) {
  76. // case 4:
  77. // if(xhr.status == 200) {
  78. // if(xhr.response.msg != null && xhr.response.msg.length > 0) {
  79. // for(var j = 0; j < xhr.response.msg.length; j++) {
  80. // var prodataobject = xhr.response.msg[j];
  81. // var li = document.createElement("li");
  82. // li.setAttribute("departID", prodataobject.departID);
  83. // li.addEventListener("tap", function() {
  84. // mui.openWindow({
  85. // url: 'instruction.html',
  86. // id: 'ins',
  87. // show: {
  88. // aniShow: 'pop-in'
  89. // },
  90. // extras: {
  91. // departID: this.getAttribute("departID")
  92. // }
  93. // });
  94. // });
  95. // li.innerHTML = '<a>' + prodataobject.depart + '</a>';
  96. // if(prodataobject.type == '01') {
  97. // tablechu.appendChild(li);
  98. // } else {
  99. // tablegao.appendChild(li);
  100. // }
  101. // }
  102. // }
  103. // } else {
  104. // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
  105. // }
  106. // break;
  107. // default:
  108. // break;
  109. // }
  110. // }
  111. // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getDepartsByName&content={'school':'" + schollid + "','app':'1'}"));
  112. // xhr.send();
  113. mui.post(api+'/user/getmajor',{data:schollid},function(res){
  114. if(res.code=="200"){
  115. for(var j = 0; j < res.data.length; j++) {
  116. var prodataobject = res.data[j];
  117. var li = document.createElement("li");
  118. li.setAttribute("departID", prodataobject.departID);
  119. li.addEventListener("tap", function() {
  120. mui.openWindow({
  121. url: 'instruction.html',
  122. id: 'ins',
  123. show: {
  124. aniShow: 'pop-in'
  125. },
  126. extras: {
  127. departID: this.getAttribute("departID")
  128. }
  129. });
  130. });
  131. li.innerHTML = '<a>' + prodataobject.depart + '</a>';
  132. if(prodataobject.type == '01') {
  133. tablechu.appendChild(li);
  134. } else {
  135. tablegao.appendChild(li);
  136. }
  137. }
  138. }
  139. },'json')
  140. }
  141. </script>
  142. </html>