huaweiActivity.blade.php 10.0 KB

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