<!DOCTYPE HTML>
<html>
<head>
<{include file="block/sheader.html"}>
</head>

<body>
<header>
	<i class="left"><a href="<{link ctl='index/index'}>" class="ico headerIco headerIco_3"></a></i>
    <div class="title">
    	消息中心
    </div>
    <i class="right"><a href="#" class=""></a></i>
</header>
<section class="page_center_box">
    <div class="redbagLsit">
        <div id="wrapper" style="height:600px; position: relative;">
        <ul class="message_list_box">  
        </ul> 
        </div>
    </div>
</section>
<script id="data_list" type="text/x-jquery-tmpl">
    {{if type==1}}<a href="<{link ctl='ucenter/hongbao:index'}>">{{else type==2}}<a href="<{link ctl='order/detail' args='${order_id}'}>">{{/if}}
    {{if is_read == 0}}<li class="message_list">{{else}}<li class="message_list no">{{/if}}
        {{if type == 1}}<div class="fl"><em class="ico ico_1"></em></div>{{else type == 2}}<div class="fl"><em class="ico ico_2"></em></div>{{else}}<div class="fl"><em class="ico ico_1"></em></div>{{/if}}
        <div class="wz">
            <p class="black3"><span class="bt">${title}</span><span class="fr black9 date">${dateline}</span></p>
            <p class="black6">${content}</p>
        </div>
        <div class="clear"></div>
    </li>
    </a>
</script>
<script type="text/javascript">
    var page = 1;
    var wapper = document.querySelector("#wrapper ul");
    var url = "<{link ctl='ucenter/message:msglist' }>";
    build_refresher_items(url, {page: 1}, "#data_list", wapper);
    refresher.init({
        id: "wrapper",
        pullDownAction: function () {
            post_json = {page: 1};
            $("#wrapper ul").html("");
            $("#pullUp").hide();
            build_refresher_items(url, post_json, '#data_list', wapper);
            page = 1;
            myScroll.refresh();
        },
        pullUpAction: function () {
            page++;
            post_json = {page: page};
            build_refresher_items(url, post_json, '#data_list', wapper);
            myScroll.refresh();
        },
    });
    //setmsgisread();
</script>
</body>
</html>
