recent.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. {extend name="layout/layout" /}
  2. {block name="title"}最近阅读{/block}
  3. {block name="css"}
  4. <!-- 这里引入css -->
  5. <link href="{:asset('/css/frontend/common.css')}" rel="stylesheet" type="text/css">
  6. <link href="{:asset('/css/frontend/recently_new.css')}" rel="stylesheet" type="text/css">
  7. <link href="{:asset('/css/frontend/classify.css')}" rel="stylesheet" type="text/css">
  8. <link href="{:asset('/css/frontend/ad/image.css')}" rel="stylesheet" type="text/css">
  9. <style type="text/css">
  10. .content_null_top_border{
  11. border-top: 0;
  12. }
  13. </style>
  14. <style type="text/css">
  15. .read_popup_box, .custom_popup_box{
  16. position: fixed;
  17. left: 0;
  18. right: 0;
  19. bottom: 0;
  20. top: 0;
  21. z-index: 999;
  22. background-color: rgba(0,0,0,.5);
  23. font-size: 0;
  24. text-align: center;
  25. white-space: nowrap;
  26. }
  27. .rpb_main,
  28. .rpb_jgb{
  29. display: inline-block;
  30. vertical-align: middle;
  31. }
  32. .rpb_jgb{
  33. overflow: hidden;
  34. height: 100%;
  35. margin-left: -1px;
  36. width: 1px;
  37. }
  38. .rpb_main{
  39. overflow: hidden;
  40. width: 100%;
  41. }
  42. .rpbm_box{
  43. padding: .3rem .16rem .1rem;
  44. position: relative;
  45. left: 0;
  46. top: 0;
  47. overflow: hidden;
  48. background-color: #fff;
  49. margin: .14rem .48rem;
  50. border-radius: .16rem;
  51. white-space: normal;
  52. -webkit-box-shadow: 0 .03rem .1rem rgba(0, 0, 0, 1);
  53. box-shadow: 0 .03rem .1rem rgba(0, 0, 0, 1);
  54. }
  55. .rpbm_box a{
  56. display: block;
  57. }
  58. .rpb_img{
  59. overflow: hidden;
  60. margin: 0 auto .16rem;
  61. height: 1.39rem;
  62. width: 1.04rem;
  63. border-radius: .04rem;
  64. -webkit-box-shadow: 0 0 .1rem rgba(0, 0, 0, 0.4);
  65. box-shadow: 0 0 .1rem rgba(0, 0, 0, 0.4);
  66. }
  67. .rpb_img a,
  68. .rpb_img img{
  69. overflow: hidden;
  70. display: block;
  71. width: 100%;
  72. height: 100%;
  73. border-radius: .04rem;
  74. }
  75. .rpb_tit{
  76. overflow: hidden;
  77. margin: 0 0 .16rem;
  78. height: .26rem;
  79. font-size: .18rem;
  80. color: #000;
  81. line-height: .26rem;
  82. }
  83. .rpb_tit a{
  84. overflow: hidden;
  85. display: block;
  86. height: .26rem;
  87. font-size: .18rem;
  88. color: #000;
  89. line-height: .26rem;
  90. display: -webkit-box;
  91. -webkit-box-orient: vertical;
  92. -webkit-line-clamp: 1;
  93. }
  94. .rpb_p{
  95. margin-bottom: .1rem;
  96. overflow: hidden;
  97. max-height: .72rem;
  98. }
  99. .rpb_p a{
  100. overflow: hidden;
  101. display: block;
  102. font-size: .14rem;
  103. color: rgba(0,0,0,.5);
  104. text-align: left;
  105. line-height: .24rem;
  106. display: -webkit-box;
  107. -webkit-box-orient: vertical;
  108. -webkit-line-clamp: 3;
  109. }
  110. .rpb_but{
  111. text-align: center;
  112. height: .3rem;
  113. }
  114. .rpb_but a{
  115. display: block;
  116. height: .3rem;
  117. text-align: center;
  118. font-size: .16rem;
  119. color: #007aff;
  120. line-height: .3rem;
  121. }
  122. .rpbm_close_but{
  123. display: block;
  124. position: absolute;
  125. right: .1rem;
  126. top: .1rem;
  127. height: .2rem;
  128. width: .2rem;
  129. background: url(/assets/img/frontend/icon/cha_icon_2.png) no-repeat center center;
  130. background-size: .14rem .14rem;
  131. border-radius: .2rem;
  132. }
  133. .top{
  134. width: 100%;
  135. height: 0.31rem;
  136. padding: 0 0.144rem;
  137. box-sizing: border-box;
  138. margin-top: 0.134rem;
  139. }
  140. .top .toptab{ float: left;}
  141. .top-myshelf{
  142. font-family: PingFangSC;
  143. font-weight: 400;
  144. color: rgba(147,129,129,1);
  145. font-size: 0.144rem;
  146. margin-right: 0.3125rem;
  147. float: left;
  148. height: 0.31rem;
  149. line-height: 0.31rem;
  150. margin-left: 0.9rem;
  151. }
  152. .top .toptab.active{
  153. width: 1rem;
  154. height: 0.31rem;
  155. text-align: center;
  156. line-height: 0.31rem;
  157. border-radius: 0.31rem;
  158. background: rgba(254,237,190,1);
  159. float: left;
  160. margin: 0 0.144rem 0 0rem;
  161. font-family: PingFang-SC;
  162. font-weight: bold;
  163. font-size: 0.144rem;
  164. }
  165. .top .toptab a{
  166. color: rgba(147,129,129,1);
  167. }
  168. .top .toptab.active a{
  169. color: rgba(81,61,61,1);
  170. }
  171. .head_tit_tab{
  172. overflow: hidden;
  173. margin: 0 .5rem;
  174. height: .44rem;
  175. font-size: .15rem;
  176. color: #513D3D;
  177. text-align: center;
  178. line-height: .44rem;
  179. font-size: 0;
  180. text-align: center;
  181. white-space: nowrap;
  182. }
  183. .head_tit_tab a{
  184. display: inline-block;
  185. padding: 0 .05rem;
  186. margin: 0 .05rem;
  187. height: .44rem;
  188. }
  189. .head_tit_tab strong{
  190. display: block;
  191. padding: .14rem 0 .03rem;
  192. height: .2rem;
  193. font-size: .14rem;
  194. font-weight: normal;
  195. text-align: center;
  196. color: #938181;
  197. line-height: .2rem;
  198. }
  199. .head_tit_tab span{
  200. display: block;
  201. margin: 0 auto;
  202. height: .01rem;
  203. width: .5rem;
  204. }
  205. .head_tit_tab .htt_hover strong{
  206. color: #FFB473;
  207. }
  208. .head_tit_tab .htt_hover span{
  209. background-color: #5EBEA1;
  210. }
  211. /**底部文字*/
  212. .loading_box {
  213. overflow: hidden;
  214. height: .5rem;
  215. background-color: #fff;
  216. border-top: 0;
  217. text-align: center;
  218. line-height: .5rem;
  219. font-size: 0;
  220. }
  221. .loading_box span {
  222. padding-left: .57rem;
  223. *display: inline-block;
  224. *display: inline;
  225. *zoom: 1;
  226. height: .5rem;
  227. background: url("{:asset('/yg/img/frontend/icon/loading_heart_icon.png')}") no-repeat 0 center, url("{:asset('/yg/img/frontend/icon/loading_heart_icon.png')}") no-repeat .19rem center, url("{:asset('/yg/img/frontend/icon/loading_heart_icon.png')}") no-repeat .38rem center;
  228. background-size: .14rem auto;
  229. font-size: .12rem;
  230. color: #5EBEA1;
  231. line-height: .5rem;
  232. }
  233. .body_sytle{
  234. background-color: #fff;
  235. }
  236. /*历史记录开始*/
  237. /*书架的返回*/
  238. .head_return_page_but{
  239. background-image: url("{:asset('/img/frontend/icon/back.png')}");
  240. background-size: .2rem auto;
  241. }
  242. /*头部右侧的icon*/
  243. .head_menu_but{
  244. background-image: url("{:asset('/img/frontend/icon/shelf_menu.png')}");
  245. background-size: .2rem auto;
  246. }
  247. /*我的书架的文字颜色*/
  248. .head_tit_tab .htt_hover strong{
  249. color: #5EBEA1;
  250. }
  251. /*管理图标和文字颜色*/
  252. .r_img_edit_open, .r_bookshelf_edit_open{
  253. background-image: url("{:asset('/img/frontend/icon/icon_setting.png')}");
  254. background-size: .2rem auto;
  255. color: #938181;
  256. }
  257. /*历史记录总共多少本基础颜色*/
  258. .r_book_num strong{
  259. color: #EA5E5E;
  260. }
  261. /*历史记录总共多少本,数字颜色*/
  262. .r_book_num strong span{
  263. color: #EA5E5E;
  264. }
  265. /*更新至*/
  266. .r_img_chaptername{
  267. color: #EA5E5E;
  268. }
  269. .r_img_chaptername_prev.r_img_chaptername{
  270. color: #828B88;
  271. position: relative;
  272. padding-left: 0.18rem;
  273. }
  274. .r_img_chaptername_prev::before{
  275. content: '';
  276. position: absolute;
  277. display: block;
  278. width: 0.15rem;
  279. height: 0.15rem;
  280. left: 0rem;
  281. top: 0.01rem;
  282. background: url("{:asset('/img/frontend/icon/sunshine_clock_1.png')}") no-repeat center center/100% 100%;
  283. }
  284. .r_book_num strong{
  285. color: #938181;
  286. }
  287. .r_book_num strong span{
  288. color: #EA5E5E;
  289. }
  290. .r_book_num .select_num{
  291. display: none;
  292. }
  293. .r_img_list_edit .r_book_num .select_num{
  294. display: block;
  295. }
  296. /*删除的颜色和icon*/
  297. .r_img_edit_close{
  298. color: #828B88;
  299. background-image: url("{:asset('/img/frontend/icon/del.png')}");
  300. background-size: .2rem auto;
  301. }
  302. .r_img_edit_remove{
  303. color: #EA5E5E;
  304. background-image: url("{:asset('/img/frontend/icon/del.png')}");
  305. background-size: .2rem auto;
  306. }
  307. /* 历史记录结束*/
  308. </style>
  309. {/block}
  310. {block name="zepto"}
  311. <!-- 这是zepto插件 -->
  312. <script type="text/javascript" src="{:asset('/libs/zepto/zepto.picLazyLoad.min.js')}"></script>
  313. {/block}
  314. {block name="menu"}
  315. <div class="head_tit_box">
  316. <a href="javascript:;" class="head_return_page_but"></a>
  317. <div class="head_menu_but_box">
  318. {if condition="!$is_show_tabbar" }
  319. <a href="javascript:;" class="head_menu_but"></a>
  320. {/if}
  321. </div>
  322. <div class="head_tit_tab">
  323. {if condition="$showBookShelf"}
  324. <a href="/index/book/shelf"><strong>我的书架</strong><span></span></a>
  325. <a href="javascript:;" class="htt_hover"><strong>阅读记录</strong><span></span></a>
  326. {else /}
  327. <a href="javascript:;"><strong>阅读记录</strong><span></span></a>
  328. {/if}
  329. </div>
  330. </div>
  331. <!-- 三期天降阅读历史记录福利广告 -->
  332. <div class="ad_welfare_toast">
  333. 恭喜获得xx书币
  334. </div>
  335. <div class="ad_welfare_icon ad_welfare">
  336. <img class="ad_welfareclick" src="{:asset('/img/frontend/chapter/iconwelfare.png')}"/>
  337. </div>
  338. <!--head_tit_box 分类 head_menu_but_open-->
  339. <div class="pop_up_menu_box">
  340. <i></i>
  341. <div class="pum_box">
  342. <div class="pum_nav_list">
  343. <ul class="pum_nav_list_ul">
  344. <li>
  345. <a href="/index/index?type=boy">
  346. <div class="pum_icon"><img alt="" src="{:asset('/img/frontend/icon/module_icon_1.png')}" /></div>
  347. <strong>男生</strong>
  348. </a>
  349. </li>
  350. <li>
  351. <a href="/index/index?type=girl">
  352. <div class="pum_icon"><img alt="" src="{:asset('/img/frontend/icon/module_icon_2.png')}" /></div>
  353. <strong>女生</strong>
  354. </a>
  355. </li>
  356. <li>
  357. <a href="/index/category">
  358. <div class="pum_icon"><img alt="" src="{:asset('/img/frontend/icon/module_icon_3.png')}" /></div>
  359. <strong>分类</strong>
  360. </a>
  361. </li>
  362. <li>
  363. <a href="/index/book/list?type=finish">
  364. <div class="pum_icon"><img alt="" src="{:asset('/img/frontend/icon/module_icon_4.png')}" /></div>
  365. <strong>完本</strong>
  366. </a>
  367. </li>
  368. <li>
  369. <a href="/index/book/list?type=free">
  370. <div class="pum_icon"><img alt="" src="{:asset('/img/frontend/icon/module_icon_5.png')}" /></div>
  371. <strong>免费</strong>
  372. </a>
  373. </li>
  374. <li>
  375. <a href="/index/user">
  376. <div class="pum_icon"><img alt="" src="{:asset('/img/frontend/icon/module_icon_6.png')}" /></div>
  377. <strong>个人中心</strong>
  378. </a>
  379. </li>
  380. </ul>
  381. <div class="pum_but_box">
  382. <a href="/index/user/recent">最近阅读</a>
  383. </div>
  384. <input type="hidden" value="/index/user/recent" class="js_recent_url">
  385. </div>
  386. </div>
  387. </div>
  388. <!--pop_up_menu_box 菜单弹框-->
  389. {/block}
  390. {block name="main"}
  391. <!-- 这是正文 body_sytle_girl -->
  392. <!-- 提示置顶 -->
  393. <div class="set_top_box" style="display:none;">点击右上角[在聊天中置顶或者浮窗]阅读有惊喜↑</div>
  394. <!--<div class="top">-->
  395. <!-- <div class="top-myshelf toptab "><a href="/index/book/shelf">我的书架</a></div>-->
  396. <!-- <div class="top-history toptab active"><a href="/index/user/recent">阅读记录</a></div>-->
  397. <!--</div>-->
  398. <div style="clear: both"></div>
  399. <div class="body_sytle" style="min-height: 600px">
  400. <!--i_nav_box 顶部导航-->
  401. <!--广告 最近阅读页顶部广告条-->
  402. <div class="ad_position_4"></div>
  403. {notempty name="rencently"}
  404. <div class="r_img_list_box">
  405. <div class="r_img_edit_box">
  406. <div class="r_book_num">
  407. <strong class="all_num" totalnum="{$totalNum}">共<span>{$totalNum}</span>本</strong>
  408. <strong class="select_num">选中<span>0</span>本</strong>
  409. </div>
  410. <div class="r_img_edit_but_box" {if condition="$login eq '0' "}style="display:none"{/if}>
  411. <a href="javascript:;" class="r_img_edit_open">管理</a>
  412. <a href="javascript:;" class="r_img_edit_close">取消</a>
  413. <a href="javascript:;" class="r_img_edit_remove">删除</a>
  414. </div>
  415. </div>
  416. <ul class="r_img_ul" id="recent_ul">
  417. {foreach name="$rencently" item="data" }
  418. <li supdatet="{$data.updatetime}" sbid = "{$data.book_id}" recentid = "{$data.id}">
  419. {if condition="$data.state eq '0'"}
  420. <a href="javascript:;" class="r_img_book_null">
  421. {else /}
  422. <a href="/index/book/chapter?book_id={$data.book_id}&chapter_id={$data.chapter_id}">
  423. {/if}
  424. <div class="r_img">
  425. <img src="{$data.image}" />
  426. {if condition="$data.state eq '0'"}<span></span>{/if}
  427. </div>
  428. <div class="r_img_text">
  429. <h3>{$data.book_name}</h3>
  430. {if condition="$data.state neq '0'"}
  431. <div class="r_img_chaptername">更新至:{$data.last_chapter_name}</div>
  432. {else}
  433. <div class="r_img_other">本书已下架</div>
  434. {/if}
  435. <div class="r_img_chaptername r_img_chaptername_prev">上次读到:{$data.chapter_name}</div>
  436. </div>
  437. </a>
  438. </li>
  439. {/foreach}
  440. </ul>
  441. <!--r_img_ul 最近阅读列表 r_img_remove_select-->
  442. <div class="loading_box"><span>已显示全部图书</span></div>
  443. </div>
  444. {/notempty}
  445. <!--r_img_list 编辑最近阅读列表 r_img_list_edit_remove r_img_list_edit -->
  446. <div class="content_null_box content_null_top_border" {if condition="count($rencently) eq 0 "} style="display:block;" {else /} style="display:none;"{/if}>
  447. <img src="{:asset('/img/frontend/icon/icon_5.png')}" style="width: 1.05rem;" />
  448. <span>你还没有<i>阅读</i>记录</span>
  449. </div>
  450. <div class="r_img_list_other" {if condition="count($rencently) elt 3 "} style="display:block;" {else /} style="display:none;"{/if}>
  451. {if condition="count($ranklist['idx']) gt 0"}
  452. <div class="r_img_list_other_tit">
  453. <h2>为你推荐</h2>
  454. </div>
  455. {/if}
  456. <ul class="r_img_ul">
  457. {volist name="$ranklist['idx']" id="data" offset="0" length='10'}
  458. <li class="section-block">
  459. <a href="/index/book/info?book_id={$data.id}" class="section-data" data-book_id="{$data.id}" data-zone="为你推荐">
  460. <div class="r_img">
  461. <img src="{$data.image}" />
  462. <span></span>
  463. </div>
  464. <div class="r_img_text">
  465. <h3>{$data.name}</h3>
  466. <p>{$data.description}</p>
  467. <div class="i_images_txt_other">
  468. <strong>
  469. {if condition="$data.is_finish eq 1"}
  470. <i>已完结</i>
  471. {else/}
  472. <i style="color: #7fdae9;">连载中</i>
  473. {/if}
  474. <b>{$data.author}</b>
  475. </strong>
  476. <em>{$data.read_num}人在追</em>
  477. </div>
  478. </div>
  479. </a>
  480. </li>
  481. {/volist}
  482. </ul>
  483. </div>
  484. {if condition="$is_show_tabbar" }
  485. {include file="public/tabbar" /}
  486. {/if}
  487. </div>
  488. {/block}
  489. {block name="footer"}
  490. <div style="display: none" id="poptype" data-poptype="yunying,activity,continue,camp,subscribe,custom"></div>
  491. {/block}
  492. {block name="js"}
  493. <!-- 这里引入js -->
  494. <script type="text/javascript" src="{:asset('/js/frontend/recently.js')}"></script>
  495. <script>
  496. //接口调用测试,海波,log里有返回的数据
  497. // $(function(){
  498. // $.post('/api/user/getReadRecently',{pageNo:1,pageSize:5},function(data){
  499. // console.log(data);
  500. // })
  501. // })
  502. var pagenum=2,
  503. sBookstop=true,
  504. sBookstopTime=null,
  505. pagesize=10,
  506. block_id = $("#block_id").val(),
  507. user_id=$.fn.cookie('user_id');
  508. $(function(){
  509. $('img').picLazyLoad({
  510. effect : "fadeIn"
  511. });
  512. if(user_id && $('#recent_ul li').length >= pagesize){
  513. console.log(user_id);
  514. $(window).scroll(function(){
  515. var nWinH = document.documentElement.clientHeight;
  516. var nScrollTop = (document.body.scrollTop || document.documentElement.scrollTop) + nWinH;
  517. var nBodyScrollH = document.body.scrollHeight;
  518. if(sBookstop && nBodyScrollH - nScrollTop < 600){
  519. bookstoptime();
  520. loadingList();
  521. }
  522. });
  523. }
  524. });
  525. function loadingList(){
  526. var sUpadateTime = '';
  527. if($('#recent_ul li').length > 0){
  528. var sUpadateTime = $('#recent_ul li').last().attr('supdatet');
  529. }
  530. $('.loading_box').html('<span>正在加載中,请稍候......</span>').show();
  531. console.log(sUpadateTime);
  532. $.ajax({
  533. type: 'post',
  534. url: '/api/user/getReadRecently',
  535. timeout: 10000,
  536. cache: false,
  537. dataType: 'json',
  538. data: {
  539. 'pageSize':pagesize,
  540. 'updatetime':sUpadateTime
  541. },
  542. success: function (data) {
  543. clearTimeout(sBookstopTime);
  544. if (typeof data == 'string') {
  545. data = JSON.parse(data);
  546. }
  547. console.log(data);
  548. data = data.data;
  549. var sLi = '';
  550. for(var i=0; i<data.length; i++){
  551. if(data[i]['state'] == 1 || data[i]['state'] == '-1'){
  552. sLi += '<li supdatet="' + data[i].updatetime + '" sbid = "' + data[i].book_id + '"'+ 'recentid = "'+ data[i].id+'">\
  553. <a href="/index/book/chapter?book_id='+ data[i]['book_id']+'&chapter_id='+ data[i]['chapter_id']+'">\
  554. <div class="r_img">\
  555. <img src="{:asset('/img/frontend/images/default_img.png')}" data-original="'+ data[i]['image'] +'" />\
  556. <span></span>\
  557. </div>\
  558. <div class="r_img_text">\
  559. <h3>'+ data[i]['book_name'] +'</h3>\
  560. <div class="r_img_chaptername">更新至:'+ data[i]['last_chapter_name'] +'</div>\
  561. <div class="r_img_chaptername r_img_chaptername_prev">上次读到:'+ data[i]['chapter_name'] +'</div>\
  562. </div>\
  563. </a>\
  564. </li>';
  565. }else{
  566. sLi += '<li supdatet="' + data[i].updatetime + '" sbid = "' + data[i].book_id + '"'+ 'recentid = "'+ data[i].id+'">\
  567. <a href="javascript:;" class="r_img_book_null">\
  568. <div class="r_img">\
  569. <img src="{:asset('/img/frontend/images/default_img.png')}" data-original="'+ data[i]['image'] +'" />\
  570. <span></span>\
  571. </div>\
  572. <div class="r_img_text">\
  573. <h3>'+ data[i]['book_name'] +'</h3>\
  574. <div class="r_img_other">本书已下架</div>\
  575. <div class="r_img_chaptername r_img_chaptername_prev">上次读到:'+ data[i]['chapter_name'] +'</div>\
  576. </div>\
  577. </a>\
  578. </li>';
  579. }
  580. }
  581. $('#recent_ul').append(sLi);
  582. pagenum ++;
  583. if(data.length < pagesize){
  584. $('.loading_box').html('<span>已显示全部</span>').show();
  585. sBookstop = false;
  586. }else{
  587. $('.loading_box').html('<span>下拉加载更多</span>').show();
  588. sBookstop = true;
  589. }
  590. $('img').picLazyLoad({
  591. effect : "fadeIn"
  592. });
  593. },
  594. error: function (XMLHttpRequest, textStatus, errorThrown) {
  595. }
  596. });
  597. }
  598. //防止重复请求数据
  599. function bookstoptime() {
  600. clearTimeout(sBookstopTime);
  601. sBookstop = false;
  602. sBookstopTime = setTimeout(function () {
  603. sBookstop = true;
  604. }, 10000);
  605. }
  606. </script>
  607. <script type="text/javascript" src="{:asset('/js/frontend/common_tips.js')}"></script>
  608. <!-- 多条广告如下脚本只需引入一次 -->
  609. {if condition="$isAdPick"}
  610. {include file="public/ad_common_js"}
  611. <script type="text/javascript" src="{:asset('/js/frontend/ad/ad_welfare.js')}"></script>
  612. {/if}
  613. <script>
  614. window.$isAdPick = '{$isAdPick}'
  615. window.$adLatestVersion = '{$ad_latest_version}'
  616. $(function(){
  617. window.$isAdPick == '1' && window.simpleAD.render(window.AD_PAGE_CODE.RECENT_READ)
  618. })
  619. </script>
  620. {/block}