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.

92 lines
4.0 KiB

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>
  10. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  11. <style>
  12. .bonus_list .flow-have-adr{padding:10px;margin:10px;background-color:#fff;}
  13. .bonus_list .f-h-adr-title .ect-colory{color:#f45239;font-size:32px;}
  14. .bonus_list .f-h-adr-title label{font-size:18px;color:#2e2e2e;margin-right:5px;}
  15. .bonus_list .f-h-adr-con{color:#616161;margin-top:5px;margin-bottom:5px;font-size:14px;}
  16. .bonus_list .adr-edit-del{margin-top:10px;padding-top:8px;border-top:1px dashed #ddd;line-height:22px;color:#a0a0a0;font-size:14px;}
  17. </style>
  18. <div class="bonus_list">
  19. <?php if($list){foreach($list as $k=>$v){ ?>
  20. <div class="flow-have-adr">
  21. <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>
  22. <p class="f-h-adr-con">有效期至<?php echo $v['bonus']['end_time']; ?> <span class="fr">满<?php echo $v['bonus']['min_amount']; ?>可用</span></p>
  23. <!-- <div class="adr-edit-del">说明</div> -->
  24. </div>
  25. <?php }}else{ ?>
  26. <div style="text-align:center;line-height:40px;color:#999;">暂无记录</div>
  27. <?php } ?>
  28. </div>
  29. <script>
  30. $(function(){
  31. var ajaxload = false;
  32. var maxpage = false;
  33. var startpage = 1;
  34. var totalpage = <?php echo $totalpage; ?>;
  35. var tmp_url = window.location.href;
  36. msg = tmp_url.split("#");
  37. tmp_url = msg[0];
  38. $(window).scroll(function ()
  39. {
  40. var listheight = $(".bonus_list").outerHeight();
  41. if ($(document).scrollTop() + $(window).height() >= listheight)
  42. {
  43. if(startpage >= totalpage)
  44. {
  45. //$("#submit_bt_one").html("已是最后一页,没有更多数据!");
  46. return false;
  47. }
  48. if(!ajaxload && !maxpage)
  49. {
  50. ajaxload = true;
  51. //$("#submit_bt_one").html("努力加载中...");
  52. var url = tmp_url;
  53. var nextpage = startpage+1;
  54. $.get(url,{page_ajax:1,page:nextpage},function(res)
  55. {
  56. if(res)
  57. {
  58. $(".bonus_list").append(res);
  59. startpage++;
  60. if(startpage >= totalpage)
  61. {
  62. maxpage = true;
  63. //$("#submit_bt_one").html("已是最后一页,没有更多数据!");
  64. }
  65. else
  66. {
  67. //$("#submit_bt_one").html("点击加载更多");
  68. }
  69. ajaxload = false;
  70. }
  71. else
  72. {
  73. //$("#submit_bt_one").html("请求失败,请稍候再试!");
  74. ajaxload = false;
  75. }
  76. },'json');
  77. }
  78. }
  79. });
  80. });
  81. </script>
  82. @include('weixin.common.footer')
  83. </body></html>