codedetail.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
  6. <title>JSTYLE精美</title>
  7. <link href="css/global.css?v=3f8cf811" rel="stylesheet"><link href="css/codedetail.css?v=3f8cf811" rel="stylesheet"></head>
  8. <body>
  9. <div class="tips">
  10. <p>温馨提示:</p>
  11. <p>兑换码只能被激活一次,当您购买成功后,可进入<span id="product_name">小程序</span>使用兑换码查看电子刊,若您购买了多本,可将剩余兑换码赠送好友。</p>
  12. </div>
  13. <div class="btn-wrap">
  14. <a href="javascript:;" node-act="read" class="button black">阅读电子刊</a>
  15. </div>
  16. <div class="code-list pages">
  17. <dl>
  18. <dd>
  19. <p><i class="ico-code"></i>兑换码:675386834</p>
  20. <span class="used">已使用</span>
  21. </dd>
  22. <dt>
  23. <a href="javascript:;" class="button disabled">复制</a>
  24. </dt>
  25. </dl>
  26. <dl>
  27. <dd>
  28. <p><i class="ico-code"></i>兑换码:675386834</p>
  29. <span>未使用</span>
  30. </dd>
  31. <dt>
  32. <a href="javascript:;" class="button" node-id="copy" data-clipboard-text="675386834">复制</a>
  33. </dt>
  34. </dl>
  35. <dl>
  36. <dd>
  37. <p><i class="ico-code"></i>兑换码:675386834</p>
  38. <span class="used">已使用</span>
  39. </dd>
  40. <dt>
  41. <a href="javascript:;" class="button disabled">复制</a>
  42. </dt>
  43. </dl>
  44. <dl>
  45. <dd>
  46. <p><i class="ico-code"></i>兑换码:675386834</p>
  47. <span>未使用</span>
  48. </dd>
  49. <dt>
  50. <a href="javascript:;" class="button" node-id="copy" data-clipboard-text="675386833">复制</a>
  51. </dt>
  52. </dl>
  53. <dl>
  54. <dd>
  55. <p><i class="ico-code"></i>兑换码:675386834</p>
  56. <span class="used">已使用</span>
  57. </dd>
  58. <dt>
  59. <a href="javascript:;" class="button disabled">复制</a>
  60. </dt>
  61. </dl>
  62. <dl>
  63. <dd>
  64. <p><i class="ico-code"></i>兑换码:675386834</p>
  65. <span>未使用</span>
  66. </dd>
  67. <dt>
  68. <a href="javascript:;" class="button" node-id="copy" data-clipboard-text="675386832">复制</a>
  69. </dt>
  70. </dl>
  71. </div>
  72. <div class="success fn-hide" id="success">复制成功</div>
  73. <div class="mask fn-hide" id="layer">
  74. <div class="layer read-layer">
  75. <div class="qrcode-wrap">
  76. <img src="images/qrcode.png" alt="" class="default" id="code">
  77. <p>长按识别<span id="product_name">小程序</span>阅读电子刊</p>
  78. </div>
  79. <a href="javascript:;" class="btn-close" id="close"></a>
  80. </div>
  81. </div>
  82. <script type="text/javascript" src="js/global.js?v=3f8cf811"></script><script type="text/javascript" src="js/codedetail.js?v=3f8cf811"></script></body>
  83. <script src="https://cdn.bootcss.com/clipboard.js/2.0.4/clipboard.min.js"></script>
  84. <script>
  85. function init(){
  86. var timer;
  87. var clipboard = new ClipboardJS('[node-id="copy"]');
  88. clipboard.on('success', function (e) {
  89. $('#success').removeClass('fn-hide');
  90. clearTimeout(timer);
  91. timer = setTimeout(function () {
  92. $('#success').addClass('fn-hide');
  93. }, 3000)
  94. console.log(e.trigger)
  95. e.clearSelection();
  96. });
  97. $('[node-act="read"]').on('click',function(){
  98. $('#layer').show();
  99. })
  100. $('#close').on('click',function(){
  101. $('#layer').hide();
  102. });
  103. }
  104. init();
  105. </script>
  106. </html>