Ei kuvausta

tab-phone.html 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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. <style>
  10. html,
  11. body {
  12. height: 100%;
  13. overflow: hidden;
  14. }
  15. .mui-bar {
  16. -webkit-box-shadow: none;
  17. box-shadow: none;
  18. }
  19. .mui-indexed-list-group{
  20. }
  21. .mui-bar {
  22. -webkit-box-shadow: none;
  23. box-shadow: none;
  24. }
  25. .mui-bar-nav {
  26. background-color: #00a1cb;
  27. }
  28. .oa-contact-cell.mui-table .mui-table-cell {
  29. padding: 11px 0;
  30. vertical-align: middle;
  31. }
  32. .oa-contact-cell {
  33. position: relative;
  34. margin: -11px 0;
  35. }
  36. .oa-contact-avatar {
  37. width: 50px;
  38. }
  39. .oa-contact-avatar img {
  40. border-radius: 50%;
  41. width: 30px;
  42. height: 30px;
  43. }
  44. .oa-contact-content {
  45. width: 100%;
  46. }
  47. .oa-contact-name {
  48. margin-right: 10px;
  49. }
  50. .go_search {
  51. background: #fff!important;
  52. border: 1px solid #ccc!important;
  53. border-radius: 17px!important;
  54. }
  55. a {
  56. color: #000;
  57. }
  58. .mui-search.mui-active:before {
  59. top: 25px;
  60. }
  61. .oa-contact-position{
  62. margin-left: 15px;
  63. }
  64. </style>
  65. </head>
  66. <body>
  67. <div class="mui-content">
  68. <div id='list' class="mui-indexed-list" style="height: 100%;">
  69. <div class="mui-indexed-list-search mui-input-row mui-search">
  70. <input type="search" class="mui-input-clear mui-indexed-list-search-input" placeholder="搜索">
  71. </div>
  72. <div class="mui-indexed-list-bar">
  73. <a>A</a>
  74. <a>B</a>
  75. <a>C</a>
  76. <a>D</a>
  77. <a>E</a>
  78. <a>F</a>
  79. <a>G</a>
  80. <a>H</a>
  81. <a>I</a>
  82. <a>J</a>
  83. <a>K</a>
  84. <a>L</a>
  85. <a>M</a>
  86. <a>N</a>
  87. <a>O</a>
  88. <a>P</a>
  89. <a>Q</a>
  90. <a>R</a>
  91. <a>S</a>
  92. <a>T</a>
  93. <a>U</a>
  94. <a>V</a>
  95. <a>W</a>
  96. <a>X</a>
  97. <a>Y</a>
  98. <a>Z</a>
  99. </div>
  100. <div class="mui-indexed-list-alert"></div>
  101. <div class="mui-indexed-list-inner">
  102. <div class="mui-indexed-list-empty-alert">没有数据</div>
  103. <ul class="mui-table-view TX">
  104. </ul>
  105. </div>
  106. </div>
  107. </div>
  108. <script src="js/mui.min.js"></script>
  109. <script src="js/mui.indexedlist.js"></script>
  110. <script src="js/zepto.js"></script>
  111. <script src="js/huayi.config.js"></script>
  112. <script type="text/javascript" charset="utf-8">
  113. mui.init();
  114. mui.ready(function() {
  115. var keyw = '';
  116. mui('.mui-scroll-wrapper').scroll({
  117. deceleration: 0.0005
  118. }); //设置减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
  119. Ajax();
  120. function Ajax() {
  121. $(".TX").empty();
  122. mui.ajax(huayi.config.callcenter_url + 'AddressBook/GetAppList', {
  123. data: {
  124. token: localStorage.getItem('token')
  125. },
  126. dataType: 'json', //服务器返回json格式数据
  127. type: 'get', //HTTP请求类型
  128. timeout: 10000, //超时时间设置为10秒;
  129. headers: {
  130. 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
  131. },
  132. success: function(data) {
  133. if(data.state = "success") {
  134. var html;
  135. if (data.length>0) {
  136. $(data).each(function(i, n) {
  137. html= '<li data-group="'+n.code+'" data-value="'+n.NameOneCode+'" data-tags="'+n.NameOneCode+'" class="mui-table-view-cell mui-indexed-list-item">'+
  138. '<div class="mui-slider-cell">'+
  139. '<a href="tel:'+n.F_Mobile+'">'+
  140. '<div class="oa-contact-cell mui-table">'+
  141. '<div class="oa-contact-avatar mui-table-cell">'+
  142. '<img src="img/2.png"/>'+
  143. '</div>'+
  144. '<div class="oa-contact-content mui-table-cell">'+
  145. '<h4 class="oa-contact-name size-14">'+n.F_Name+
  146. '<span class="oa-contact-position mui-h6">'+n.F_Position+'</span></h4>'+
  147. '<h4 class="oa-contact-email mui-h5">'+n.F_Mobile+'</h4>'+
  148. '</div>'+
  149. '</div>'+
  150. '</a>'+
  151. '</div>'+
  152. '</li>';
  153. $(html).appendTo($(".TX"));
  154. })
  155. }
  156. }
  157. },
  158. error: function(xhr, type, errorThrown) {
  159. //异常处理;
  160. mui.alert("");
  161. }
  162. });
  163. }
  164. setTimeout(indexAjax,5000);
  165. function indexAjax () {
  166. var list = document.getElementById('list')
  167. //calc hieght
  168. list.style.height = (document.body.offsetHeight) + 'px';
  169. //create
  170. window.indexedList = new mui.IndexedList(list);
  171. }
  172. });
  173. </script>
  174. </body>
  175. </html>