consume.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {php define(MUI, true);}
  2. {template 'common/header'}
  3. <style>
  4. ul,li {padding:0; margin:0; border:0;}
  5. body{background:#d2e6e9; padding-bottom:63px;}
  6. .btn-group-top-box{padding:10px 0; border-bottom:1px solid #a5d7de; font-family:Helvetica, Arial, sans-serif; text-align:center; width:100%;}
  7. .btn-group-top{overflow:hidden;}
  8. .btn-group-top .btn{ -webkit-box-shadow:none; box-shadow:none; border-color:#5ac5d4; color:#5ac5d4; background:#d1e5e9; padding:6px;}
  9. .btn-group-top .btn:hover{color:#FFF; background:#addbe1;}
  10. .btn-group-top .btn.active{color:#FFF; background:#5ac5d4;}
  11. .btn.use{background:#56c6d6; color:#FFF; border:0; border-radius:4px;}
  12. .card-container{width:100%;max-width:640px;margin:0px auto;border-bottom:1px solid #a5d7de;}
  13. .card-list{width:100%;margin:10px 0;padding:0 13px}
  14. .card-list .top{height:60px;line-height:60px;background:#a9d92d url(./resource/images/card_tpl.png) repeat-x 0 bottom;border-top-left-radius:5px;border-top-right-radius:5px;}
  15. .card-list .top .img{float:left;padding:0 10px}
  16. .card-list .top .img img{width:40px;height:40px;border-radius:35px;}
  17. .card-list .top .title{float:left;color:#FFF;font-weight:bold;font-size:16px;letter-spacing:1px}
  18. .card-list .bottom{color:#b7b7b7;height:30px;line-height:30px;background:#FFF;padding:0 6px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;}
  19. .card-list .bottom .left-info{float:left;width:50%;overflow:hidden;}
  20. .card-list .bottom .right-info{float:right;width:50%;overflow:hidden;text-align:right;}
  21. .no-info{width:100%;padding:0 20px;text-align:center;height:40px;line-height:40px;color:#5ac5d4}
  22. .page{width:100%;margin:0 auto;text-align:center;}
  23. .page .pagination{padding:0;margin:0;}
  24. .page .pagination a{color:#5ac5d4;background:#d2e6e9;border:1px solid #a5d7de;}
  25. .page .pagination a:hover{color:#FFF;background:#addbe1;border:1px solid #a5d7de;}
  26. .card-info .card-top{ position:relative; width:100%; color:#fff; background-color:#a9d92d; padding:21px 12px 12px;}
  27. .card-top .logo img{width:38px; height:38px; border-radius:100%; margin-right:10px;}
  28. .card-top .title{font-size:24px; margin-bottom:10px;}
  29. .card-top .sub-title{margin-bottom:10px;}
  30. .card-top .border-img{position: absolute; bottom: -1px; left: 0; width: 100%; height: 5px; background: url(./resource/images/card_tpl.png) repeat-x;}
  31. .card-bottom{background:#fff; margin-bottom:15px; text-align:center; padding:15px 0;}
  32. .card-bottom .bar-code img{width:100%; height:auto; margin-bottom:5px;}
  33. .card-bottom .tips{margin:10px 0;}
  34. .wx-card .operate{background:#fff; padding:15px 10px;}
  35. .wx-card .operate input{margin-bottom:5px;}
  36. </style>
  37. <form action="" method="post" id="form1">
  38. <input type="hidden" name="token" value="{$_W['token']}"/>
  39. <input type="hidden" name="code" value="{$code['code']}"/>
  40. <div class="wx-card">
  41. <div class="card-info">
  42. <div class="card-top" style="background: {$colors[$card['color']]}">
  43. <div class="logo">
  44. <img src="{$card['logo_url']}" alt="" class="img-circle">
  45. <span>{$card['brand_name']}</span>
  46. </div>
  47. <div class="title mui-text-center">{$card['title']}</div>
  48. <div class="sub-title mui-text-center">{$card['sub_title']}</div>
  49. <div class="date mui-text-center">
  50. {if $card['date_info']['time_type'] == 1}
  51. 有效期:{$card['date_info']['time_limit_start']}~{$card['date_info']['time_limit_end']}
  52. {else}
  53. 有效期:领取后{$card['date_info']['deadline']}天后生效,{$card['date_info']['limit']}天有效
  54. {/if}
  55. </div>
  56. <div class="border-img"></div>
  57. </div>
  58. <div class="card-bottom">
  59. {if $error_code == 1}
  60. <div class="text-muted">code码错误</div>
  61. {else}
  62. <div class="qrcode-block" data-url="{php echo murl('entry', array('m' => 'paycenter', 'do' => 'cardconsume', 'op' => 'consume', 'code' => $code), true, true);}" style="margin-top:20px"></div>
  63. <div class="text-muted">店员可使用微信扫描上面二维码进行核销</div>
  64. <div class="text-muted">code码:{$code}</div>
  65. {/if}
  66. <div class="tips hide">{$card['notice']}</div>
  67. </div>
  68. </div>
  69. <div class="operate">
  70. {if $error_code == 1}
  71. <a class="btn btn-danger btn-block" disabled>code码错误</a>
  72. {else}
  73. <input type="password" id="password" name="password" class="form-control" placeholder="请输入店员密码" style="margin-bottom:20px">
  74. <input type="submit" class="btn btn-success btn-block" name="submit" value="确定核销"/>
  75. {/if}
  76. </div>
  77. </div>
  78. </form>
  79. <script>
  80. require(['jquery.qrcode'], function(){
  81. var url = $('.qrcode-block').data('url');
  82. $('.qrcode-block').html('').qrcode({
  83. render: 'canvas',
  84. width: 150,
  85. height: 150,
  86. text: url
  87. });
  88. });
  89. require(['util'], function(u){
  90. $('#form1').submit(function(){
  91. if(!$.trim($('#password').val())) {
  92. u.message('请输入店员密码');
  93. return false;
  94. }
  95. return true;
  96. });
  97. });
  98. </script>
  99. {template 'common/footer'}