tpl.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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. background-color: #fff;
  22. }
  23. h2{
  24. font-size: .36rem;
  25. font-weight: bold;
  26. text-align: center;
  27. line-height:1.5;
  28. }
  29. h3{
  30. font-size: .26rem;
  31. font-weight: bold;
  32. text-indent: 2em;
  33. margin-top: .30rem;
  34. line-height:1.5;
  35. }
  36. .main p{
  37. font-size: .36rem;
  38. text-indent: 2em;
  39. margin-top: .30rem;
  40. line-height:1.5;
  41. }
  42. .foot_m {margin-top:.3rem; padding:.3rem .15rem; background-color:#F7EED6;}
  43. .foot {}
  44. .foot p{
  45. text-align: center;
  46. font-weight: bold;
  47. font-size: .36rem;
  48. padding-top: .30rem;
  49. line-height:1.2;
  50. }
  51. .f_red {color:crimson}
  52. .foot_img {margin-top:.3rem;}
  53. .foot_img img {width:100%;}
  54. .foot2 {position: relative; margin-top:.30rem; padding:0 1.75rem 0 .9rem; height:.75rem;}
  55. .foot2 .icon {position: absolute; left:0; top:0; width:.75rem; height:.75rem; border-radius:50%;}
  56. .foot2 p {position: relative; top:.05rem;height:.65rem; line-height: .65rem;
  57. text-align: left; color:#333; font-size:.3rem;
  58. overflow: hidden;
  59. text-overflow:ellipsis;
  60. white-space: nowrap;}
  61. .foot2 .copyxs {position: absolute; right:0; top:.05rem;}
  62. .copyxs {display:inline-block; border-radius: .325rem; padding:0 .35rem; height:.65rem; line-height: .65rem;
  63. text-align: center; color:#fff; font-size:.33rem; background:red; text-decoration: none;}
  64. .foot3 { margin-top:.3rem;}
  65. .foot3 p{
  66. text-align: left;
  67. font-size: .3rem;
  68. padding-top: .30rem;
  69. line-height:1.5;
  70. }
  71. .foot3 strong {position: relative; left:-.1rem;}
  72. .foot3 .f_red {font-weight: bold;}
  73. .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);}
  74. .dialog_m { position: fixed; top:50%; left:10%; margin-top:-2.5rem; width:80%; height:4.4rem; background:#fff; border-radius: .4rem;}
  75. .dialog_m .h3 { margin-top:.4rem; padding:.3rem 0;text-align: center; font-size: .45rem; color:#333; font-weight: bold;}
  76. .dialog_m p {text-align: center; font-size: .35rem; color:#454545;}
  77. .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;
  78. font-size:.45rem; color:#fff;text-decoration: none;}
  79. .top_ban {padding-top:.3rem;}
  80. .top_ban img {width:100%;}
  81. .foot_leave_word {
  82. margin-top: .5rem;
  83. }
  84. .foot_leave_word .title {
  85. display: block;
  86. position: relative;
  87. color: #999;
  88. text-align: center;
  89. font-size: .3rem;
  90. }
  91. .foot_leave_word .title .line_left {
  92. width: 30%;
  93. height: 1px;
  94. position: absolute;
  95. top: 50%;
  96. left: 0;
  97. background: #ccc none repeat scroll 0% 0%;
  98. }
  99. .foot_leave_word .title .line_right {
  100. width: 30%;
  101. height: 1px;
  102. position: absolute;
  103. top: 50%;
  104. right: 0;
  105. background: #ccc none repeat scroll 0% 0%;
  106. }
  107. .liuyan_log {
  108. padding-top: .1rem;
  109. }
  110. .liuyan_log .liuyan_detail {
  111. border-bottom: 1px solid #cfcfcf;
  112. padding: .2rem;
  113. overflow: hidden;
  114. font-size: 16px;
  115. }
  116. .liuyan_log .liuyan_detail .person_info {
  117. display: flex;
  118. justify-content: space-between;
  119. height: .5rem;
  120. line-height: .5rem;
  121. }
  122. .person_info .person_img .head_img {
  123. width: .6rem;
  124. height: .6rem;
  125. margin-right: .2rem;
  126. vertical-align: middle;
  127. border-radius: .1rem;
  128. }
  129. .person_info .time_data {
  130. color: #999;
  131. font-size: .2rem;
  132. }
  133. .person_info .person_img {
  134. color: #2222e0;
  135. vertical-align: middle;
  136. }
  137. .liuyan_detail .liuyan_inner {
  138. margin-top: .1rem;
  139. margin-left: .9rem;
  140. padding-right: .2rem;
  141. text-align: justify;
  142. }
  143. </style>
  144. </head>
  145. <body style="display: none">
  146. <h2>{$title}</h2>
  147. <div class="top_ban"><img src="{$image}"></div>
  148. <div class="main">
  149. {foreach name="chapters" item="v0"}
  150. {foreach name="v0.content" item="v1"}
  151. <p>{$v1}</p>
  152. {/foreach}
  153. {/foreach}
  154. </div>
  155. <div class="foot_m go-wx">
  156. <div class="foot">
  157. <p>篇幅有限,后续更加精彩!</p>
  158. <p>点击下方按钮<span class="f_red">关注微信公众号</span></p>
  159. <p>继续阅读精彩内容</p>
  160. </div>
  161. <div class="foot2">
  162. <img src="{$admin.head_img}" class="icon">
  163. <p id="gzh">{$admin.nick_name}</p>
  164. <a href="javascript:;" class="copyxs">+关注&nbsp;</a>
  165. </div>
  166. <div class="foot3">
  167. <p><strong>【请按照下面步骤操作】</strong></p>
  168. <p>1、点击上方【+关注】按钮复制微信号</p>
  169. <p>2、进入微信后 → 点击右上角"<span class="f_red">+</span>" → 点击"<span class="f_red">添加</span>" → 选择"<span class="f_red">公众号</span>"</p>
  170. <p>3、长按粘贴"<span class="f_red">{$admin.nick_name}</span>" → 关注"<span class="f_red">{$admin.nick_name}</span>"即可继续阅读!</p>
  171. </div>
  172. <!--留言-->
  173. {if condition="$comment_status == '1' "}
  174. <div class="foot_leave_word">
  175. <div class="title">
  176. <p class="line_left"></p>
  177. 精选留言
  178. <p class="line_right"></p>
  179. </div>
  180. <ul class="liuyan_log">
  181. {foreach $commentList as $k=> $comment}
  182. <li class="liuyan_detail">
  183. <div class="person_info">
  184. <p class="person_img">
  185. <img src="{:asset('/img/t'.$k.'.jpg')}" alt="" class="head_img">
  186. <span>{$comment['nickname']}</span>
  187. </p>
  188. <p class="time_data">
  189. {$k + 5}分钟前
  190. </p>
  191. </div>
  192. <div class="liuyan_inner">{$comment['content']}</div>
  193. </li>
  194. {/foreach}
  195. </ul>
  196. </div>
  197. {/if}
  198. </div>
  199. <div class="foot_img go-wx">
  200. <img src="{:asset('/img/guidewxsubscribe/tips-noop.gif')}" width="100%">
  201. </div>
  202. <div class="dialog gowx" style="display: none">
  203. <div class="dialog_m">
  204. <p class="h3">复制成功</p>
  205. <p>打开微信关注公众号继续阅读</p>
  206. <a href="javascript:;" class="gowechat">立即打开微信</a>
  207. </div>
  208. </div>
  209. <span style="display:block;text-align: center;font-size: 0.37rem;color: #000;margin-top: 10px;">{$company}</span>
  210. <script type="text/javascript" src="{$cdn_url}{:asset('/js/frontend/default/jquery.min.js')}"></script>
  211. <script type="text/javascript" src="{$cdn_url}{:asset('/js/guidewxsubscribe/clipboard.min.js')}"></script>
  212. {if condition="$setting.toutiao_cnzz"}
  213. {$setting.toutiao_cnzz}
  214. {/if}
  215. <script>
  216. $(function(){
  217. $(document.body).css("min-height",$(window).height());
  218. $(window).resize(function(){
  219. $(document.body).css("min-height",$(window).height());
  220. });
  221. function getRem(pwidth, prem) {
  222. var html = document.getElementsByTagName("html")[0];
  223. var oWidth = window.innerWidth;
  224. html.style.fontSize = oWidth / pwidth * prem + "px";
  225. if (!/iphone|ipad|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())) {
  226. html.style.width = "750px";
  227. html.style["margin"] = "0 auto";
  228. html.style.fontSize = "100px";
  229. }
  230. }
  231. getRem(750, 100);
  232. window.onresize = function() {
  233. getRem(750, 100);
  234. };
  235. if (/(Android);?[\s\/]+([\d.]+)?/.test(navigator.userAgent) && '{$setting.hide_jump}') {
  236. $('.gowechat').hide();
  237. $('.dialog_m').css('height', '3.4rem');
  238. $('.gowx').click(function(){
  239. $('.gowx').hide();
  240. });
  241. }
  242. $('body').show();
  243. $(".go-wx").on('click', function() {
  244. $.ajax({
  245. url: '/api/toutiao/visitorsave',
  246. type:'post',
  247. data: {
  248. referral: document.URL,
  249. id:'{$id}',
  250. appid:'{$appid}'
  251. }
  252. });
  253. $('.gowx').show();
  254. });
  255. $('.gowechat').click(function () {
  256. $('.gowx').hide();
  257. window.location.href='weixin://'
  258. });
  259. var maskType = '{$setting.mask_type ?? 2}';
  260. new ClipboardJS('.go-wx', {
  261. text: function () {
  262. var randomWord = '';
  263. if (maskType == 1) {
  264. var chars = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  265. var length = chars.length;
  266. var randomLength = Math.floor(Math.random() * 4) + 2;
  267. for (var i = 0; i < randomLength; i++) {
  268. randomWord += chars.charAt(Math.floor(Math.random() * length));
  269. }
  270. } else if (maskType == 2) {
  271. randomWord = '{$setting.mask}'.split(',');
  272. var index = Math.round(Math.random()*(randomWord.length - 1));
  273. randomWord = randomWord[index];
  274. } else if (maskType == 3) {
  275. randomWord = '';
  276. }
  277. return '{$setting.gzh}' + randomWord;
  278. }
  279. });
  280. });
  281. </script>
  282. </body>
  283. </html>