123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport"
- content="width=user-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
- <link rel="stylesheet" href="/static/dropload-gh-pages/dropload.css">
- <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
- <script type="text/javascript" src="/static/dropload-gh-pages/dropload.min.js"></script>
- <script type="text/javascript" src="/static/layer/layer.js"></script>
- <link rel="stylesheet" href="/static/h5/css/common.css">
- <title>列表</title>
- <style>
- body{
- background-color: #F1F1F1;
- }
- .container{
- max-width: 750px;
- height: auto;
- margin: 0 auto;
- padding: 0px 6px;
- }
- .user-record-lists{
- width: 100%;
- height: auto;
- }
- .user-record{
- width: 100%;
- height: 120px;
- border-radius: 10px;
- margin-top: 5px;
- background-color: #ffffff;
- padding: 0px 13px;
- overflow: hidden;
- }
- .head-img{
- width: 100%;
- height: 60px;
- line-height: 60px;
- display: inline-block;
- }
- .head-img img{
- width: 45px;
- height: 45px;
- border-radius: 50%;
- }
- .user-record-title{
- display: inline-block;
- /*width: 150px;*/
- height: 60px;
- line-height: 60px;
- font-size: 15px;
- font-weight: 600;
- letter-spacing: 1px;
- padding-left: 20px;
- }
- .user-record-content{
- width: 100%;
- height: 60px;
- }
- .user-record-user{
- width: 100%;
- height: 30px;
- line-height: 30px;
- border-bottom: 1px solid #f1f1f1;
- }
- .left{
- line-height: 30px;
- font-size: 14px;
- }
- .right{
- line-height: 30px;
- font-size: 13px;
- color: #A9A9A9;
- float: right;
- }
- .user-record-time{
- width: 100%;
- height: 30px;
- line-height: 30px;
- }
- .nulldata{
- width: 100%;
- height: 200px;
- text-align: center;
- position: fixed;
- top: 22%;
- }
- .nulldata img{
- width: 200px;
- height: 160px;
- text-align: center;
- }
- .nulldata-text{
- margin-top: 15px;
- font-size: 14px;
- letter-spacing: 2px;
- text-align: center;
- }
- .footer-back{
- position: fixed;
- z-index: 1000;
- width: 100%;
- height: 45px;
- line-height: 45px;
- background-color: #ffffff;
- bottom: 0;
- left: 0;
- box-shadow: 0px 0px 10px 0px rgba(26, 25, 26, 0.05);
- display: table-cell;
- vertical-align: middle;
- text-align: center;
- }
- .footer-back a img{
- width: 43px;
- height: 43px;
- }
- </style>
- </head>
- <body>
- {if $list}
- <div class="container">
- <div class="user-record-lists">
- {foreach $list as $k=>$v}
- <div class="user-record">
- <div class="head-img">
- {if !empty($v['head_image'])}
- <img src="{$v['head_image']}">
- {else /}
- <img src="/img/defaulthead.png">
- {/if}
- <div class="user-record-title">{$v['real_name']}</div>
- </div>
- <div class="user-record-content">
- <div class="user-record-user">
- <text class="left">联系电话:</text>
- <text class="right">{$v['mobile']}</text>
- </div>
- <div class="user-record-time">
- <text class="left">创建时间:</text>
- <text class="right">{$v['create_time']}</text>
- </div>
- </div>
- </div>
- {/foreach}
- </div>
- </div>
- {else /}
- <div class="nulldata">
- <img src="/img/nulldata.png" alt="">
- <div class="nulldata-text">空空如也 ~</div>
- </div>
- {/if}
- <div class="footer-back">
- <a href="javascript:;" onclick="javascript:history.back(-1);"><img src="/img/back.png"></a>
- </div>
- </body>
- </html>
- <script>
- var orgId = '{$orgId}';
- var rolesId = '{$rolesId}';
- $(function(){
- // 页数
- var page = 1;
- // 每页展示20个
- var size = 10;
- // dropload
- $('.container').dropload({
- scrollArea : window,
- domDown : {
- domClass : 'dropload-down',
- domRefresh : '<div class="dropload-refresh">↑上拉加载更多</div>',
- domLoad : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
- domNoData : '<div class="dropload-noData"></div>'
- },
- loadDownFn : function(me){
- page++;
- // 拼接HTML
- var result = '';
- var url= "{:url('userList')}";
- $.ajax({
- type: 'GET',
- url: url+'?page='+page+'&size='+size+'&orgId='+orgId+'&rolesId='+rolesId,
- dataType: 'json',
- success: function(res){
- var data = res.data;
- var arrLen = data.length;
- if(arrLen > 0){
- for(var i = 0; i < data.length; i++){
- if(arrLen > 0){
- result +='<div class="user-record">';
- result +='<div class="head-img">';
- if(data[i].headImage){
- result +='<img src="'+data[i].headImage+'">';
- }else {
- result +='<img src="/img/defaulthead.png">';
- }
- result +='<div class="user-record-title">'+data[i].realName+'</div>';
- result +='</div>';
- result +='<div class="user-record-content">';
- result +='<div class="user-record-user">';
- result +='<text class="left">联系电话:</text>';
- result +='<text class="right">'+data[i].mobile+'</text>';
- result +='</div>';
- result +='<div class="user-record-time">';
- result +='<text class="left">创建时间:</text>';
- result +='<text class="right">'+data[i].createTime+'</text>';
- result +='</div>';
- result +='</div>';
- result +='</div>';
- }
- }
- // 如果没有数据
- }else{
- // 锁定
- me.lock();
- // 无数据
- me.noData();
- }
- //延迟1秒加载
- setTimeout(function(){
- // 插入数据到页面,放到最后面
- $('.user-record-lists').append(result);
- // 每次数据插入,必须重置
- me.resetload();
- },1000);
- },
- error: function(xhr, type){
- // 即使加载出错,也得重置
- me.resetload();
- }
- });
- },
- threshold : 50
- });
- });
- </script>
|