index.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <!DOCTYPE html>
  2. <html style="font-size: 600px;">
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  5. <meta http-equiv="pragma" content="no-cache">
  6. <meta http-equiv="Cache-Control" content="no-cache">
  7. <meta http-equiv="Expires" content="0">
  8. <meta name="apple-mobile-web-app-capable" content="yes">
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  10. <meta name="format-detection" content="telephone=no">
  11. <meta name="apple-mobile-web-app-title" content="">
  12. <title>试玩</title>
  13. <style>
  14. body {
  15. margin: 0
  16. }
  17. #app {
  18. margin: 50px auto;
  19. width: 660px;
  20. height: 450px
  21. }
  22. #app>div>span {
  23. display: inline-block
  24. }
  25. body {
  26. min-height: 100%;
  27. width: 100%;
  28. font-family: 'Microsoft YaHei', 'Myriad Set Pro', 'Lucida Grande', 'Hiragino Sans GB', 'Helvetica', 'Arial', 'sans-serif';
  29. color: #333;
  30. background: #fff;
  31. -webkit-text-size-adjust: 100%;
  32. -webkit-font-smoothing: antialiased;
  33. -webkit-user-select: none;
  34. -webkit-tap-highlight-color: transparent;
  35. tap-highlight-color: transparent;
  36. font-size: 0.026rem;
  37. }
  38. .wrap-dialog {
  39. -webkit-tap-highlight-color: transparent;
  40. height: 100vh;
  41. width: 100%;
  42. background-color: #ebe6e0;
  43. background-size: cover;
  44. -webkit-transition: -webkit-transform 0.5s;
  45. transition: -webkit-transform 0.5s;
  46. transition: transform 0.5s;
  47. transition: transform 0.5s, -webkit-transform 0.5s;
  48. }
  49. #hongbao {
  50. -webkit-animation: arrowBig .5s ease;
  51. animation: arrowBig .5s ease;
  52. animation-iteration-count: 1;
  53. animation-fill-mode: forwards;
  54. -webkit-animation-iteration-count: 1;
  55. -webkit-animation-fill-mode: forwards;
  56. }
  57. @-webkit-keyframes arrowBig {
  58. 0% {
  59. -webkit-transform: scale(0);
  60. opacity: 0;
  61. }
  62. 100% {
  63. -webkit-transform: scale(1);
  64. opacity: 1;
  65. }
  66. }
  67. @keyframes arrowBig {
  68. 0% {
  69. transform: scale(0);
  70. opacity: 0;
  71. }
  72. 100% {
  73. transform: scale(1);
  74. opacity: 1;
  75. }
  76. }
  77. #btn {
  78. animation: mymove 1s infinite;
  79. -webkit-animation: mymove 1s infinite;
  80. /*Safari and Chrome*/
  81. animation-direction: alternate;
  82. /*轮流反向播放动画。*/
  83. animation-timing-function: ease-in-out;
  84. /*动画的速度曲线*/
  85. /* Safari 和 Chrome */
  86. -webkit-animation: mymove 1s infinite;
  87. -webkit-animation-direction: alternate;
  88. /*轮流反向播放动画。*/
  89. -webkit-animation-timing-function: ease-in-out;
  90. /*动画的速度曲线*/
  91. }
  92. @keyframes mymove {
  93. 0% {
  94. transform: scale(1);
  95. /*开始为原始大小*/
  96. }
  97. 25% {
  98. transform: scale(1.2);
  99. /*放大1.1倍*/
  100. }
  101. 50% {
  102. transform: scale(1);
  103. }
  104. 75% {
  105. transform: scale(1.2);
  106. }
  107. }
  108. @-webkit-keyframes mymove {
  109. 0% {
  110. transform: scale(1);
  111. /*开始为原始大小*/
  112. }
  113. 25% {
  114. transform: scale(1.2);
  115. /*放大1.1倍*/
  116. }
  117. 50% {
  118. transform: scale(1);
  119. }
  120. 75% {
  121. transform: scale(1.2);
  122. }
  123. }
  124. </style>
  125. </head>
  126. <body>
  127. <div class="wrap-dialog" style="background:url(./images/bg.jpg);background-size: cover;position: relative">
  128. <img src="./images/bg-top.png" style="position:fixed;top:0;width:100%" alt="">
  129. <img src="./images/bg-bottom.png" style="position:fixed;bottom:0;width:100%" alt="">
  130. <div id="zhuanpan">
  131. <div class="pointer"><img src="images/zhenbg.png" alt="pointer"
  132. style="width:1rem;position: absolute;left: 1.3rem;top: 3.4rem;z-index: 2;" /></div>
  133. <div class="rotate"><img id="rotate" src="images/zhuanbg.png" alt="turntable"
  134. style="width:3rem;position: absolute;left:0.3rem;top:2.5rem" /></div>
  135. <div>
  136. <img src="./images/shaw.png" alt="" style="width: 2rem;position: absolute;left: 0.8rem;top: 5.5rem;">
  137. </div>
  138. </div>
  139. <div id="hongbao" style="display:none">
  140. <img src="./images/hongbao.png" style="width:3rem;position: absolute;left:0.3rem;top:2.5rem;z-index: 10"
  141. alt="">
  142. <img src="./images/qian.png" style=" width: 1rem;
  143. position: absolute;
  144. left: 1.3rem;
  145. top: 4.15rem;
  146. z-index: 10;" alt="">
  147. <img src="./images/btn.png" id="btn" style="width: 1.6rem;
  148. position: absolute;
  149. left: 1.05rem;
  150. top: 4.7rem;
  151. z-index: 10;" alt="">
  152. <img src="./images/bg-zhuan.png" style="width:100%;position: absolute;left:0;top:2.1rem" alt="">
  153. </div>
  154. <audio src="./images/zhuan.mp3" id="mediaId"></audio>
  155. <audio src="./images/show.mp3" id="mediaShow"></audio>
  156. </div>
  157. <script src="https://sf3-ttcdn-tos.pstatp.com/obj/union-fe-nc/playable/sdk/playable-sdk.js"></script>
  158. <script type="text/javascript" src="js/jquery.min.js"></script>
  159. <script type="text/javascript" src="js/awardRotate.js"></script>
  160. <script src="./js/rem.js"></script>
  161. <script type="text/javascript">
  162. $(function () {
  163. var rotateTimeOut = function () {
  164. $('#rotate').rotate({
  165. angle: 0,
  166. animateTo: 2060,
  167. duration: 8000,
  168. });
  169. };
  170. var bRotate = false;
  171. var x = document.getElementById("mediaId");
  172. var x2 = document.getElementById("mediaShow");
  173. function play() {
  174. x.play();
  175. x.muted = false
  176. }
  177. x2.pause();
  178. x2.muted = true
  179. function playShow() {
  180. x.pause();
  181. x.muted = true
  182. x2.play();
  183. x2.muted = false
  184. }
  185. var rotateFn = function (awards, angles, txt) {
  186. bRotate = !bRotate;
  187. play()
  188. $('#rotate').stopRotate();
  189. $('#rotate').rotate({
  190. angle: 0,
  191. animateTo: angles + 1800,
  192. duration: 3000,
  193. callback: function () {
  194. // alert(txt);
  195. bRotate = !bRotate;
  196. $('#zhuanpan').hide()
  197. $('#hongbao').show()
  198. playShow()
  199. }
  200. })
  201. };
  202. $('.pointer').click(function () {
  203. if (bRotate) return;
  204. var item = 0;
  205. switch (item) {
  206. case 0:
  207. //var angle = [60,120,180,240,300,360];
  208. rotateFn(0, 4, '现金66元');
  209. break;
  210. case 1:
  211. //var angle = [88, 137, 185, 235, 287];
  212. rotateFn(1, 45, '一等奖');
  213. break;
  214. case 2:
  215. //var angle = [137, 185, 235, 287];
  216. rotateFn(2, 88, '二等奖');
  217. break;
  218. case 3:
  219. //var angle = [137, 185, 235, 287];
  220. rotateFn(3, 137, '三等奖');
  221. break;
  222. case 4:
  223. //var angle = [185, 235, 287];
  224. rotateFn(4, 185, '四等奖');
  225. break;
  226. case 5:
  227. //var angle = [235, 287];
  228. rotateFn(5, 235, '五等奖');
  229. break;
  230. }
  231. });
  232. });
  233. $('#btn').on('touchstart', function (e) {
  234. e.preventDefault()
  235. e.stopPropagation()
  236. window.playableSDK.sendEvent('clickDownloadBar', {
  237. section: 'section2',
  238. area: 'area3'
  239. });
  240. window.playableSDK.openAppStore()
  241. })
  242. function rnd(n, m) {
  243. return Math.floor(Math.random() * (m - n + 1) + n)
  244. }
  245. </script>
  246. </body>
  247. </html>