huaweiActivity.blade.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta
  6. name="viewport"
  7. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
  8. />
  9. <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  10. <title>抽奖大礼包</title>
  11. <style>
  12. html,
  13. body {
  14. margin: 0 auto;
  15. padding: 0;
  16. max-width: 450px;
  17. font-size: 100px;
  18. }
  19. html {
  20. background: #fff;
  21. }
  22. a {
  23. text-decoration: none;
  24. color: currentColor;
  25. -webkit-tap-highlight-color: transparent;
  26. }
  27. p {
  28. margin: 0;
  29. }
  30. i {
  31. font-style: normal;
  32. }
  33. .main_box {
  34. font-size: 0;
  35. position: relative;
  36. }
  37. .main_box img {
  38. width: 100%;
  39. }
  40. .main_box .banner-box {
  41. font-size: 0;
  42. position: relative;
  43. }
  44. .main_box .banner-box .click-area {
  45. position: absolute;
  46. bottom: 6%;
  47. left: 50%;
  48. -webkit-transform: translateX(-50%);
  49. transform: translateX(-50%);
  50. width: 1rem;
  51. height: 0.35rem;
  52. }
  53. .main_box .activity-time {
  54. font-size: 0.12rem;
  55. color: #97643e;
  56. text-align: center;
  57. margin-top: 0.1rem;
  58. }
  59. .main_box .recharge-list__wrap {
  60. display: -webkit-box;
  61. display: -ms-flexbox;
  62. display: flex;
  63. -webkit-box-pack: justify;
  64. -ms-flex-pack: justify;
  65. justify-content: space-between;
  66. -webkit-box-align: center;
  67. -ms-flex-align: center;
  68. align-items: center;
  69. -webkit-box-orient: horizontal;
  70. -webkit-box-direction: normal;
  71. -ms-flex-flow: row wrap;
  72. flex-flow: row wrap;
  73. width: 90%;
  74. margin: 0.14rem auto 0;
  75. }
  76. .main_box .recharge-list__wrap .recharge-item {
  77. padding: 0.14rem 0 0.12rem;
  78. width: 1.51rem;
  79. font-size: 0.12rem;
  80. color: #97643e;
  81. text-align: center;
  82. border: 1px solid #97643e;
  83. border-radius: 5px;
  84. }
  85. .main_box .recharge-list__wrap .recharge-item .pay {
  86. font-size: 0.25rem;
  87. font-weight: bold;
  88. }
  89. .main_box .recharge-list__wrap .recharge-item .get {
  90. font-weight: bold;
  91. color: #f35a0a;
  92. }
  93. .main_box .recharge-list__wrap .recharge-item.cur {
  94. border-color: transparent;
  95. background-image: -webkit-gradient(linear, left bottom, left top, from(#e2c18c), to(#f2d8aa));
  96. background-image: linear-gradient(0deg, #e2c18c 0%, #f2d8aa 100%);
  97. -webkit-box-shadow: 0px 0px 0.18rem 0px rgba(188, 142, 91, 0.5);
  98. box-shadow: 0px 0px 0.18rem 0px rgba(188, 142, 91, 0.5);
  99. color: #6f4518;
  100. }
  101. .main_box .recharge-list__wrap .recharge-item.cur .get {
  102. color: #6f4518;
  103. }
  104. .main_box .recharge-list__wrap .recharge-item:nth-of-type(1), .main_box .recharge-list__wrap .recharge-item:nth-of-type(2) {
  105. margin-bottom: 0.15rem;
  106. }
  107. .main_box .to-recharge {
  108. width: 90%;
  109. margin: 0.16rem auto 0;
  110. display: block;
  111. text-align: center;
  112. color: #6f4518;
  113. font-size: 0.18rem;
  114. line-height: 50px;
  115. background-image: -webkit-gradient(linear, right top, left top, from(#e2c18c), to(#f2d8aa));
  116. background-image: linear-gradient(-90deg, #e2c18c 0%, #f2d8aa 100%);
  117. -webkit-box-shadow: 0px 0px 0.18rem 0px rgba(188, 142, 91, 0.5);
  118. box-shadow: 0px 0px 0.18rem 0px rgba(188, 142, 91, 0.5);
  119. border-radius: 25px;
  120. -webkit-tap-highlight-color: transparent;
  121. }
  122. .rule-box .rule-line {
  123. border-top: 1px solid #edc7ab;
  124. height: 0px;
  125. width: 80%;
  126. margin: 0.23rem auto;
  127. position: relative;
  128. }
  129. .rule-box .rule-line::after {
  130. content: "活动说明";
  131. position: absolute;
  132. font-size: 0.13rem;
  133. font-weight: bold;
  134. color: #97643e;
  135. left: 50%;
  136. top: 50%;
  137. -webkit-transform: translate(-50%, -50%);
  138. transform: translate(-50%, -50%);
  139. background: #fff;
  140. width: 100px;
  141. text-align: center;
  142. }
  143. .rule-box .rule-items {
  144. width: 80%;
  145. margin: 0 auto;
  146. font-size: 0.12rem;
  147. color: #97643e;
  148. line-height: 2;
  149. }
  150. .dialog-wrap {
  151. position: fixed;
  152. top: 0;
  153. bottom: 0;
  154. left: 0;
  155. right: 0;
  156. background: rgba(0, 0, 0, 0.3);
  157. }
  158. .dialog-wrap .dialog-content {
  159. position: absolute;
  160. top: 50%;
  161. left: 50%;
  162. width: 90%;
  163. -webkit-transform: translate(-50%, -60%);
  164. transform: translate(-50%, -60%);
  165. }
  166. .dialog-wrap .bg-wrap {
  167. font-size: 0;
  168. }
  169. .dialog-wrap .content {
  170. position: absolute;
  171. top: 50%;
  172. left: 50%;
  173. -webkit-transform: translate(-50%, -36%);
  174. transform: translate(-50%, -36%);
  175. width: 100%;
  176. }
  177. .dialog-wrap .content .text {
  178. font-size: 0.2rem;
  179. color: #7c5429;
  180. font-weight: bold;
  181. text-align: center;
  182. }
  183. .dialog-wrap .content .text i {
  184. font-size: 0.28rem;
  185. color: #d13600;
  186. font-weight: bold;
  187. }
  188. .dialog-wrap .content .to-cj {
  189. display: block;
  190. width: 1.3rem;
  191. line-height: 0.38rem;
  192. background-color: #d13600;
  193. -webkit-box-shadow: 0px 2px 27px 0px rgba(233, 64, 16, 0.58);
  194. box-shadow: 0px 2px 27px 0px rgba(233, 64, 16, 0.58);
  195. border-radius: 38px;
  196. font-size: 0.15rem;
  197. color: #fff;
  198. font-weight: bold;
  199. text-align: center;
  200. margin: 0.2rem auto 0;
  201. -webkit-tap-highlight-color: transparent;
  202. }
  203. .dialog-wrap .area-close {
  204. position: absolute;
  205. bottom: 0;
  206. left: 50%;
  207. -webkit-transform: translateX(-50%);
  208. transform: translateX(-50%);
  209. width: .4rem;
  210. height: .4rem;
  211. }
  212. .dialog-wrap img {
  213. width: 100%;
  214. }
  215. </style>
  216. </head>
  217. <body>
  218. <main class="main_box">
  219. <div class="banner-box">
  220. <img src="https://cdn-novel.iycdm.com/h5/activity-2019-05-30/banner1.jpg" alt="抽奖大礼包">
  221. @if($code == 0)
  222. <a href="/activity/huaweiLottery" class="click-area"></a>
  223. @else
  224. <a href="#" class="click-area"></a>
  225. @endif
  226. </div>
  227. <p class="activity-time">活动有效期:6月13日-{{$end_time}}</p>
  228. <div class="recharge-list__wrap">
  229. <div class="recharge-item cur" data-href="{{isset($url[0])? $url[0]:''}}">
  230. <p class="pay">30元</p>
  231. <span class="send">3000书币</span>
  232. <p class="get">获得1次抽奖机会</p>
  233. </div>
  234. <div class="recharge-item" data-href="{{isset($url[1])? $url[1]:''}}">
  235. <p class="pay">50元</p>
  236. <span class="send">5000+4000书币</span>
  237. <p class="get">获得2次抽奖机会</p>
  238. </div>
  239. <div class="recharge-item" data-href="{{isset($url[2])? $url[2]:''}}">
  240. <p class="pay">100元</p>
  241. <span class="send">10000+9000书币</span>
  242. <p class="get">获得4次抽奖机会</p>
  243. </div>
  244. <div class="recharge-item" data-href="{{isset($url[3])? $url[3]:''}}">
  245. <p class="pay">200元</p>
  246. <span class="send">20000+20000书币</span>
  247. <p class="get">获得8次抽奖机会</p>
  248. </div>
  249. </div>
  250. @if($code == 0)
  251. <a href="{{isset($url[0])? $url[0]:'#'}}" class="to-recharge" id="pay">充值后即可参与抽奖</a>
  252. @else
  253. <a href="#" class="to-recharge" >充值后即可参与抽奖</a>
  254. @endif
  255. </main>
  256. <div class="rule-box">
  257. <p class="rule-line"></p>
  258. <div class="rule-items">
  259. <p class="item">1、充值成功即获得抽奖机会;</p>
  260. <p class="item">2、此充值为书币充值,1元=100书币;</p>
  261. <p class="item">3、书币为虚拟物品,一经充值不得退款;</p>
  262. <p class="item">4、活动期间不限充值次数;</p>
  263. </div>
  264. </div>
  265. <div class="dialog-wrap" style="display: {{$display_dialog}}">
  266. <div class="dialog-content">
  267. <div class="bg-wrap">
  268. <img src="https://cdn-novel.iycdm.com/h5/activity-2019-05-30/dialog.png" alt="" />
  269. <div class="content">
  270. <p class="text">恭喜获得<i>{{$count}}次</i>抽奖机会</p>
  271. <a href="/activity/huaweiLottery" class="to-cj">立即抽奖</a>
  272. </div>
  273. </div>
  274. <span class="area-close"></span>
  275. </div>
  276. </div>
  277. </body>
  278. <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
  279. <script>
  280. $(".recharge-list__wrap").delegate(".recharge-item", "click", function() {
  281. $(".recharge-item").removeClass("cur");
  282. $(this).addClass("cur");
  283. $('#pay').attr('href',$(this).data('href'))
  284. })
  285. $(".main_box").delegate(".to-recharge", "click", function() {
  286. //$(".dialog-wrap").css("display", "");
  287. });
  288. $(".dialog-content").click(function(e) {
  289. e.stopPropagation();
  290. });
  291. [".area-close"].forEach(function(item) {
  292. $(item).click(function(e) {
  293. e.preventDefault();
  294. $(".dialog-wrap").css("display", "none");
  295. })
  296. });
  297. </script>
  298. </html>