qrcode.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. #printer{
  5. margin: 0 auto;
  6. width: 400px;
  7. height: 85%;
  8. background-color: #fff;
  9. padding: 10px;
  10. }
  11. #printer img{
  12. width: 100%;
  13. }
  14. #printer p{
  15. /*padding-top: 10px;*/
  16. text-align: center;
  17. }
  18. .ibox-tools{
  19. margin: 5px 10px;
  20. float: right;
  21. }
  22. .text-center{
  23. text-align: center;
  24. }
  25. </style>
  26. <!--<div class="ibox-tools">-->
  27. <!-- <a class="toback" href="{:url('index')}">-->
  28. <!-- 返回上一页-->
  29. <!-- </a>-->
  30. <!--</div>-->
  31. <div id="printer" class="text-center">
  32. <img src="{:url('Qrcode/qrcode')}?code={$code}" alt="">
  33. <p>{$info['title']}</p>
  34. </div>
  35. <div class="text-center">
  36. <br>
  37. <a href="javascript:;" class="btn btn-sm btn-primary" onclick="print()"><i class="glyphicon glyphicon-print"> 打印</i></a>
  38. <p><br></p>
  39. </div>
  40. <script src="/static/bootstrap-multiselect/docs/js/jquery-2.1.3.min.js"></script>
  41. <script src="/static/browser.js"></script>
  42. <script src="/static/jquery.jqprint-0.3.js"></script>
  43. <script>
  44. function print(){
  45. $("#printer").jqprint();
  46. }
  47. </script>
  48. {/block}