123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
- <title>抽奖记录</title>
- <link rel="stylesheet" href="__STATIC__/box/css/_flexible.css?v={:config('js_version')}">
- <link rel="stylesheet" href="__STATIC__/box/css/log.css?v={:config('js_version')}">
- <script src="__STATIC__/box/js/flexible375.js?v={:config('js_version')}"></script>
- </head>
- <body>
- <div class="tab">
- <a class="tab_cell" href="{:url('exchange/log/'.$wx_app_id)}?v={:config('js_version')}">兑换记录</a>
- <a class="tab_cell active" href="{:url('lottery/log/'.$wx_app_id)}?v={:config('js_version')}">抽奖记录</a>
- </div>
- <div class="lotteryList">
- <ul class="js-template">
- <foreach name="list" item="vo">
- <li class="lotteryList_item">
- <span class="money">{$vo.title}</span>
- <span class="time">{$vo.time}</span>
- </li>
- </foreach>
- </ul>
- </div>
- <script src="__STATIC__/box/js/jquery.js"></script>
- <script>
- $(function () {
- var params = {
- format: 'json',
- page: 1,
- offset: 10
- };
- var get = 0
- $(window).bind('scroll', function(){
- var h=$(document.body).height()
- var c = $(window).scrollTop()
- var wh = $(window).height()
- if (Math.ceil(wh+c)>=h-10){
- getLog()
- }
- });
- function getLog() {
- if (get) return false
- get = 1
- params.page = ++params.page
- $.ajax({
- url: '/lottery/log/{$wx_app_id}',
- data: params,
- type: 'post',
- success: function (res) {
- var _html = ''
- for (var i = 0; i < res.data.list.length; i++) {
- _html += '<li class="lotteryList_item">\n' +
- ' <span class="money">'+res.data.list[i].title+'</span>\n' +
- ' <span class="time">'+res.data.list[i].time+'</span>\n' +
- ' </li>';
- }
- $('.js-template').append(_html)
- if ($('.js-template .content_item').length >= res.data.count) {
- $(window).unbind('scroll')
- }
- get = 0
- },
- error: function () {
- get = 0
- }
- })
- }
- })
- </script>
- </body>
- </html>
|