You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
4.1 KiB

7 years ago
7 years ago
  1. <!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  2. <title>我的优惠券</title><meta name="keywords" content=""><meta name="description" content=""><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
  3. <link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
  4. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
  5. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script></head><body style="background-color:#f1f1f1;">
  6. <div class="classreturn loginsignup">
  7. <div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
  8. <div class="ds-in-bl tit center"><span>我的优惠券</span></div>
  9. <div class="ds-in-bl nav_menu"><a href="<?php echo route('weixin_bonus_list'); ?>" style="color:#999;">领券</a></div>
  10. </div>
  11. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  12. <style>
  13. .bonus_list .flow-have-adr{padding:10px;margin:10px;background-color:#fff;}
  14. .bonus_list .f-h-adr-title .ect-colory{color:#f45239;font-size:32px;}
  15. .bonus_list .f-h-adr-title label{font-size:18px;color:#2e2e2e;margin-right:5px;}
  16. .bonus_list .f-h-adr-con{color:#616161;margin-top:5px;margin-bottom:5px;font-size:14px;}
  17. .bonus_list .adr-edit-del{margin-top:10px;padding-top:8px;border-top:1px dashed #ddd;line-height:22px;color:#a0a0a0;font-size:14px;}
  18. </style>
  19. <div class="bonus_list">
  20. <?php if($list){foreach($list as $k=>$v){ ?>
  21. <div class="flow-have-adr">
  22. <p class="f-h-adr-title"><label><?php echo $v['bonus']['name']; ?></label><span class="ect-colory fr"><small>¥</small><?php echo $v['bonus']['money']; ?></span><div class="cl"></div></p>
  23. <p class="f-h-adr-con">有效期至<?php echo $v['bonus']['end_time']; ?> <span class="fr">满<?php echo $v['bonus']['min_amount']; ?>可用</span></p>
  24. <!-- <div class="adr-edit-del">说明</div> -->
  25. </div>
  26. <?php }}else{ ?>
  27. <div style="text-align:center;line-height:40px;color:#999;">暂无记录</div>
  28. <?php } ?>
  29. </div>
  30. <script>
  31. $(function(){
  32. var ajaxload = false;
  33. var maxpage = false;
  34. var startpage = 1;
  35. var totalpage = <?php echo $totalpage; ?>;
  36. var tmp_url = window.location.href;
  37. msg = tmp_url.split("#");
  38. tmp_url = msg[0];
  39. $(window).scroll(function ()
  40. {
  41. var listheight = $(".bonus_list").outerHeight();
  42. if ($(document).scrollTop() + $(window).height() >= listheight)
  43. {
  44. if(startpage >= totalpage)
  45. {
  46. //$("#submit_bt_one").html("已是最后一页,没有更多数据!");
  47. return false;
  48. }
  49. if(!ajaxload && !maxpage)
  50. {
  51. ajaxload = true;
  52. //$("#submit_bt_one").html("努力加载中...");
  53. var url = tmp_url;
  54. var nextpage = startpage+1;
  55. $.get(url,{page_ajax:1,page:nextpage},function(res)
  56. {
  57. if(res)
  58. {
  59. $(".bonus_list").append(res);
  60. startpage++;
  61. if(startpage >= totalpage)
  62. {
  63. maxpage = true;
  64. //$("#submit_bt_one").html("已是最后一页,没有更多数据!");
  65. }
  66. else
  67. {
  68. //$("#submit_bt_one").html("点击加载更多");
  69. }
  70. ajaxload = false;
  71. }
  72. else
  73. {
  74. //$("#submit_bt_one").html("请求失败,请稍候再试!");
  75. ajaxload = false;
  76. }
  77. },'json');
  78. }
  79. }
  80. });
  81. });
  82. </script>
  83. @include('weixin.common.footer')
  84. </body></html>