Ver código fonte

调料的3个图片,火力显示的

wolftooth 5 anos atrás
pai
commit
4ab8b4fde1
2 arquivos alterados com 21 adições e 15 exclusões
  1. 6 3
      minigame/WebContent/index.html
  2. 15 12
      minigame/WebContent/js/main.js

+ 6 - 3
minigame/WebContent/index.html

@@ -20,6 +20,9 @@
     <link rel="stylesheet" type="text/css" href="./css/main.css?v=2">
     <script src="https://cdn.bootcss.com/SoundJS/1.0.2/soundjs.min.js"></script>
     <script src="https://www.w3cways.com/demo/vconsole/vconsole.min.js?v=2.2.0"></script>
+    <script>
+        window.ifDebug = true;
+    </script>
   </head>
 <body onload="getInfo()">
     <!-- loading -->
@@ -29,7 +32,7 @@
                 <img src="./img/loading/loading_txt.png">
             </div>
             <div class="loading-bar">
-                <p class="load-txt">远方快递正在为您准备美食<span id="loadingTxt">80</span>%</p>
+                <p class="load-txt">远方快递正在为您准备美食<span id="loadingTxt">0</span>%</p>
                 <div class="bar">
                     <span id="loadingBar">
                         <i class="icon-load"></i>
@@ -160,7 +163,7 @@
 
         // 判断微博分享
         document.addEventListener('WeiboJSBridgeReady', function onBridgeReady() {
-			
+
         }, false);
 
         function shareWeixin(msg) {
@@ -201,7 +204,7 @@
         			wx.error(function(res){
         				console.log(res);
         			});
-        		};	
+        		};
         	});
         }
     </script>

+ 15 - 12
minigame/WebContent/js/main.js

@@ -114,7 +114,7 @@ function handleComplete(evt, comp) {
             exportRoot.plate.hsr_icon3.alpha = 1;
             exportRoot.plate.hsr_icon4.alpha = 1;
             cutDishArr = hsr_iconArr;
-            //$('#poster').attr('src','./img/poster/hsr.png');
+            $('#poster').attr('src','./img/poster/hsr.png');
         }else if(dishIndex == 1){
             exportRoot.plate.qcdf_icon1.alpha = 1;
             exportRoot.plate.qcdf_icon2.alpha = 1;
@@ -122,19 +122,19 @@ function handleComplete(evt, comp) {
             exportRoot.plate.qcdf_icon4.alpha = 1;
             exportRoot.plate.qcdf_icon5.alpha = 1;
             cutDishArr = qcdf_iconArr;
-            //$('#poster').attr('src','./img/poster/qcdf.png');
+            $('#poster').attr('src','./img/poster/qcdf.png');
         }else if(dishIndex == 2){
             exportRoot.plate.swy_icon1.alpha = 1;
             exportRoot.plate.swy_icon2.alpha = 1;
             cutDishArr = swy_iconArr;
-            //$('#poster').attr('src','./img/poster/swy.png');
+            $('#poster').attr('src','./img/poster/swy.png');
         }else{
             exportRoot.plate.ymc_icon1.alpha = 1;
             exportRoot.plate.ymc_icon2.alpha = 1;
             exportRoot.plate.ymc_icon3.alpha = 1;
             exportRoot.plate.ymc_icon4.alpha = 1;
             cutDishArr = ymc_iconArr;
-            //$('#poster').attr('src','./img/poster/ymc.png');
+            $('#poster').attr('src','./img/poster/ymc.png');
         }
     })
     $(".replay-btn").on("click",function(){
@@ -537,7 +537,7 @@ function handleComplete(evt, comp) {
                     }
                 });
             }
-            
+
         })
         exportRoot.btn2.addEventListener("mousedown", function() {
             exportRoot.btn2.removeAllEventListeners();
@@ -556,6 +556,7 @@ function handleComplete(evt, comp) {
             exportRoot.blackboard.material3.removeAllEventListeners();
             chooseType = 3;
             $(".poster-mode").addClass("poster-bg3");
+            exportRoot.ball1.alpha = 1;
             if(dishIndex == 0){
                 $('#poster').attr('src','./img/poster/hsr_lv.png');
             }else if(dishIndex == 1){
@@ -570,7 +571,7 @@ function handleComplete(evt, comp) {
                 exportRoot.blackboard.material1.y -=180;
                 // $(".shake-mode").show();
                 setTimeout(function(){ shakeInit(); }, 3000);
-                
+
             });
         })
         exportRoot.blackboard.material2.addEventListener("mousedown", function() {
@@ -579,6 +580,8 @@ function handleComplete(evt, comp) {
             exportRoot.blackboard.material3.removeAllEventListeners();
             chooseType = 2;
             $(".poster-mode").addClass("poster-bg2");
+            exportRoot.ball1.gotoAndStop(1);
+            exportRoot.ball1.alpha = 1;
             if(dishIndex == 0){
                 $('#poster').attr('src','./img/poster/hsr_hei.png');
             }else if(dishIndex == 1){
@@ -601,6 +604,8 @@ function handleComplete(evt, comp) {
             exportRoot.blackboard.material3.removeAllEventListeners();
             chooseType = 1;
             $(".poster-mode").addClass("poster-bg1");
+            exportRoot.ball1.gotoAndStop(2);
+            exportRoot.ball1.alpha = 1;
             if(dishIndex == 0){
                 $('#poster').attr('src','./img/poster/hsr_fen.png');
             }else if(dishIndex == 1){
@@ -732,8 +737,6 @@ function handleComplete(evt, comp) {
                     }
                     //dosomething
                     $("#fire").addClass("anim-time");
-                    $(".shake-dialog .icon").hide();
-                    $(".shake-dialog .txt").hide();
                 }else{
                     $("#fire").removeClass("anim-time");
                 }
@@ -791,7 +794,7 @@ function getInfo() {
                 +"scope=snsapi_userinfo&"//snsapi_userinfo
                 +"state=1#wechat_redirect";
         }
-        
+
     }
 
     if(URLParams['uid']) {
@@ -859,10 +862,10 @@ function getInfo() {
         $('.secret-btn').show();
 
         init();
-        if (isMobile) {
+        if (isMobile && !window.ifDebug) {
         	getMsg();
         }
-        
+
     }
 
 }
@@ -1030,7 +1033,7 @@ function saveText() {
 //            			wx.error(function(res){
 //            				console.log(res);
 //            			});
-//            		};	
+//            		};
 //            	});
                 //if(type == 1) {
 //                setTimeout(function(){