| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <title></title>
- <link href="css/mui.min.css" rel="stylesheet" />
- <link href="css/mui.indexedlist.css" rel="stylesheet" />
- <style>
- .mui-bar {
- -webkit-box-shadow: none;
- box-shadow: none;
- }
- .mui-indexed-list-group{
-
- }
- .mui-bar {
- -webkit-box-shadow: none;
- box-shadow: none;
- }
-
- .mui-bar-nav {
- background-color: #00a1cb;
- }
-
- .oa-contact-cell.mui-table .mui-table-cell {
- padding: 11px 0;
- vertical-align: middle;
- }
-
- .oa-contact-cell {
- position: relative;
- margin: -11px 0;
- }
-
- .oa-contact-avatar {
- width: 50px;
- }
-
- .oa-contact-avatar img {
- border-radius: 50%;
- width: 30px;
- height: 30px;
- }
-
- .oa-contact-content {
- width: 100%;
- }
-
- .oa-contact-name {
- margin-right: 10px;
- }
-
- .go_search {
- background: #fff!important;
- border: 1px solid #ccc!important;
- border-radius: 17px!important;
- }
- a {
- color: #000;
- }
- .mui-search.mui-active:before {
- top: 25px;
- }
- .oa-contact-position{
- margin-left: 15px;
- }
- </style>
- </head>
- <body>
- <div class="mui-content">
- <div id='list' class="mui-indexed-list" style="height: 100%;">
- <div class="mui-indexed-list-search mui-input-row mui-search">
- <input type="search" class="mui-input-clear mui-indexed-list-search-input" placeholder="搜索">
- </div>
- <div class="mui-indexed-list-bar">
- <a>A</a>
- <a>B</a>
- <a>C</a>
- <a>D</a>
- <a>E</a>
- <a>F</a>
- <a>G</a>
- <a>H</a>
- <a>I</a>
- <a>J</a>
- <a>K</a>
- <a>L</a>
- <a>M</a>
- <a>N</a>
- <a>O</a>
- <a>P</a>
- <a>Q</a>
- <a>R</a>
- <a>S</a>
- <a>T</a>
- <a>U</a>
- <a>V</a>
- <a>W</a>
- <a>X</a>
- <a>Y</a>
- <a>Z</a>
- </div>
- <div class="mui-indexed-list-alert"></div>
- <div class="mui-indexed-list-inner">
- <div class="mui-indexed-list-empty-alert">没有数据</div>
- <ul class="mui-table-view TX" id="tabalList"></ul>
- </div>
- </div>
- </div>
- <script src="js/mui.min.js"></script>
- <script src="js/mui.lazyload.js"></script>
- <script src="js/mui.lazyload.img.js"></script>
- <script src="js/mui.indexedlist.js"></script>
- <script src="js/zepto.js"></script>
- <script src="js/huayi.config.js"></script>
- <script type="text/javascript" charset="utf-8">
- mui.init();
- mui.ready(function() {
- var keyw = '';
- mui('.mui-scroll-wrapper').scroll({
- deceleration: 0.0005
- }); //设置减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
- Ajax();
- function Ajax() {
- $(".TX").empty();
- mui.ajax(huayi.config.callcenter_url + '/AddressBook/GetAppList', {
- data: {
- token: localStorage.getItem('token')
- },
- dataType: 'json', //服务器返回json格式数据
- type: 'post', //HTTP请求类型
- timeout: 10000, //超时时间设置为10秒
- success: function(data) {
- if (data.state = "success") {
- var html="";
- alert(JSON.stringify(data))
- if (data.length > 0) {
-
- for (var i=0; i<data.length; i++) {
- html += '<li data-group="' + data[i].code + '" data-value="' + data[i].NameOneCode + '" data-tags="' + data[i].NameOneCode +
- '" class="mui-table-view-cell mui-indexed-list-item">' +
- '<div class="mui-slider-cell">' +
- '<a href="tel:' + data[i].F_Mobile + '">' +
- '<div class="oa-contact-cell mui-table">' +
- '<div class="oa-contact-avatar mui-table-cell">' +
- '<img src="img/2.png"/>' +
- '</div>' +
- '<div class="oa-contact-content mui-table-cell">' +
- '<h4 class="oa-contact-name size-14">' + data[i].F_Name +
- '<span class="oa-contact-position mui-h6">' + data[i].F_Area + "-" + data[i].F_Offce + "-" + data[i].F_Position +
- '</span></h4>' +
- '<h4 class="oa-contact-email mui-h5">' + data[i].F_Mobile + '</h4>' +
- '</div>' +
- '</div>' +
- '</a>' +
- '</div>' +
- '</li>';
- if(i==data.length){
- alert(i)
- }
- }
-
- //alert(html);
- document.getElementById("tabalList").innerHTML=html
- //$(html).appendTo($(".TX"));
- }
-
-
- }
- },
- error: function(xhr, type, errorThrown) {}
- });
-
- }
-
-
-
- setTimeout(indexAjax, 5000);
- function indexAjax() {
- var list = document.getElementById('list')
- //calc hieght
- list.style.height = (document.body.offsetHeight) + 'px';
- //create
- window.indexedList = new mui.IndexedList(list);
- }
-
- });
- // (function($) {
- // var list = document.getElementById("list");
- // list.appendChild(createFragment(50));
- // $(document).imageLazyload({
- // placeholder: '../images/60x60.gif'
- // });
- // })(mui);
- </script>
- </body>
- </html>
|