liuxiaolong
2019-05-09 0d1d88cdb668e75ea8609417ac18ae19947e9525
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!doctype html>
<html>
 
    <head>
        <meta charset="UTF-8">
        <title></title>
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <link href="css/mui.min.css" rel="stylesheet" />
    </head>
    <body>
        <!--下拉刷新容器-->
        <div id="pullrefresh" class="mui-content mui-scroll-wrapper">
            <div class="mui-scroll">
                <!--数据列表-->
                <ul class="mui-table-view mui-table-view-chevron">
 
                </ul>
            </div>
        </div>
        <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
        <script src="js/mui.min.js"></script>
        <script src="js/common.js" ></script>
        <script type="text/javascript">
//        if(sessionCache.getSessionCashe("userToken") == null){
//            location.href="login.html";
//        }
        mui_.init({
            load:true,
            pull:true,
            callback:function(){
                mui.ajax(
                    serverUrl+"auth/panel/mycalendar/findPageList.json", {
                    data: JSON.stringify({
                        "page": mui_.loadMui.pageNum,
                        "size": 10,
                        "title": null,
                        "days": 0
                    }),
                    dataType:'json',
                    type: 'post', //HTTP请求类型
                    async : false,
                    headers: {
                        'Content-Type': 'application/json',
                        'Authorization': sessionCache.getSessionCashe("userToken")
                    },
                    success: function(data) {
                        if(data.code == 000){
                            mui_.loadMui.count = data.data.content.length;
                            mui.each(data.data.content,function(index,entity){
                                
                                var li = jQuery("<li class='mui-table-view-cell'><div class='mui-table-cell mui-col-xs'><h4 class='mui-ellipsis'>" + entity.title + "</h4><p class='mui-h6 mui-ellipsis-2'>开始时间:" + entity.start + "</p><p class='mui-h6 mui-ellipsis-2'>结束时间:" + entity.end + "</p></div></li>")
                                //下拉刷新,新纪录插到最前面;
                                $('.mui-table-view').prepend(li);
                            });
                        }
                    },
                    error: function(xhr, type, errorThrown) {
                        //异常处理;
                        console.log(type);
                    }
                });
            }
        });
        </script>
    </body>
 
</html>