| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <!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" />
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <title>通讯录</title>
- <link href="css/mui.min.css" rel="stylesheet" />
- <link rel="stylesheet" href="css/iconfont.css" />
- <style>
- .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;
- }
- </style>
- </head>
- <body>
- <div class="">
- <div class="mui-content mui-scroll-wrapper" id="pullrefresh">
- <div class="mui-scroll">
- <ul class="mui-table-view mui-table-view-striped mui-table-view-condensed" id="">
- <li class="mui-table-view-cell">
- <div class="mui-input-row mui-search">
- <input type="search" class="mui-input-clear go_search" placeholder="请输入关键字" style="margin-bottom: 0;">
- </div>
- </li>
-
- </ul>
- <ul class="mui-table-view mui-table-view-striped mui-table-view-condensed TX" id="">
-
- </ul>
- </div>
- <!--右上角弹出菜单-->
- </div>
- </div>
- <script src="js/mui.min.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
- var a = localStorage.getItem("token");
- Ajax();
- $('.go_search').on('input focus', function() {
- keyw = $(this).val();
- console.log(keyw);
- Ajax(keyw);
- })
- function Ajax() {
- console.log(keyw);
- $(".TX").empty();
- mui.ajax(huayi.config.callcenter_url + 'AddressBook/GetAppList?', {
- data: {
- token: localStorage.getItem('token'),
- keyWord:keyw
- },
- dataType: 'json', //服务器返回json格式数据
- type: 'get', //HTTP请求类型
- timeout: 10000, //超时时间设置为10秒;
- headers: {
- 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
- },
- success: function(data) {
- if(data.state = "success") {
- console.log(data);
- var html;
- $(data.rows).each(function(i, n) {
- html = '<li data-group="'+n.NameOneCode+'" class="mui-table-view-divider mui-indexed-list-group">'+n.NameOneCode+'</li>';
- $(n.AddressBooklist).each(function(j, m) {
- html += '<li data-value="'+m.NameOneCode+'" data-tags="'+m.NameOneCode+'" class="mui-table-view-cell mui-indexed-list-item">'+
- '<div class="mui-slider-cell">'+
- '<a href="tel:'+m.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">'+m.F_Name+'</h4>'+
- '<span class="oa-contact-position mui-h6">'+m.F_Company+'</span>'+
- '<h4 class="oa-contact-email mui-h6">'+m.F_Mobile+'</h4>'+
- '</div>'+
- '</div>'+
- '</a>'+
- '</div>'+
- '</li>';
- })
- html += '</li>';
- $(html).appendTo($(".TX"));
- })
- // var header = document.querySelector('header.mui-bar');
- // var list = document.getElementById('list');
- // //calc hieght
- // list.style.height = (document.body.offsetHeight - header.offsetHeight) + 'px';
- // //create
- // window.indexedList = new mui.IndexedList(list);
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- mui.alert("");
- }
- });
- }
- });
-
- //点击两次就退出软件
-
-
- </script>
- </body>
- </html>
|