sign.blade.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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. <style>
  11. html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote,
  12. pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small,
  13. strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
  14. table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details,
  15. figcaption, figure, footer, header, menu, nav, section, summary, time, mark, audio,
  16. video {
  17. margin: 0;
  18. padding: 0;
  19. border: 0;
  20. outline: 0;
  21. font-size: 100%;
  22. vertical-align: baseline;
  23. background: transparent;
  24. }
  25. html {
  26. background: #fff;
  27. }
  28. body {
  29. line-height: 1.5;
  30. font-size: 0.24rem;
  31. font-family: sans-serif, "Microsoft YaHei";
  32. margin: auto;
  33. max-width: 750px;
  34. text-align: center;
  35. -webkit-font-smoothing: antialiased;
  36. }
  37. :focus {
  38. outline: 1;
  39. }
  40. article,
  41. aside,
  42. canvas,
  43. details,
  44. figcaption,
  45. figure,
  46. footer,
  47. header,
  48. hgroup,
  49. menu,
  50. nav,
  51. section,
  52. summary {
  53. display: block;
  54. }
  55. ul {
  56. list-style: none;
  57. }
  58. blockquote,
  59. q {
  60. quotes: none;
  61. }
  62. blockquote:before,
  63. blockquote:after,
  64. q:before,
  65. q:after {
  66. content: "";
  67. content: none;
  68. }
  69. a {
  70. margin: 0;
  71. padding: 0;
  72. border: 0;
  73. font-size: 100%;
  74. vertical-align: baseline;
  75. background: transparent;
  76. text-decoration: none;
  77. }
  78. ins {
  79. background-color: #ff9;
  80. color: #000;
  81. text-decoration: none;
  82. }
  83. mark {
  84. background-color: #ff9;
  85. color: #000;
  86. font-style: italic;
  87. font-weight: bold;
  88. }
  89. del {
  90. text-decoration: line-through;
  91. }
  92. abbr[title],
  93. dfn[title] {
  94. border-bottom: 1px dotted #000;
  95. cursor: help;
  96. }
  97. table {
  98. border-collapse: collapse;
  99. border-spacing: 0;
  100. }
  101. hr {
  102. display: block;
  103. height: 1px;
  104. border: 0;
  105. border-top: 1px solid #cccccc;
  106. margin: 0;
  107. padding: 0;
  108. }
  109. input,
  110. select {
  111. vertical-align: middle;
  112. padding: 0;
  113. margin: 0;
  114. }
  115. input[type="button"],
  116. input[type="submit"],
  117. input[type="reset"] {
  118. -webkit-appearance: none;
  119. }
  120. img {
  121. -webkit-tap-highlight-color: transparent;
  122. }
  123. i {
  124. font-style: normal;
  125. }
  126. body.dialog-open {
  127. position: fixed;
  128. width: 100%;
  129. }
  130. input::-webkit-search-cancel-button {
  131. display: none;
  132. }
  133. .sign-container {
  134. font-size: 0;
  135. position: relative;
  136. }
  137. .sign-bg {
  138. width: 100%;
  139. }
  140. .sign-num__total {
  141. position: absolute;
  142. font-size: 22px;
  143. top: 22%;
  144. left: 50%;
  145. -webkit-transform: translateX(-50%);
  146. transform: translateX(-50%);
  147. color: #fff;
  148. }
  149. .sign-result__box {
  150. position: absolute;
  151. font-size: 14px;
  152. color: #333;
  153. top: 28%;
  154. left: 10%;
  155. right: 10%;
  156. text-align: center;
  157. z-index: 9;
  158. }
  159. .sign-new_tips {
  160. margin: 0.25rem 0;
  161. padding: 0.35rem 0;
  162. background-color: #fff2ef;
  163. border: solid 1px #fe6138;
  164. color: #fe6138;
  165. text-align: justify;
  166. }
  167. .sign-new_tips p {
  168. padding: 0 0.5rem;
  169. }
  170. .sign-new_tips p:nth-child(1) {
  171. font-weight: bold;
  172. letter-spacing: 2px;
  173. }
  174. .sign-new_tips p:nth-child(2) {
  175. font-size: 13px;
  176. }
  177. .sign-day__list {
  178. margin-top: 10px;
  179. }
  180. .day-box {
  181. display: -webkit-box;
  182. display: -ms-flexbox;
  183. display: flex;
  184. -webkit-box-align: center;
  185. -ms-flex-align: center;
  186. align-items: center;
  187. -webkit-box-orient: horizontal;
  188. -webkit-box-direction: normal;
  189. -ms-flex-direction: row;
  190. flex-direction: row;
  191. -webkit-box-pack: justify;
  192. -ms-flex-pack: justify;
  193. justify-content: space-between;
  194. }
  195. .day-box .day-item {
  196. width: 15%;
  197. margin-bottom: 10px;
  198. font-size: 12px;
  199. color: #999;
  200. }
  201. .day-box .day-item img {
  202. width: 100%;
  203. }
  204. .day-box .day-item.nmr {
  205. margin-right: 0;
  206. }
  207. .day-item .sign-img {
  208. position: relative;
  209. }
  210. .day-item .sign-img::after {
  211. content: "";
  212. position: absolute;
  213. right: -52%;
  214. top: 50%;
  215. -webkit-transform: translateY(-50%);
  216. transform: translateY(-50%);
  217. height: 2px;
  218. width: 62%;
  219. background: #ff4400;
  220. z-index: -1;
  221. }
  222. .day-item .sign-img.line-v::after {
  223. width: 2px;
  224. height: 110%;
  225. left: 50%;
  226. -webkit-transform: translateX(-50%);
  227. transform: translateX(-50%);
  228. top: 77%;
  229. }
  230. .even-box .sign-img::after {
  231. right: 0;
  232. left: -52%;
  233. }
  234. .day-box .day-item:not(:last-child) {
  235. margin-right: 0.2rem;
  236. }
  237. .even-box {
  238. -webkit-box-orient: horizontal;
  239. -webkit-box-direction: reverse;
  240. -ms-flex-direction: row-reverse;
  241. flex-direction: row-reverse;
  242. }
  243. .even-box .day-item:first-child {
  244. margin-right: 0px;
  245. }
  246. .even-box .day-item:not(:last-child) {
  247. margin-right: 0px;
  248. }
  249. .to-sign__record {
  250. display: block;
  251. text-align: right;
  252. color: #999;
  253. font-size: 12px;
  254. }
  255. .to-read {
  256. font-size: 0;
  257. margin-top: 10px;
  258. }
  259. .to-read img {
  260. width: 100%;
  261. }
  262. .sign-status {
  263. text-align: center;
  264. }
  265. .sign-status img {
  266. width: 60%;
  267. margin: 10px 0;
  268. }
  269. </style>
  270. <title>签到</title>
  271. </head>
  272. <body>
  273. <main class="sign-page">
  274. <div class="sign-container">
  275. <img
  276. class="sign-bg"
  277. src="https://cdn-novel.iycdm.com/h5/sign/20190613_sign_bg.jpg"
  278. alt=""
  279. />
  280. <p class="sign-num__total">连续签到{{$sign_count}}天</p>
  281. <div class="sign-result__box">
  282. <p class="sign-notice" id="sign-notice"></p>
  283. <div class="sign-new_tips">
  284. <p>亲爱的读者们:</p>
  285. <p>为了确保更好的奖励体验,签到活动即将改版哦,敬请关注!</p>
  286. </div>
  287. <div class="sign-day__list">
  288. <!-- even-box -->
  289. <!-- 每行一个day-box 偶数个添加even-box -->
  290. <div class="day-box">
  291. @for($i = 1;$i <=5;$i++)
  292. <div class="day-item">
  293. <div class="sign-img {{$i == 5?'line-v':''}}">
  294. @if(($i <= $sign_count% 15) || $sign_count% 15 == 0 )
  295. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_pass.png" alt="" />
  296. @elseif($i == $sign_count % 15)
  297. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_today.png" alt="" />
  298. @else
  299. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_coin.png" alt="" />
  300. @endif
  301. </div>
  302. <span>第{{$i}}天</span>
  303. </div>
  304. @endfor
  305. </div>
  306. <div class="day-box even-box">
  307. @for($j = 6;$j <=10;$j++)
  308. <div class="day-item">
  309. <div class="sign-img {{$j == 10?'line-v':''}}">
  310. @if(($j <= $sign_count % 15 || $sign_count% 15 == 0) && $j != 7)
  311. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_pass.png" alt="" />
  312. @elseif($j == $sign_count % 15)
  313. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_today.png" alt="" />
  314. @elseif($j == 7)
  315. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_7.png" alt="" />
  316. @else
  317. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_coin.png" alt="" />
  318. @endif
  319. </div>
  320. <span>第{{$j}}天</span>
  321. </div>
  322. @endfor
  323. </div>
  324. <div class="day-box">
  325. @for($k = 11;$k <=15;$k++)
  326. <div class="day-item">
  327. <div class="{{$k == 15?'line-v':'sign-img'}}">
  328. @if(($k < $sign_count % 15 || $sign_count % 15 == 0 ) && $k != 15)
  329. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_pass.png" alt="" />
  330. @elseif($k == $sign_count % 15 && $k != 15)
  331. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_today.png" alt="" />
  332. @elseif($k == 15)
  333. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_15.png" alt="" />
  334. @else
  335. <img src="https://cdn-novel.iycdm.com/h5/sign/sign_coin.png" alt="" />
  336. @endif
  337. </div>
  338. <span>第{{$k}}天</span>
  339. </div>
  340. @endfor
  341. </div>
  342. </div>
  343. <a href="/record/sign" class="to-sign__record">签到记录 &gt;</a>
  344. <a href="/continue" class="to-read">
  345. <img src="https://cdn-novel.iycdm.com/h5/sign/to_read.png" alt="" />
  346. </a>
  347. </div>
  348. </div>
  349. </main>
  350. </body>
  351. <script>
  352. // 根据签到时间的不同 显示不同的文案
  353. var signDay = {{$sign_count}}
  354. signDay = parseInt(signDay)
  355. var signCoin = {{$fee}}
  356. signCoin = parseInt(signCoin)
  357. function getNoticeText(signDay, signCoin) {
  358. var html = "";
  359. switch (signDay) {
  360. case 1:
  361. case 2:
  362. html =
  363. "今天签到赠送" +
  364. signCoin +
  365. "书币,连续签到每日可领50书币,最高月送2000书币~";
  366. break;
  367. case 6:
  368. html = "今天签到赠送" + signCoin +"书币,明日签到可以领取小礼包哦~";
  369. break;
  370. case 7:
  371. html = "今天签到赠送" + signCoin + "书币,签到已满7日,额外送您100书币大礼包~";
  372. break;
  373. case 14:
  374. html = "今天签到赠送" + signCoin + "书币,明日签到可以领取大礼包哦~";
  375. break;
  376. case 15:
  377. html = "今天签到赠送" + signCoin + "书币,签到已满15日,送您150书币大礼包~";
  378. break;
  379. default:
  380. html = "今天签到赠送" + signCoin + "书币,额外连续签到最高月送2000书币~";
  381. }
  382. return html;
  383. }
  384. document.querySelector("#sign-notice").innerHTML = getNoticeText(signDay, signCoin);
  385. </script>
  386. </html>