|
- <!doctype html>
- <html>
-
- <head>
- <meta charset="UTF-8">
- <title></title>
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <link href="css/mui.min.css" rel="stylesheet" />
- <link href="css/style.css" rel="stylesheet" />
- <style>
- .mui-table-view {
- margin-top: 10px;
- }
-
- .span3 {
- color: #0193DF;
- margin: 10px;
- line-height: 38px;
- }
-
- .span2 {
- color: #c70f1a;
- font-size: 13px;
- line-height: 24px;
- }
-
- .mui-ellipsis {
- line-height: 24px;
- }
-
- .mui-content-padded {
- margin-top: 10px;
- text-align: center;
- }
-
- .mui-content {
- background-color: #FFFFFF;
- }
-
- .span3 img {
- width: 6px;
- height: 14px;
- margin-right: 10px;
- }
- </style>
- </head>
-
- <body>
- <header class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
- <h1 class="mui-title">总校区专业</h1>
-
- </header>
- <div class="mui-content">
-
- <div class="bg">
- <span class="span3"><img src="images/gg_02.png">初中起点</span>
- <ul id="tablechu">
- </ul>
- <span class="span3"><img src="images/gg_02.png">高中起点</span>
- <ul id="tablegao">
- </ul>
- </div>
-
- </div>
- </div>
-
- </body>
- <script src="js/mui.min.js "></script>
- <script src="js/serverurl.js"></script>
- <script src="js/userinfos.js"></script>
- <script type="text/javascript">
- mui.plusReady(function() {
- GetProfession();
- });
-
- function GetProfession() {
- var schollid = plus.webview.currentWebview().schoolID;
- var tablechu = document.getElementById("tablechu");
- tablechu.innerHTML = "";
- tablechu.innerText = "";
- var tablegao = document.getElementById("tablegao");
- tablegao.innerHTML = "";
- tablegao.innerText = "";
- // var xhr = new plus.net.XMLHttpRequest();
- // xhr.responseType = "json";
- // xhr.onreadystatechange = function() {
- // switch(xhr.readyState) {
- // case 4:
- // if(xhr.status == 200) {
- // if(xhr.response.msg != null && xhr.response.msg.length > 0) {
- // for(var j = 0; j < xhr.response.msg.length; j++) {
- // var prodataobject = xhr.response.msg[j];
- // var li = document.createElement("li");
- // li.setAttribute("departID", prodataobject.departID);
- // li.addEventListener("tap", function() {
- // mui.openWindow({
- // url: 'instruction.html',
- // id: 'ins',
- // show: {
- // aniShow: 'pop-in'
- // },
- // extras: {
- // departID: this.getAttribute("departID")
- // }
- // });
- // });
- // li.innerHTML = '<a>' + prodataobject.depart + '</a>';
- // if(prodataobject.type == '01') {
- // tablechu.appendChild(li);
- // } else {
- // tablegao.appendChild(li);
- // }
- // }
- // }
- // } else {
- // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
- // }
- // break;
- // default:
- // break;
- // }
- // }
- // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getDepartsByName&content={'school':'" + schollid + "','app':'1'}"));
- // xhr.send();
- mui.post(api+'/user/getmajor',{data:schollid},function(res){
- if(res.code=="200"){
- for(var j = 0; j < res.data.length; j++) {
- var prodataobject = res.data[j];
- var li = document.createElement("li");
- li.setAttribute("departID", prodataobject.departID);
- li.addEventListener("tap", function() {
- mui.openWindow({
- url: 'instruction.html',
- id: 'ins',
- show: {
- aniShow: 'pop-in'
- },
- extras: {
- departID: this.getAttribute("departID")
- }
- });
- });
- li.innerHTML = '<a>' + prodataobject.depart + '</a>';
- if(prodataobject.type == '01') {
- tablechu.appendChild(li);
- } else {
- tablegao.appendChild(li);
- }
- }
- }
- },'json')
- }
- </script>
-
- </html>
|