tpl.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE html>
  2. {__NOLAYOUT__}
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7. <meta name="format-detection" content="telephone=no">
  8. <meta name="apple-mobile-web-app-capable" content="yes">
  9. <meta name="x5-orientation" content="portrait"><!-- QQ强制竖屏 -->
  10. <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
  11. <title>{$title}</title>
  12. <style>
  13. *{
  14. margin: 0;
  15. padding: 0
  16. }
  17. body{
  18. padding: .38rem .30rem .38rem;
  19. font-size: .26rem;
  20. line-height:1.5;
  21. }
  22. h2{
  23. font-size: .36rem;
  24. font-weight: bold;
  25. text-align: center;
  26. line-height:1.5;
  27. }
  28. h3{
  29. font-size: .26rem;
  30. font-weight: bold;
  31. text-indent: 2em;
  32. margin-top: .30rem;
  33. line-height:1.5;
  34. }
  35. .main p{
  36. font-size: .36rem;
  37. text-indent: 2em;
  38. margin-top: .30rem;
  39. line-height:1.5;
  40. }
  41. .foot_m {margin-top:.3rem; padding:.3rem .15rem; background-color:#F7EED6;}
  42. .foot {}
  43. .foot p{
  44. text-align: center;
  45. font-weight: bold;
  46. font-size: .36rem;
  47. padding-top: .30rem;
  48. line-height:1.2;
  49. }
  50. .f_red {color:crimson}
  51. .foot_img {margin-top:.3rem;}
  52. .foot_img img {width:100%;}
  53. .foot2 {position: relative; margin-top:.30rem; padding:0 1.75rem 0 .9rem; height:.75rem;}
  54. .foot2 .icon {position: absolute; left:0; top:0; width:.75rem; height:.75rem; border-radius:50%;}
  55. .foot2 p {position: relative; top:.05rem;height:.65rem; line-height: .65rem;
  56. text-align: left; color:#333; font-size:.3rem;
  57. overflow: hidden;
  58. text-overflow:ellipsis;
  59. white-space: nowrap;}
  60. .foot2 .copyxs {position: absolute; right:0; top:.05rem;}
  61. .copyxs {display:inline-block; border-radius: .325rem; padding:0 .35rem; height:.65rem; line-height: .65rem;
  62. text-align: center; color:#fff; font-size:.33rem; background:red; text-decoration: none;}
  63. .foot3 { margin-top:.3rem;}
  64. .foot3 p{
  65. text-align: left;
  66. font-size: .3rem;
  67. padding-top: .30rem;
  68. line-height:1.5;
  69. }
  70. .foot3 strong {position: relative; left:-.1rem;}
  71. .foot3 .f_red {font-weight: bold;}
  72. .dialog { position: fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; z-index: 5; background:rgba(0,0,0,0.4);}
  73. .dialog_m { position: fixed; top:50%; left:10%; margin-top:-2.5rem; width:80%; height:4.4rem; background:#fff; border-radius: .4rem;}
  74. .dialog_m .h3 { margin-top:.4rem; padding:.3rem 0;text-align: center; font-size: .45rem; color:#333; font-weight: bold;}
  75. .dialog_m p {text-align: center; font-size: .35rem; color:#454545;}
  76. .dialog_m a {display:block; margin:0 auto; margin-top:.4rem; border-radius: .5rem; width:80%; height:1rem; line-height: 1rem; background:red; text-align: center;
  77. font-size:.45rem; color:#fff;text-decoration: none;}
  78. .top_ban {padding-top:.3rem;}
  79. .top_ban img {width:100%;}
  80. </style>
  81. </head>
  82. <body style="display: none">
  83. <h2>{$title}</h2>
  84. <div class="top_ban"><img src="{$image}"></div>
  85. <div class="main">
  86. {foreach name="chapters" item="v0"}
  87. {foreach name="v0.content" item="v1"}
  88. <p>{$v1}</p>
  89. {/foreach}
  90. {/foreach}
  91. </div>
  92. <div class="foot_m go-wx">
  93. <div class="foot">
  94. <p>篇幅有限,后续更加精彩!</p>
  95. <p>点击下方按钮<span class="f_red">关注微信公众号</span></p>
  96. <p>继续阅读精彩内容</p>
  97. </div>
  98. <div class="foot2">
  99. <img src="{$admin.head_img}" class="icon">
  100. <p id="gzh">{$admin.nick_name}</p>
  101. <a href="javascript:;" class="copyxs">+关注&nbsp;</a>
  102. </div>
  103. <div class="foot3">
  104. <p><strong>【请按照下面步骤操作】</strong></p>
  105. <p>1、点击上方【+关注】按钮复制微信号</p>
  106. <p>2、进入微信后 → 点击右上角"<span class="f_red">+</span>" → 点击"<span class="f_red">添加好友</span>" → 选择"<span class="f_red">公众号</span>"</p>
  107. <p>3、长按粘贴"<span class="f_red">{$admin.nick_name}</span>" → 关注"<span class="f_red">{$admin.nick_name}</span>"即可继续阅读!</p>
  108. </div>
  109. </div>
  110. <div class="foot_img go-wx">
  111. <img src="{:asset('/img/guidewxsubscribe/tips-noop.gif')}" width="100%">
  112. </div>
  113. <div class="dialog gowx" style="display: none">
  114. <div class="dialog_m">
  115. <p class="h3">复制成功</p>
  116. <p>打开微信关注公众号继续阅读</p>
  117. <a href="javascript:;" class="gowechat">立即打开微信</a>
  118. </div>
  119. </div>
  120. <span style="display:block;text-align: center;font-size: 0.37rem;color: #000;margin-top: 10px;">{$company}</span>
  121. <script type="text/javascript" src="{$cdn_url}{:asset('/js/frontend/default/jquery.min.js')}"></script>
  122. <script type="text/javascript" src="{$cdn_url}{:asset('/js/guidewxsubscribe/clipboard.min.js')}"></script>
  123. <script>
  124. $(function(){
  125. $(document.body).css("min-height",$(window).height());
  126. $(window).resize(function(){
  127. $(document.body).css("min-height",$(window).height());
  128. });
  129. function getRem(pwidth, prem) {
  130. var html = document.getElementsByTagName("html")[0];
  131. var oWidth = window.innerWidth;
  132. html.style.fontSize = oWidth / pwidth * prem + "px";
  133. if (!/iphone|ipad|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())) {
  134. html.style.width = "750px";
  135. html.style["margin"] = "0 auto";
  136. html.style.fontSize = "100px";
  137. }
  138. }
  139. getRem(750, 100);
  140. window.onresize = function() {
  141. getRem(750, 100);
  142. };
  143. $('body').show();
  144. $(".go-wx").on('click', function() {
  145. $.ajax({
  146. url: '/api/ucapi/visitorsave',
  147. type:'post',
  148. data: {
  149. referral: document.URL,
  150. id:'{$id}',
  151. appid:'{$appid}'
  152. }
  153. });
  154. $('.gowx').show();
  155. });
  156. $('.gowechat').click(function () {
  157. $('.gowx').hide();
  158. window.location.href='weixin://'
  159. });
  160. var randomWord = '{$setting.mask}'.split(',');
  161. new ClipboardJS('.go-wx', {
  162. text: function () {
  163. var index = Math.round(Math.random()*(randomWord.length - 1))
  164. return '{$setting.gzh}' + randomWord[index];
  165. }
  166. });
  167. });
  168. </script>
  169. </body>
  170. </html>