商丘12345 前端

Phone-list.html 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title></title>
  7. <link href="../css/mui.min.css" rel="stylesheet" />
  8. <link href="../css/mui.indexedlist.css" rel="stylesheet" />
  9. <link rel="stylesheet" href="../css/iconfont.css" />
  10. <style>
  11. html,
  12. body {
  13. height: 100%;
  14. overflow: hidden;
  15. }
  16. .mui-bar {
  17. -webkit-box-shadow: none;
  18. box-shadow: none;
  19. }
  20. .oa-contact-cell.mui-table .mui-table-cell {
  21. padding: 5px 0;
  22. margin-right: 5px;
  23. vertical-align: middle;
  24. }
  25. .oa-contact-cell {
  26. position: relative;
  27. margin: -11px 0;
  28. }
  29. .oa-contact-avatar {
  30. width: 35px;
  31. }
  32. .oa-contact-avatar img {
  33. width: 40px;
  34. height: 40px;
  35. }
  36. .oa-contact-content {
  37. width: 60%;
  38. }
  39. .oa-contact-name {
  40. margin-right: 10px;
  41. }
  42. .oa-contact-name,
  43. oa-contact-position {
  44. float: left;
  45. }
  46. .size-14 {
  47. font-size: 14px;
  48. color: #4d4d4d;
  49. }
  50. .oa-contact-email {
  51. margin-top: 2px;
  52. }
  53. .yellow {
  54. background-color: #fa9d3b;
  55. width: 40px;
  56. height: 40px;
  57. }
  58. </style>
  59. </head>
  60. <body>
  61. <header class="mui-bar mui-bar-nav">
  62. <h1 id="title" class="mui-title">通讯录</h1>
  63. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  64. </header>
  65. <div class="mui-content">
  66. <div id='list' class="mui-indexed-list">
  67. <div class="mui-indexed-list-search mui-input-row mui-search">
  68. <input type="search" class="mui-input-clear mui-indexed-list-search-input" placeholder="搜索">
  69. </div>
  70. <div class="mui-indexed-list-bar">
  71. <a>A</a>
  72. <a>B</a>
  73. <a>C</a>
  74. <a>D</a>
  75. <a>E</a>
  76. <a>F</a>
  77. <a>G</a>
  78. <a>H</a>
  79. <a>I</a>
  80. <a>J</a>
  81. <a>K</a>
  82. <a>L</a>
  83. <a>M</a>
  84. <a>N</a>
  85. <a>O</a>
  86. <a>P</a>
  87. <a>Q</a>
  88. <a>R</a>
  89. <a>S</a>
  90. <a>T</a>
  91. <a>U</a>
  92. <a>V</a>
  93. <a>W</a>
  94. <a>X</a>
  95. <a>Y</a>
  96. <a>Z</a>
  97. </div>
  98. <div class="mui-indexed-list-alert"></div>
  99. <div class="mui-indexed-list-inner">
  100. <div class="mui-indexed-list-empty-alert">没有数据</div>
  101. <ul class="mui-table-view TX">
  102. </ul>
  103. </div>
  104. </div>
  105. </div>
  106. <script src="../js/zepto.js"></script>
  107. <script src="../js/mui.min.js"></script>
  108. <script src="../js/huayi.config.js"></script>
  109. <script src="../js/mui.indexedlist.js"></script>
  110. <script type="text/javascript" charset="utf-8">
  111. window.onload=function(){
  112. mui.plusReady(function() {
  113. mui('.mui-scroll-wrapper').scroll({
  114. deceleration: 0.0005
  115. });
  116. var wv = plus.webview.currentWebview();
  117. var rolecodeid=wv.ids;
  118. console.log(rolecodeid);
  119. plus.nativeUI.closeWaiting();
  120. //显示当前页面
  121. mui.currentWebview.show();
  122. mui.ajax(huayi.config.callcenter_url + 'Index/GetRoleList?', {
  123. data: {
  124. token: localStorage.getItem('token'),
  125. rolecodeid:rolecodeid
  126. },
  127. dataType: 'json', //服务器返回json格式数据
  128. type: 'get', //HTTP请求类型
  129. timeout: 10000, //超时时间设置为10秒;
  130. headers: {
  131. 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
  132. },
  133. success: function(data) {
  134. if(data.state = "success") {
  135. var html
  136. $(data.rows).each(function(i, n) {
  137. html = '<li data-group="'+n.NameOneCode+'" class="mui-table-view-divider mui-indexed-list-group">'+n.NameOneCode+'</li>';
  138. $(n.AddressBooklist).each(function(j, m) {
  139. html += '<li data-value="'+m.NameOneCode+'" data-tags="'+m.NameOneCode+'" class="mui-table-view-cell mui-indexed-list-item">'+
  140. '<div class="mui-slider-cell">'+
  141. '<div class="oa-contact-cell mui-table">'+
  142. '<div class="oa-contact-avatar mui-table-cell">'+
  143. '<img src="../img/2.png"/>'+
  144. '</div>'+
  145. '<div class="oa-contact-content mui-table-cell">'+
  146. '<h4 class="oa-contact-name size-14">'+m.F_Name+'</h4>'+
  147. '<span class="oa-contact-position mui-h6">'+m.F_Position+'</span>'+
  148. '<h4 class="oa-contact-email mui-h6">'+m.F_Mobile+'</h4>'+
  149. '</div>'+
  150. '</div>'+
  151. '</div>'+
  152. '</li>';
  153. })
  154. html += '</li>';
  155. $(html).appendTo($(".TX"));
  156. })
  157. var header = document.querySelector('header.mui-bar');
  158. var list = document.getElementById('list');
  159. //calc hieght
  160. list.style.height = (document.body.offsetHeight - header.offsetHeight) + 'px';
  161. //create
  162. window.indexedList = new mui.IndexedList(list);
  163. }
  164. },
  165. error: function(xhr, type, errorThrown) {
  166. //异常处理;
  167. mui.alert("");
  168. }
  169. });
  170. });
  171. }
  172. </script>
  173. </body>
  174. </html>