123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347 |
- <!DOCTYPE html>
- <html style="font-size: 600px;">
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="Cache-Control" content="no-cache">
- <meta http-equiv="Expires" content="0">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="format-detection" content="telephone=no">
- <meta name="apple-mobile-web-app-title" content="">
- <title>试玩</title>
- <style>
- body {
- margin: 0
- }
- #app {
- margin: 50px auto;
- width: 660px;
- height: 450px
- }
- #app>div>span {
- display: inline-block
- }
- body {
- min-height: 100%;
- width: 100%;
- font-family: 'Microsoft YaHei', 'Myriad Set Pro', 'Lucida Grande', 'Hiragino Sans GB', 'Helvetica', 'Arial', 'sans-serif';
- color: #333;
- background: #fff;
- -webkit-text-size-adjust: 100%;
- -webkit-font-smoothing: antialiased;
- -webkit-user-select: none;
- -webkit-tap-highlight-color: transparent;
- tap-highlight-color: transparent;
- font-size: 0.026rem;
- }
- .wrap-dialog {
- -webkit-tap-highlight-color: transparent;
- height: 100vh;
- width: 100%;
- background-color: #ebe6e0;
- background-size: cover;
- -webkit-transition: -webkit-transform 0.5s;
- transition: -webkit-transform 0.5s;
- transition: transform 0.5s;
- transition: transform 0.5s, -webkit-transform 0.5s;
- }
- #hongbao {
- -webkit-animation: arrowBig .5s ease;
- animation: arrowBig .5s ease;
- animation-iteration-count: 1;
- animation-fill-mode: forwards;
- -webkit-animation-iteration-count: 1;
- -webkit-animation-fill-mode: forwards;
- }
- @-webkit-keyframes arrowBig {
- 0% {
- -webkit-transform: scale(0);
- opacity: 0;
- }
- 100% {
- -webkit-transform: scale(1);
- opacity: 1;
- }
- }
- @keyframes arrowBig {
- 0% {
- transform: scale(0);
- opacity: 0;
- }
- 100% {
- transform: scale(1);
- opacity: 1;
- }
- }
- #btn {
- animation: mymove 1s infinite;
- -webkit-animation: mymove 1s infinite;
- /*Safari and Chrome*/
- animation-direction: alternate;
- /*轮流反向播放动画。*/
- animation-timing-function: ease-in-out;
- /*动画的速度曲线*/
- /* Safari 和 Chrome */
- -webkit-animation: mymove 1s infinite;
- -webkit-animation-direction: alternate;
- /*轮流反向播放动画。*/
- -webkit-animation-timing-function: ease-in-out;
- /*动画的速度曲线*/
- }
- @keyframes mymove {
- 0% {
- transform: scale(1);
- /*开始为原始大小*/
- }
- 25% {
- transform: scale(1.2);
- /*放大1.1倍*/
- }
- 50% {
- transform: scale(1);
- }
- 75% {
- transform: scale(1.2);
- }
- }
- @-webkit-keyframes mymove {
- 0% {
- transform: scale(1);
- /*开始为原始大小*/
- }
- 25% {
- transform: scale(1.2);
- /*放大1.1倍*/
- }
- 50% {
- transform: scale(1);
- }
- 75% {
- transform: scale(1.2);
- }
- }
- </style>
- </head>
- <body>
- <div class="wrap-dialog" style="background:url(./images/bg.jpg);background-size: cover;position: relative">
- <img src="./images/bg-top.png" style="position:fixed;top:0;width:100%" alt="">
- <img src="./images/bg-bottom.png" style="position:fixed;bottom:0;width:100%" alt="">
- <div id="zhuanpan">
- <div class="pointer"><img src="images/zhenbg.png" alt="pointer"
- style="width:1rem;position: absolute;left: 1.3rem;top: 3.4rem;z-index: 2;" /></div>
- <div class="rotate"><img id="rotate" src="images/zhuanbg.png" alt="turntable"
- style="width:3rem;position: absolute;left:0.3rem;top:2.5rem" /></div>
- <div>
- <img src="./images/shaw.png" alt="" style="width: 2rem;position: absolute;left: 0.8rem;top: 5.5rem;">
- </div>
- </div>
- <div id="hongbao" style="display:none">
- <img src="./images/hongbao.png" style="width:3rem;position: absolute;left:0.3rem;top:2.5rem;z-index: 10"
- alt="">
- <img src="./images/qian.png" style=" width: 1rem;
- position: absolute;
- left: 1.3rem;
- top: 4.15rem;
- z-index: 10;" alt="">
- <img src="./images/btn.png" id="btn" style="width: 1.6rem;
- position: absolute;
- left: 1.05rem;
- top: 4.7rem;
- z-index: 10;" alt="">
- <img src="./images/bg-zhuan.png" style="width:100%;position: absolute;left:0;top:2.1rem" alt="">
- </div>
- <audio src="./images/zhuan.mp3" id="mediaId"></audio>
- <audio src="./images/show.mp3" id="mediaShow"></audio>
- </div>
- <script src="https://sf3-ttcdn-tos.pstatp.com/obj/union-fe-nc/playable/sdk/playable-sdk.js"></script>
- <script type="text/javascript" src="js/jquery.min.js"></script>
- <script type="text/javascript" src="js/awardRotate.js"></script>
- <script src="./js/rem.js"></script>
- <script type="text/javascript">
- $(function () {
- var rotateTimeOut = function () {
- $('#rotate').rotate({
- angle: 0,
- animateTo: 2060,
- duration: 8000,
- });
- };
- var bRotate = false;
- var x = document.getElementById("mediaId");
- var x2 = document.getElementById("mediaShow");
- function play() {
- x.play();
- x.muted = false
- }
- x2.pause();
- x2.muted = true
- function playShow() {
- x.pause();
- x.muted = true
- x2.play();
- x2.muted = false
- }
- var rotateFn = function (awards, angles, txt) {
- bRotate = !bRotate;
- play()
- $('#rotate').stopRotate();
- $('#rotate').rotate({
- angle: 0,
- animateTo: angles + 1800,
- duration: 3000,
- callback: function () {
- // alert(txt);
- bRotate = !bRotate;
- $('#zhuanpan').hide()
- $('#hongbao').show()
- playShow()
- }
- })
- };
- $('.pointer').click(function () {
- if (bRotate) return;
- var item = 0;
- switch (item) {
- case 0:
- //var angle = [60,120,180,240,300,360];
- rotateFn(0, 4, '现金66元');
- break;
- case 1:
- //var angle = [88, 137, 185, 235, 287];
- rotateFn(1, 45, '一等奖');
- break;
- case 2:
- //var angle = [137, 185, 235, 287];
- rotateFn(2, 88, '二等奖');
- break;
- case 3:
- //var angle = [137, 185, 235, 287];
- rotateFn(3, 137, '三等奖');
- break;
- case 4:
- //var angle = [185, 235, 287];
- rotateFn(4, 185, '四等奖');
- break;
- case 5:
- //var angle = [235, 287];
- rotateFn(5, 235, '五等奖');
- break;
- }
- });
- });
- $('#btn').on('touchstart', function (e) {
- e.preventDefault()
- e.stopPropagation()
- window.playableSDK.sendEvent('clickDownloadBar', {
- section: 'section2',
- area: 'area3'
- });
- window.playableSDK.openAppStore()
- })
- function rnd(n, m) {
- return Math.floor(Math.random() * (m - n + 1) + n)
- }
- </script>
- </body>
- </html>
|