huaweiActivity.blade.php 9.9 KB

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