exportfans.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {extend name="layout/layout" /}
  2. {block name="title"}劲爆爽文{/block}
  3. {block name="css"}
  4. <link rel="stylesheet" href="{:asset('/css/frontend/export_fans.css')}">
  5. <style>
  6. * {
  7. margin: 0;
  8. padding: 0;
  9. list-style: none;
  10. box-sizing: border-box;
  11. }
  12. html{
  13. font-size: 106.667px;
  14. min-width: 100%;
  15. min-height: 100%;
  16. background: #a11dad;
  17. }
  18. body {
  19. -webkit-text-size-adjust: 100% !important;
  20. }
  21. </style>
  22. {/block}
  23. {block name="zepto"}
  24. <!-- 这是zepto插件 -->
  25. {/block}
  26. {block name="menu"}{/block}
  27. {block name="main"}
  28. <div class="export-fans">
  29. <!-- 头图 -->
  30. <div class="jbsw_header_bg"></div>
  31. <div class="jbsw_content">
  32. <p>
  33. {$fans.content}
  34. </p>
  35. <div class="jbsw_code_zone">
  36. <div class="jbsw_code_1">
  37. <img src="/assets/css/frontend/export_fans/wechart.png" alt="">
  38. <div class="jbsw_code_1_inner">
  39. <h2>点击添加好友领取整本书籍</h2>
  40. <p>还可解锁更多免费书籍哦</p>
  41. </div>
  42. </div>
  43. <div class="jbsw_code_2">
  44. <img src="{$fans.qrcode}" alt="">
  45. </div>
  46. <div class="jbsw_code_3">
  47. <h2>
  48. 长按二维码识别添加好友
  49. </h2>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. {/block}
  55. {block name="js"}
  56. <script>
  57. (function() {
  58. if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
  59. handleFontSize();
  60. } else {
  61. if (document.addEventListener) {
  62. document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
  63. } else if (document.attachEvent) {
  64. document.attachEvent("WeixinJSBridgeReady", handleFontSize);
  65. document.attachEvent("onWeixinJSBridgeReady", handleFontSize); }
  66. }
  67. function handleFontSize() {
  68. // 设置网页字体为默认大小
  69. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  70. // 重写设置网页字体大小的事件
  71. WeixinJSBridge.on('menu:setfont', function() {
  72. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  73. });
  74. }
  75. })();
  76. (function (doc, win) {
  77. var docEl = doc.documentElement,
  78. resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
  79. recalc = function () {
  80. var clientWidth = docEl.clientWidth;
  81. if (!clientWidth) return;
  82. docEl.style.fontSize = 100 * (clientWidth / 375) + 'px';
  83. };
  84. recalc();
  85. if (!doc.addEventListener) return;
  86. win.addEventListener(resizeEvt, recalc, false);
  87. doc.addEventListener('DOMContentLoaded', recalc, false);
  88. })(document, window);
  89. $(function(){
  90. cpslog([703, {export_fans_id:'{$fans.id}'}, 'export_fans_show']);
  91. });
  92. </script>
  93. {/block}