You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

134 lines
4.4 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 .mui-media-object.mui-pull-left {
  11. max-width: 70px;
  12. }
  13. .mui-table-view {
  14. margin-top: 10px;
  15. }
  16. </style>
  17. </head>
  18. <body>
  19. <div class="mui-content" id="table">
  20. <ul class="mui-table-view">
  21. <li class="mui-table-view-cell mui-media">
  22. <a href="javascript:;" id="zxq">
  23. <img class="mui-media-object mui-pull-left" src="images/zx.png">
  24. <div class="mui-media-body">
  25. 总校区
  26. <p class='mui-ellipsis'><span class="mui-icon mui-icon-location"></span>山西省太原市尖草坪区太钢医院上27号</p>
  27. </div>
  28. </a>
  29. </li>
  30. </ul>
  31. </div>
  32. </body>
  33. <script src="js/mui.min.js "></script>
  34. <script src="js/serverurl.js"></script>
  35. <script src="js/userinfos.js"></script>
  36. <script type="text/javascript">
  37. mui.plusReady(function() {
  38. GetSchoolDataWithoutPicker();
  39. });
  40. /*获取校区的列表*/
  41. function GetSchoolDataWithoutPicker() {
  42. var table = document.getElementById("table");
  43. table.innerHTML = "";
  44. table.innerText = "";
  45. // var xhr = new plus.net.XMLHttpRequest();
  46. // xhr.responseType = "json";
  47. // xhr.onreadystatechange = function() {
  48. // switch(xhr.readyState) {
  49. // case 4:
  50. // if(xhr.status == 200) {
  51. // if(xhr.response.msg != null && xhr.response.msg.length > 0) {
  52. // for(var i = 0; i < xhr.response.msg.length; i++) {
  53. // //load list
  54. // var dataobject = xhr.response.msg[i];
  55. // var li = document.createElement('ul');
  56. // li.className = 'mui-table-view';
  57. // li.setAttribute("schoolID", dataobject.schoolID);
  58. // li.addEventListener("tap", function() {
  59. // mui.openWindow({
  60. // url: 'zxq.html',
  61. // id: 'zxq',
  62. // extras: {
  63. // schoolID: this.getAttribute("schoolID")
  64. // },
  65. // show: {
  66. // aniShow: 'pop-in'
  67. // }
  68. // });
  69. // });
  70. // li.innerHTML = '<li class="mui-table-view-cell mui-media">' +
  71. // '<a id="zxq">' +
  72. // '<img class="mui-media-object mui-pull-left" src="' + (dataobject.schoolPic != undefined && dataobject.schoolPic != null && dataobject.schoolPic != '' ? dataobject.schoolPic : 'images/zx.png') + '">' +
  73. // '<div class="mui-media-body">' +
  74. // '' + dataobject.school + '' +
  75. // '<p class="mui-ellipsis"><span class="mui-icon mui-icon-location"></span>山西省太原市尖草坪区太钢医院上27号</p>' +
  76. // '</div>' +
  77. // '</a>' +
  78. // '</li>';
  79. // table.appendChild(li, table.firstChild);
  80. // }
  81. // }
  82. // } else {
  83. // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
  84. // }
  85. // break;
  86. // default:
  87. // break;
  88. // }
  89. // }
  90. // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getSchoolArea&content={'app':'2'}"));
  91. // xhr.send();
  92. mui.get(api+'/user/getcompany',{},function(res){
  93. if(res.code=="200"){
  94. for(var i = 0; i < res.data.length; i++) {
  95. //load list
  96. var dataobject = res.data[i];
  97. var li = document.createElement('ul');
  98. li.className = 'mui-table-view';
  99. li.setAttribute("schoolID", dataobject.schoolID);
  100. li.addEventListener("tap", function() {
  101. mui.openWindow({
  102. url: 'zxq.html',
  103. id: 'zxq',
  104. extras: {
  105. schoolID: this.getAttribute("schoolID")
  106. },
  107. show: {
  108. aniShow: 'pop-in'
  109. }
  110. });
  111. });
  112. li.innerHTML = '<li class="mui-table-view-cell mui-media">' +
  113. '<a id="zxq">' +
  114. '<img class="mui-media-object mui-pull-left" src="' +(dataobject.schoolPic != undefined && dataobject.schoolPic != null && dataobject.schoolPic != '' ? web+dataobject.schoolPic : 'images/zx.png') + '">' +
  115. '<div class="mui-media-body">' +
  116. '' + dataobject.school + '' +
  117. '<p class="mui-ellipsis"><span class="mui-icon mui-icon-location"></span>山西省太原市尖草坪区太钢医院上27号</p>' +
  118. '</div>' +
  119. '</a>' +
  120. '</li>';
  121. table.appendChild(li, table.firstChild);
  122. }
  123. }
  124. })
  125. }
  126. </script>
  127. </html>