subscribe.blade.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  6. <meta content="telephone=no" name="format-detection"/>
  7. <meta content="yes" name="apple-mobile-web-app-capable"/>
  8. <link rel=icon type=image/png href="data:image/png;base64,iVBORw0KGgo=">
  9. <title>【支持正版】</title>
  10. <style>
  11. body {
  12. background-color: #fff8f5;
  13. font-size: 12px;
  14. }
  15. .mainbody {
  16. text-align: center;
  17. display: inline-block;
  18. width: 100%;
  19. }
  20. .q_title {
  21. margin-top: 30px;
  22. }
  23. .q_title h3 {
  24. font-size: 2em;
  25. padding: 5px 0;
  26. color:#ef670e;
  27. }
  28. .q_title p {
  29. padding: 5px 0;
  30. font-size: 1.4em;
  31. color: #a57d6a;
  32. }
  33. .img_qr img {
  34. width: 64%;
  35. margin-top: 10px;
  36. diplay:block;
  37. margin:auto;
  38. border:15px solid #ffebdf;
  39. border-radius:20px;
  40. /*pointer-events: none;*/
  41. }
  42. .q_bottom {
  43. color: #f09f60;
  44. background:#ffeddf;
  45. border:2px solid #f1cca7;
  46. text-align:left;
  47. width:85%;
  48. padding:15px;
  49. margin:30px auto;
  50. user-select: none;
  51. }
  52. .q_bottom h3{
  53. color: #df6d1f;
  54. font-size: 2em;
  55. margin-top: 0;
  56. margin-bottom: 17px;
  57. }
  58. .q_bottom p{
  59. font-size: 1.1em;
  60. line-height: 23px;
  61. padding: 0;
  62. margin: 0;
  63. }
  64. .icon_area {
  65. width: 8em;
  66. height: 8em;
  67. background-color: #10aeff;
  68. border-radius: 4em;
  69. color: #fff;
  70. margin: 5em auto;
  71. }
  72. .icon_msg {
  73. font-size: 8em;
  74. font-family: -webkit-body;
  75. line-height: 1em;
  76. }
  77. .msg_title {
  78. font-family: 'Helvetica Neue';
  79. font-size: 2em;
  80. }
  81. </style>
  82. </head>
  83. <body>
  84. <div class="mainbody">
  85. <div class="q_title">
  86. <h3>关注作者授权公众号继续阅读</h3>
  87. <p>由于版权问题,请关注后继续阅读</p>
  88. <p>( 每日免费领书币 )</p>
  89. </div>
  90. @if($img)
  91. <div class="img_qr" >
  92. <img src="{{$img}}">
  93. </div>
  94. @else
  95. <div class="img_qr" id="qrcode_url" style="display: none;">
  96. </div>
  97. <img id="buildImage" src="" alt="" />
  98. @endif
  99. <div class="q_bottom" >
  100. <h3>关注步骤 :</h3>
  101. <p>1. 将二维码截图保存</p>
  102. <p>2. 打开微信-扫一扫-相册,选中二维码后点击扫描</p>
  103. <p>3. 点击关注公众号</p>
  104. </div>
  105. </div>
  106. </body>
  107. <script>
  108. if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
  109. handleFontSize();
  110. } else {
  111. if (document.addEventListener) {
  112. document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
  113. } else if (document.attachEvent) {
  114. document.attachEvent("WeixinJSBridgeReady", handleFontSize);
  115. document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
  116. }
  117. }
  118. function handleFontSize() {
  119. // 设置网页字体为默认大小
  120. WeixinJSBridge.invoke('setFontSizeCallback', {'fontSize': 0});
  121. // 重写设置网页字体大小的事件
  122. WeixinJSBridge.on('menu:setfont', function () {
  123. WeixinJSBridge.invoke('setFontSizeCallback', {'fontSize': 0});
  124. });
  125. }
  126. </script>
  127. <script src='https://cdn-novel.iycdm.com/static/qrcode.min.js'></script>
  128. <script>
  129. var img_url = "{!! $url !!}"
  130. /*if(img_url){
  131. $('#qrcode_url').qrcode({
  132. render: "canvas",
  133. width: 200,
  134. height: 200,
  135. text: img_url
  136. });
  137. }*/
  138. var qrcode = new QRCode("qrcode_url", {
  139. text: img_url,
  140. width: 200,
  141. height: 200,
  142. colorDark : "#000000",
  143. colorLight : "#ffffff",
  144. correctLevel : QRCode.CorrectLevel.H
  145. });
  146. var codeSrc = qrcode._oDrawing._elCanvas.toDataURL("image/jpg");
  147. document.querySelector("#buildImage").setAttribute("src", codeSrc);
  148. </script>
  149. </html>