bookinfo.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. {extend name="kuaifen@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/classify.css')}" rel="stylesheet" type="text/css">
  7. <link href="{:asset('/css/frontend/book_details.css')}" rel="stylesheet" type="text/css">
  8. <style type="text/css">
  9. .bd_but_box {
  10. overflow: visible;
  11. }
  12. .bd_but_box a {
  13. display: inline-block;
  14. width: 1.5rem;
  15. }
  16. .bd_but_box a.js_add_shelfed {
  17. background: rgba(242, 242, 242, 1);
  18. color: rgba(214, 214, 214, 1);
  19. }
  20. .bd_but_box .add-icon {
  21. float: left;
  22. width: 10%;
  23. padding: 0.085rem 0.15rem 0 0.25rem;
  24. }
  25. .bd_but_box a.js_add_shelf {
  26. background: rgba(255, 255, 255, 1);
  27. box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.06);
  28. text-align: center;
  29. color: #E63B64;
  30. }
  31. .bd_but_box a.buts_2.js_add_shelf {
  32. background: rgba(255, 255, 255, 1);
  33. box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.06);
  34. text-align: center;
  35. color: #E63B64;
  36. }
  37. .bd_type .type_text.vip_cp_style {
  38. background: linear-gradient(180deg, rgba(255, 216, 135, 1) -11%, rgba(243, 224, 184, 1) 100%);
  39. color: #AC883B;
  40. }
  41. </style>
  42. {/block}
  43. {block name="zepto"}
  44. {block name="main"}
  45. <!-- 这是正文 -->
  46. <style>
  47. .bd_info_top{
  48. background: #fff;
  49. }
  50. .bd_head_info_txt h1{
  51. color:rgba(0,0,0,.8);
  52. margin-bottom: 0;
  53. }
  54. .bd_head_info_txt .bd_type{
  55. margin-top: .04rem;
  56. margin-bottom: .04rem;
  57. }
  58. .bd_info_top .bd_head_info_img,.bd_info_top .bd_head_info_img img{
  59. width: .96rem;
  60. height: auto;
  61. }
  62. .cg_inro{
  63. height: .8rem;
  64. line-height: .2rem;
  65. text-overflow: -o-ellipsis-lastline;
  66. overflow: hidden;
  67. text-overflow: ellipsis;
  68. display: -webkit-box;
  69. -webkit-line-clamp: 4;
  70. line-clamp: 4;
  71. -webkit-box-orient: vertical;
  72. }
  73. .cg_share {
  74. margin-top: .3rem;
  75. }
  76. .cg_share h2{
  77. margin-bottom: .14rem;
  78. overflow: hidden;
  79. height: .26rem;
  80. font-family: 'PingFang-SC-Medium';
  81. font-weight: 600;
  82. font-size: .19rem;
  83. line-height: .26rem;
  84. padding-left: .15rem;
  85. color:rgba(0,0,0,.8);
  86. }
  87. .cg_share {
  88. border-bottom: 1px solid rgb(218, 215, 215);
  89. overflow:hidden;
  90. }
  91. .cg_share a {
  92. float: left;
  93. width: 50%;
  94. text-align: center;
  95. margin-bottom: .2rem;
  96. color:rgba(0,0,0,.8);
  97. }
  98. .cg_share a img {
  99. width: 25%;
  100. margin:0 auto;
  101. border-radius: 50%;
  102. font-size: 0;
  103. }
  104. .cg_share a p {
  105. margin-top: .06rem;
  106. font-size: .16rem;
  107. height: 0.2rem;
  108. line-height: .2rem;
  109. text-align: center;
  110. }
  111. .cg_send{
  112. padding-top: .16rem;
  113. }
  114. .cg_send h2 {
  115. margin-bottom: 0.14rem;
  116. overflow: hidden;
  117. height: 0.26rem;
  118. font-weight: 600;
  119. font-size: .19rem;
  120. line-height: .26rem;
  121. padding-left: .15rem;
  122. color: rgba(0, 0, 0, .8);
  123. }
  124. .cg_send .box {
  125. box-sizing: border-box;
  126. width: 96%;
  127. border:1px solid rgba(0, 0, 0, .3);
  128. margin: 0 auto;
  129. padding: 0 .066rem;
  130. }
  131. .cg_send .box h2{
  132. margin-bottom: .06rem;
  133. padding-left: 0;
  134. margin-top: 6px;
  135. }
  136. .cg_send .box h2.cg_rules{
  137. margin-top: 12px;
  138. }
  139. .cg_send .box h2 ul.u2{
  140. margin-top: .3rem;
  141. }
  142. .cg_send .box h2 ul li {
  143. font-size: .16rem;
  144. line-height: .2rem;
  145. color:rgba(0, 0, 0, .8);
  146. margin-bottom: .06rem;
  147. }
  148. </style>
  149. <div class="book_info">
  150. <div class="body_sytle">
  151. <div class="bd_head_box">
  152. <div class="bd_head_info">
  153. <div class="bd_info_top">
  154. <div class="bd_head_info_img"><img src="{$book.image}"/></div>
  155. <div class="bd_head_info_txt">
  156. <h1>{$book.name}</h1>
  157. <div class="bd_type">
  158. <span class="type_text">{$book.category_text}</span>
  159. </div>
  160. <div class="cg_inro">{$book.description}</div>
  161. </div>
  162. </div>
  163. <div class="cg_share">
  164. <h2>一键分享赚钱</h2>
  165. <a href="javascript:;" class="js_share_to_wx_session">
  166. <img src="/assets/img/frontend/icon/shareToWxSession.jpeg" alt="">
  167. <p>分享给好友</p>
  168. </a>
  169. <a href="javascript:;" class="js_share_to_wx_timeline">
  170. <img src="/assets/img/frontend/icon/shareToWxTimeline.jpeg" alt="">
  171. <p>分享朋友圈</p>
  172. </a>
  173. </div>
  174. <div class="cg_send">
  175. <h2>转发提示</h2>
  176. <div class="box">
  177. <h2>转发小技巧</h2>
  178. <ul>
  179. <li>1. 分享给喜欢读小说的朋友, 效果会更好;</li>
  180. <li>2. 在茶余饭后分享, 涨粉更快;</li>
  181. <li>3. 分享的时候加上一些自己的感受, 更容易让朋友来阅读.</li>
  182. </ul>
  183. <h2 class="cg_rules">转发规则</h2>
  184. <ul class="u2">
  185. <li>1. 本区分享产生的收益, 师父不享受徒弟20%提成和徒孙10%提成;</li>
  186. <li>2. 本平台用户互相分享小说阅读不计费.</li>
  187. </ul>
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. <input type="hidden" id="uid" value="{$uid}">
  193. </div>
  194. </div>
  195. {/block}
  196. {block name="js"}
  197. <script type="text/javascript">
  198. $(function () {
  199. var bookId = '{$book_id}';
  200. var title = '{$book.name}';
  201. var description = '{$book.description}';
  202. var image = '{$book.image}';
  203. var uid = '{$uid}';
  204. var getUrlParams = {
  205. uid: uid,
  206. xsid: bookId
  207. };
  208. $('.js_share_to_wx_session').click(function () {
  209. console.log('wx_session_click');
  210. $.get('https://kf.subno.cn/api/getShareUrl.php', getUrlParams, function (data) {
  211. var res = JSON.parse(data);
  212. // 分享到微信群
  213. $.post('https://kf.subno.cn/novel_share.php', {
  214. n_id: bookId,
  215. title: title,
  216. abstract: description,
  217. pic: image,
  218. url: res.url,
  219. scene: 1,
  220. uid: uid
  221. }, function (result) {
  222. var params = [res.url, title, description, image, 'cj'];
  223. var strParams = params.join('||');
  224. if (isIos()) {
  225. nativeApp.newShareToWX(strParams);
  226. } else {
  227. nativeApp.shareToWXSession(strParams);
  228. }
  229. });
  230. });
  231. });
  232. $('.js_share_to_wx_timeline').click(function () {
  233. console.log('wx_timeline_click');
  234. $.get('https://kf.subno.cn/api/getShareUrl.php', getUrlParams, function (data) {
  235. var res = JSON.parse(data);
  236. // 分享到微信群
  237. $.post('https://kf.subno.cn/novel_share.php', {
  238. n_id: bookId,
  239. title: title,
  240. abstract: description,
  241. pic: image,
  242. url: res.url,
  243. scene: 0,
  244. uid: uid
  245. }, function (result) {
  246. var params = [res.url, title, description, image, 'cj'];
  247. var strParams = params.join('||');
  248. if (isIos()) {
  249. nativeApp.newShareToWX(strParams);
  250. } else {
  251. nativeApp.shareToWXTimeline(strParams);
  252. }
  253. });
  254. });
  255. });
  256. });
  257. </script>
  258. {/block}