123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <!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 active" href="{:url('exchange/log/'.$wx_app_id)}?v={:config('js_version')}">兑换记录</a>
- <a class="tab_cell" href="{:url('lottery/log/'.$wx_app_id)}?v={:config('js_version')}">抽奖记录</a>
- </div>
- <div class="exchangeList">
- <ul class="js-template">
- <foreach name="list" item="vo">
- <li class="exchangeList_item">
- <div class="info">
- <h1 class="title">{$vo.title}</h1>
- <p class="time">{$vo.time}</p>
- </div>
- <div class="money">-{$vo.integral}金币</div>
- </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 : '/exchange/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="exchangeList_item">\n' +
- ' <div class="info">\n' +
- ' <h1 class="title">' + res.data.list[i].title + '</h1>\n' +
- ' <p class="time">' + res.data.list[i].time + '</p>\n' +
- ' </div>\n' +
- ' <div class="money">-' + res.data.list[i].integral + '金币</div>\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>
|