|
- <!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 .mui-media-object.mui-pull-left {
- max-width: 70px;
- }
-
- .mui-table-view {
- margin-top: 10px;
- }
- </style>
- </head>
-
- <body>
- <div class="mui-content" id="table">
- <ul class="mui-table-view">
- <li class="mui-table-view-cell mui-media">
- <a href="javascript:;" id="zxq">
- <img class="mui-media-object mui-pull-left" src="images/zx.png">
- <div class="mui-media-body">
- 总校区
- <p class='mui-ellipsis'><span class="mui-icon mui-icon-location"></span>山西省太原市尖草坪区太钢医院上27号</p>
- </div>
- </a>
- </li>
- </ul>
- </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() {
- GetSchoolDataWithoutPicker();
- });
- /*获取校区的列表*/
- function GetSchoolDataWithoutPicker() {
- var table = document.getElementById("table");
- table.innerHTML = "";
- table.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 i = 0; i < xhr.response.msg.length; i++) {
- // //load list
- // var dataobject = xhr.response.msg[i];
- // var li = document.createElement('ul');
- // li.className = 'mui-table-view';
- // li.setAttribute("schoolID", dataobject.schoolID);
- // li.addEventListener("tap", function() {
- // mui.openWindow({
- // url: 'zxq.html',
- // id: 'zxq',
- // extras: {
- // schoolID: this.getAttribute("schoolID")
- // },
- // show: {
- // aniShow: 'pop-in'
- // }
- // });
- // });
- // li.innerHTML = '<li class="mui-table-view-cell mui-media">' +
- // '<a id="zxq">' +
- // '<img class="mui-media-object mui-pull-left" src="' + (dataobject.schoolPic != undefined && dataobject.schoolPic != null && dataobject.schoolPic != '' ? dataobject.schoolPic : 'images/zx.png') + '">' +
- // '<div class="mui-media-body">' +
- // '' + dataobject.school + '' +
- // '<p class="mui-ellipsis"><span class="mui-icon mui-icon-location"></span>山西省太原市尖草坪区太钢医院上27号</p>' +
- // '</div>' +
- // '</a>' +
- // '</li>';
- // table.appendChild(li, table.firstChild);
- // }
- // }
- // } else {
- // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
- // }
- // break;
- // default:
- // break;
- // }
- // }
- // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getSchoolArea&content={'app':'2'}"));
- // xhr.send();
-
- mui.get(api+'/user/getcompany',{},function(res){
- if(res.code=="200"){
- for(var i = 0; i < res.data.length; i++) {
- //load list
- var dataobject = res.data[i];
- var li = document.createElement('ul');
- li.className = 'mui-table-view';
- li.setAttribute("schoolID", dataobject.schoolID);
- li.addEventListener("tap", function() {
- mui.openWindow({
- url: 'zxq.html',
- id: 'zxq',
- extras: {
- schoolID: this.getAttribute("schoolID")
- },
- show: {
- aniShow: 'pop-in'
- }
- });
- });
-
- li.innerHTML = '<li class="mui-table-view-cell mui-media">' +
- '<a id="zxq">' +
- '<img class="mui-media-object mui-pull-left" src="' +(dataobject.schoolPic != undefined && dataobject.schoolPic != null && dataobject.schoolPic != '' ? web+dataobject.schoolPic : 'images/zx.png') + '">' +
- '<div class="mui-media-body">' +
- '' + dataobject.school + '' +
- '<p class="mui-ellipsis"><span class="mui-icon mui-icon-location"></span>山西省太原市尖草坪区太钢医院上27号</p>' +
- '</div>' +
- '</a>' +
- '</li>';
- table.appendChild(li, table.firstChild);
- }
- }
- })
- }
- </script>
-
- </html>
|