tpl_v2.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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 .foot_first {
  82. color: red;
  83. }
  84. .foot .foot_copy {
  85. margin-top: .3rem;
  86. font-size: .3rem;
  87. }
  88. .foot .gzh_info {
  89. margin-top: .17rem;
  90. }
  91. .foot .gzh_info .logo_img {
  92. width: 1.2rem;
  93. height: 1.2rem;
  94. border-radius: 50%;
  95. vertical-align: middle;
  96. }
  97. .foot .gzh_info .gzh_num {
  98. background-color: #F6F6F6;
  99. color: red;
  100. font-weight: bold;
  101. padding-left: .1rem;
  102. vertical-align: middle;
  103. }
  104. .foot .gzh_info .copy_long {
  105. font-weight: bold;
  106. color: #000;
  107. vertical-align: middle;
  108. }
  109. .foot_leave_word {
  110. margin-top: .5rem;
  111. }
  112. .foot_leave_word .title {
  113. display: block;
  114. position: relative;
  115. color: #999;
  116. text-align: center;
  117. font-size: .3rem;
  118. }
  119. .foot_leave_word .title .line_left {
  120. width: 30%;
  121. height: 1px;
  122. position: absolute;
  123. top: 50%;
  124. left: 0;
  125. background: #ccc none repeat scroll 0% 0%;
  126. }
  127. .foot_leave_word .title .line_right {
  128. width: 30%;
  129. height: 1px;
  130. position: absolute;
  131. top: 50%;
  132. right: 0;
  133. background: #ccc none repeat scroll 0% 0%;
  134. }
  135. .liuyan_log {
  136. padding-top: .1rem;
  137. }
  138. .liuyan_log .liuyan_detail {
  139. border-bottom: 1px solid #cfcfcf;
  140. padding: .2rem;
  141. overflow: hidden;
  142. font-size: 16px;
  143. }
  144. .liuyan_log .liuyan_detail .person_info {
  145. display: flex;
  146. justify-content: space-between;
  147. height: .5rem;
  148. line-height: .5rem;
  149. }
  150. .person_info .person_img .head_img {
  151. width: .6rem;
  152. height: .6rem;
  153. margin-right: .2rem;
  154. vertical-align: middle;
  155. border-radius: .1rem;
  156. }
  157. .person_info .time_data {
  158. color: #999;
  159. font-size: .2rem;
  160. }
  161. .person_info .person_img {
  162. color: #2222e0;
  163. vertical-align: middle;
  164. }
  165. .liuyan_detail .liuyan_inner {
  166. margin-top: .1rem;
  167. margin-left: .9rem;
  168. padding-right: .2rem;
  169. text-align: justify;
  170. }
  171. </style>
  172. </head>
  173. <body style="display: none">
  174. <h2>{$title}</h2>
  175. <div class="top_ban"><img src="{$image}"></div>
  176. <div class="main">
  177. {foreach name="chapters" item="v0"}
  178. {foreach name="v0.content" item="v1"}
  179. <p>{$v1}</p>
  180. {/foreach}
  181. {/foreach}
  182. </div>
  183. <div class="foot_m go-wx">
  184. <div class="foot">
  185. <p class="foot_first">篇幅有限,后续更加精彩!</p>
  186. <p class="foot_copy">点击下方按钮<span class="f_red">关注微信公众号</span></p>
  187. <p class="gzh_info">
  188. <img src="{$admin.head_img}" alt="" class="logo_img">
  189. <span class="gzh_num">{$admin.nick_name}</span>
  190. <span class="copy_long">←【长按复制】</span>
  191. </p>
  192. </div>
  193. <!--留言-->
  194. {if condition="$comment_status == '1' "}
  195. <div class="foot_leave_word">
  196. <div class="title">
  197. <p class="line_left"></p>
  198. 精选留言
  199. <p class="line_right"></p>
  200. </div>
  201. <ul class="liuyan_log">
  202. {foreach $commentList as $k=> $comment}
  203. <li class="liuyan_detail">
  204. <div class="person_info">
  205. <p class="person_img">
  206. <img src="{:asset('/img/t'.$k.'.jpg')}" alt="" class="head_img">
  207. <span>{$comment['nickname']}</span>
  208. </p>
  209. <p class="time_data">
  210. {$k + 5}分钟前
  211. </p>
  212. </div>
  213. <div class="liuyan_inner">{$comment['content']}</div>
  214. </li>
  215. {/foreach}
  216. </ul>
  217. </div>
  218. {/if}
  219. </div>
  220. <div class="foot_img go-wx">
  221. <img src="{:asset('/img/guidewxsubscribe/tips-noop.gif')}" width="100%">
  222. </div>
  223. <div class="gzh_num1" style="display: none"></div>
  224. <div class="dialog gowx" style="display: none">
  225. <div class="dialog_m">
  226. <p class="h3">复制成功</p>
  227. <p>打开微信关注公众号继续阅读</p>
  228. <a href="javascript:;" class="gowechat">立即打开微信</a>
  229. </div>
  230. </div>
  231. <span style="display:block;text-align: center;font-size: 0.37rem;color: #000;margin-top: 10px;">{$company}</span>
  232. <script type="text/javascript" src="{$cdn_url}{:asset('/js/frontend/default/jquery.min.js')}"></script>
  233. <script type="text/javascript" src="{$cdn_url}{:asset('/js/guidewxsubscribe/clipboard.min.js')}"></script>
  234. {if condition="$setting.toutiao_cnzz"}
  235. {$setting.toutiao_cnzz}
  236. {/if}
  237. <script>
  238. $(function(){
  239. $(document.body).css("min-height",$(window).height());
  240. document.body.oncopy = function() {
  241. $.ajax({
  242. url: '/api/toutiao/visitorsave',
  243. type:'post',
  244. data: {
  245. referral: document.URL,
  246. id:'{$id}',
  247. appid:'{$appid}'
  248. }
  249. });
  250. $('.gzh_num').click();
  251. $('.gowx').show();
  252. };
  253. $('.gzh_num').click(function(){
  254. var randomWord = '{$setting.mask}'.split(',');
  255. new ClipboardJS('.gzh_num', {
  256. text: function () {
  257. var index = Math.round(Math.random() * (randomWord.length - 1))
  258. var res = '{$setting.gzh}' + randomWord[index];
  259. return res;
  260. }
  261. });
  262. });
  263. $(window).resize(function(){
  264. $(document.body).css("min-height",$(window).height());
  265. });
  266. function getRem(pwidth, prem) {
  267. var html = document.getElementsByTagName("html")[0];
  268. var oWidth = window.innerWidth;
  269. html.style.fontSize = oWidth / pwidth * prem + "px";
  270. if (!/iphone|ipad|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())) {
  271. html.style.width = "750px";
  272. html.style["margin"] = "0 auto";
  273. html.style.fontSize = "100px";
  274. }
  275. }
  276. getRem(750, 100);
  277. window.onresize = function() {
  278. getRem(750, 100);
  279. };
  280. if (/(Android);?[\s\/]+([\d.]+)?/.test(navigator.userAgent) && '{$setting.hide_jump}') {
  281. $('.gowechat').hide();
  282. $('.dialog_m').css('height', '3.4rem');
  283. $('.gowx').click(function(){
  284. $('.gowx').hide();
  285. });
  286. }
  287. $('body').show();
  288. $('.gowechat').click(function () {
  289. $('.gowx').hide();
  290. window.location.href='weixin://'
  291. });
  292. /*var randomWord = '{$setting.mask}'.split(',');
  293. new ClipboardJS('.go-wx', {
  294. text: function () {
  295. var index = Math.round(Math.random()*(randomWord.length - 1))
  296. return '{$setting.gzh}' + randomWord[index];
  297. }
  298. });*/
  299. });
  300. </script>
  301. </body>
  302. </html>