yearactivityV3.blade.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>全年免费看书-限时优惠</title>
  8. <style>
  9. html,
  10. body {
  11. margin: 0 auto;
  12. padding: 0;
  13. max-width: 450px;
  14. font-size: 100px;
  15. }
  16. p {
  17. margin: 0;
  18. padding: 0;
  19. text-align: center;
  20. }
  21. .main_box {
  22. font-size: 0;
  23. position: relative;
  24. }
  25. .main_box img {
  26. width: 100%;
  27. }
  28. .main_box .intro {
  29. font-size: 0.15rem;
  30. line-height: 0.26rem;
  31. color: #612e24;
  32. text-indent: 2em;
  33. margin: 0.1rem;
  34. /*font-weight: 600;*/
  35. text-align: left;
  36. }
  37. .main_box .coupon {
  38. width: 90%;
  39. margin: 0 auto;
  40. }
  41. .main_box .coupon img{
  42. pointer-events: none;
  43. }
  44. .main_box .gray {
  45. color: #b4b4b4;
  46. font-size: 0.14rem;
  47. }
  48. .main_box .gray span {
  49. color: #ff3728;
  50. font-weight: bolder;
  51. }
  52. .purchase {
  53. display: block;
  54. width: 90%;
  55. margin: 0 auto 0.2rem;
  56. }
  57. .main_box .strong {
  58. font-size: 0.16rem;
  59. font-weight: 800;
  60. color: #f62b24;
  61. margin: 0.1rem;
  62. }
  63. .book-list {
  64. padding: 0.2rem 0;
  65. background: #fff5f4;
  66. }
  67. .book-list h3 {
  68. font-size: 0.16rem;
  69. color: #000;
  70. display: flex;
  71. justify-content: flex-start;
  72. align-items: center;
  73. }
  74. h3::before {
  75. content: "";
  76. display: inline-block;
  77. vertical-align: sup;
  78. width: 0.04rem;
  79. height: 0.16rem;
  80. border-radius: 4px;
  81. background: #ff7326;
  82. margin-right: 0.1rem;
  83. }
  84. h3 span {
  85. font-size: 0.14rem;
  86. color: #fe4c3f;
  87. margin-left: 0.1rem
  88. }
  89. .book-list__container {
  90. display: flex;
  91. justify-content: space-between;
  92. align-items: center;
  93. flex-flow: row wrap;
  94. padding: 0 0.1rem;
  95. }
  96. .book-item {
  97. width: 28%;
  98. margin-bottom: 0.1rem;
  99. }
  100. .book-item span {
  101. background: #ffe0e1;
  102. color: #ff7474;
  103. font-size: 0.12rem;
  104. margin-right: 0.05rem;
  105. padding: 0.02rem 0.06rem;
  106. border-radius: 20px;
  107. display: inline-block;
  108. margin-top: 0.1rem;
  109. }
  110. .coupon-dialog {
  111. position: fixed;
  112. top: 0;
  113. bottom: 0;
  114. left: 0;
  115. right: 0;
  116. background: rgba(0, 0, 0, 0.3);
  117. overflow: hidden;
  118. z-index: 99;
  119. }
  120. .dialog-box {
  121. position: absolute;
  122. width: 90%;
  123. top: 50%;
  124. left: 50%;
  125. transform: translate(-50%, -50%);
  126. }
  127. .dialog-box img {
  128. width: 100%;
  129. }
  130. .dialog-box .close {
  131. background: url(https://cdn-novel.iycdm.com/h5/activity-2018-10-26/close.png) center / contain no-repeat;
  132. width: 0.32rem;
  133. height: 0.32rem;
  134. margin: 0 auto;
  135. }
  136. </style>
  137. </head>
  138. <body>
  139. <main class="main_box">
  140. <div class="banner">
  141. <img src="https://cdn-novel.iycdm.com/h5/activity-2018-12-20/banner.jpg" alt="">
  142. </div>
  143. <p class="intro">
  144. 365天内,全站书籍免费看!无需额外付费!最新最火最热门小说一网打尽,限时低价,机会难得,赶快订购吧!
  145. </p>
  146. <input type="hidden" name="is_get" value="{{$is_get}}">
  147. <div class="coupon" data-value="{{$discount}}">
  148. @if($discount == 50)
  149. <img src="https://cdn-novel.iycdm.com/h5/activity-2018-12-20/coupon_pick.png" alt="">
  150. @else
  151. <img src="https://cdn-novel.iycdm.com/h5/activity-2018-12-20/coupon_pick_80.png" alt="">
  152. @endif
  153. </div>
  154. @if($discount == 50)
  155. <p class="gray">原价365元,领券立减50元,仅需<span>315</span>元</p>
  156. <p class="strong">每天0.8元,全站小说免费看</p>
  157. @elseif($discount == 80)
  158. <p class="gray">原价365元,领券立减80元,仅需<span>285</span>元</p>
  159. <p class="strong">每天0.7元,全站小说免费看</p>
  160. @endif
  161. <div>
  162. @if($code == 0)
  163. <!-- 活动进行中 -->
  164. <a class="purchase doing" href="{{$coupons_url}}" id="js-purchase-doing">
  165. {{-- <img src="https://cdn-novel.iycdm.com/h5/year_doing.png" alt="">--}}
  166. <img src="https://cdn-novel.iycdm.com/h5/activity-2018-09-14/button.png" alt="">
  167. </a>
  168. @elseif($code == 1)
  169. <!-- 活动未开始 -->
  170. <a class="purchase undone " href="#">
  171. <img src="https://cdn-novel.iycdm.com/h5/year_undone.png" alt="">
  172. </a>
  173. @elseif($code == 2)
  174. <!-- 活动结束 -->
  175. <a class="purchase over " href="#">
  176. <img src="https://cdn-novel.iycdm.com/h5/year_over.png" alt="">
  177. </a>
  178. @elseif($code == 3)
  179. <!-- 已订购 -->
  180. <a class="purchase done " href="#">
  181. <img src="https://cdn-novel.iycdm.com/h5/year_done.png" alt="">
  182. </a>
  183. @endif
  184. </div>
  185. <div class="book-list">
  186. <h3>榜单精选
  187. <span>海量小说任意看</span>
  188. </h3>
  189. <div class="book-list__container">
  190. @foreach($books as $book)
  191. <a class="book-item" href="#">
  192. <img src="{{$book['cover_url']}}" alt="">
  193. <span>{{$book['book_category']}}</span>
  194. </a>
  195. @endforeach
  196. </div>
  197. </div>
  198. </main>
  199. <div class="coupon-dialog" style="display:none">
  200. <div class="dialog-box">
  201. @if($discount == 80)
  202. <img src="https://cdn-novel.iycdm.com/h5/activity-2018-12-20/dialog80.png" alt="">
  203. @else
  204. <img src="https://cdn-novel.iycdm.com/h5/activity-2018-12-20/dialog50.png" alt="">
  205. @endif
  206. <div class="close"></div>
  207. </div>
  208. </div>
  209. </body>
  210. <script src="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
  211. <script>
  212. var isget = {{$is_get}}
  213. isget = parseInt(isget)
  214. var d = document.querySelector('.coupon-dialog')
  215. var c = document.querySelector('.close')
  216. function showDialog() {
  217. var s = document.body.style
  218. s.overflow = 'hidden'
  219. d.style.display = 'block'
  220. // ajax 自动打开领取框
  221. }
  222. c.addEventListener('click', function (e) {
  223. e.stopPropagation()
  224. d.style.display = 'none'
  225. closeDialog()
  226. }, false)
  227. function closeDialog() {
  228. document.body.style.overflow = ''
  229. }
  230. if(!isget){
  231. showDialog()
  232. }
  233. </script>
  234. </html>