351035557@qq.com 5 лет назад
Родитель
Сommit
a71673d7d2

+ 54 - 23
minigame/WebContent/assets.js

@@ -6,7 +6,7 @@ lib.ssMetadata = [
 		{name:"assets_atlas_P_", frames: [[0,0,625,443],[0,445,563,455]]},
 		{name:"assets_atlas_P_2", frames: [[0,0,635,382],[0,384,614,392],[616,384,368,505]]},
 		{name:"assets_atlas_P_3", frames: [[594,495,371,144],[427,0,353,261],[0,310,354,242],[0,554,367,232],[0,788,261,197],[369,495,223,256],[823,0,169,320],[263,788,262,195],[427,263,394,230],[0,0,425,308],[527,753,266,187]]},
-		{name:"assets_atlas_P_4", frames: [[566,146,203,139],[771,247,180,59],[242,286,180,59],[0,284,240,60],[256,155,202,129],[775,0,187,159],[907,161,86,75],[0,346,97,42],[721,308,113,49],[460,155,103,118],[836,308,108,46],[460,275,88,109],[637,287,82,104],[550,287,85,105],[964,0,24,76],[964,78,11,19],[256,0,308,153],[566,0,207,144],[0,189,231,93],[771,161,134,84],[0,0,254,187]]}
+		{name:"assets_atlas_P_4", frames: [[256,155,203,139],[771,161,203,139],[566,146,203,139],[0,320,180,59],[182,358,180,59],[204,296,240,60],[0,189,202,129],[775,0,187,159],[84,381,86,75],[676,388,97,42],[451,382,113,49],[461,155,103,118],[566,382,108,46],[830,302,88,109],[0,381,82,104],[364,358,85,105],[964,0,24,76],[964,78,11,19],[256,0,308,153],[566,0,207,144],[461,287,231,93],[694,302,134,84],[0,0,254,187]]}
 ];
 
 
@@ -21,6 +21,20 @@ lib.ssMetadata = [
 
 
 
+(lib.ball2 = function() {
+	this.spriteSheet = ss["assets_atlas_P_4"];
+	this.gotoAndStop(1);
+}).prototype = p = new cjs.Sprite();
+
+
+
+(lib.ball3 = function() {
+	this.spriteSheet = ss["assets_atlas_P_4"];
+	this.gotoAndStop(2);
+}).prototype = p = new cjs.Sprite();
+
+
+
 (lib.blackboard = function() {
 	this.spriteSheet = ss["assets_atlas_P_2"];
 	this.gotoAndStop(0);
@@ -37,21 +51,21 @@ lib.ssMetadata = [
 
 (lib.btn1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(1);
+	this.gotoAndStop(3);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.btn2 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(2);
+	this.gotoAndStop(4);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.btn3 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(3);
+	this.gotoAndStop(5);
 }).prototype = p = new cjs.Sprite();
 
 
@@ -64,28 +78,28 @@ p.nominalBounds = new cjs.Rectangle(0,0,640,1040);
 
 (lib.hsr_icon1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(4);
+	this.gotoAndStop(6);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.hsr_icon1_1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(5);
+	this.gotoAndStop(7);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.hsr_icon2 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(6);
+	this.gotoAndStop(8);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.hsr_icon2_1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(7);
+	this.gotoAndStop(9);
 }).prototype = p = new cjs.Sprite();
 
 
@@ -99,42 +113,42 @@ p.nominalBounds = new cjs.Rectangle(0,0,640,1040);
 
 (lib.hsr_icon3_1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(8);
+	this.gotoAndStop(10);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.hsr_icon4 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(9);
+	this.gotoAndStop(11);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.hsr_icon4_1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(10);
+	this.gotoAndStop(12);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.material1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(11);
+	this.gotoAndStop(13);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.material2 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(12);
+	this.gotoAndStop(14);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.material3 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(13);
+	this.gotoAndStop(15);
 }).prototype = p = new cjs.Sprite();
 
 
@@ -169,14 +183,14 @@ p.nominalBounds = new cjs.Rectangle(0,0,640,1040);
 
 (lib.oil_icon1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(14);
+	this.gotoAndStop(16);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.oil_icon2 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(15);
+	this.gotoAndStop(17);
 }).prototype = p = new cjs.Sprite();
 
 
@@ -211,21 +225,21 @@ p.nominalBounds = new cjs.Rectangle(0,0,640,1040);
 
 (lib.qcdf_icon1_1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(16);
+	this.gotoAndStop(18);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.qcdf_icon2 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(17);
+	this.gotoAndStop(19);
 }).prototype = p = new cjs.Sprite();
 
 
 
 (lib.qcdf_icon2_1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(18);
+	this.gotoAndStop(20);
 }).prototype = p = new cjs.Sprite();
 
 
@@ -253,7 +267,7 @@ p.nominalBounds = new cjs.Rectangle(0,0,640,1040);
 
 (lib.swy_icon2 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(19);
+	this.gotoAndStop(21);
 }).prototype = p = new cjs.Sprite();
 
 
@@ -274,7 +288,7 @@ p.nominalBounds = new cjs.Rectangle(0,0,640,1040);
 
 (lib.ymc_icon1_1 = function() {
 	this.spriteSheet = ss["assets_atlas_P_4"];
-	this.gotoAndStop(20);
+	this.gotoAndStop(22);
 }).prototype = p = new cjs.Sprite();
 // helper functions:
 
@@ -562,13 +576,30 @@ function getMCSymbolPrototype(symbol, nominalBounds, frameBounds) {
 (lib.ball1_1 = function(mode,startPosition,loop) {
 	this.initialize(mode,startPosition,loop,{});
 
+	// timeline functions:
+	this.frame_0 = function() {
+		this.stop();
+	}
+
+	// actions tween:
+	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(3));
+
 	// 图层 1
 	this.instance = new lib.ball1();
 	this.instance.parent = this;
 
-	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
+	this.instance_1 = new lib.ball2();
+	this.instance_1.parent = this;
+	this.instance_1.setTransform(1,1);
 
-}).prototype = getMCSymbolPrototype(lib.ball1_1, new cjs.Rectangle(0,0,203,139), null);
+	this.instance_2 = new lib.ball3();
+	this.instance_2.parent = this;
+	this.instance_2.setTransform(1,1);
+
+	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},1).to({state:[{t:this.instance_2}]},1).wait(1));
+
+}).prototype = p = new cjs.MovieClip();
+p.nominalBounds = new cjs.Rectangle(0,0,203,139);
 
 
 (lib.ymc_icon1_2 = function(mode,startPosition,loop) {

+ 16 - 6
minigame/WebContent/css/main.css

@@ -635,12 +635,17 @@ img {
   /*display: none;*/ }
   .loading .curtain-box {
     position: absolute;
-    top: 0.89062rem;
+    top: 50%;
     left: 50%;
     width: 10.42188rem;
     height: 14.04688rem;
     margin-left: -5.21094rem;
-    background: url(../img/loading/bg2.png) no-repeat 0 0/100% auto; }
+    background: url(../img/loading/bg2.png) no-repeat 0 0/100% auto;
+    -webkit-transform: translate(0, -50%);
+       -moz-transform: translate(0, -50%);
+        -ms-transform: translate(0, -50%);
+         -o-transform: translate(0, -50%);
+            transform: translate(0, -50%); }
     .loading .curtain-box .txt {
       position: absolute;
       top: 5.3125rem;
@@ -654,7 +659,7 @@ img {
       width: 7.5rem;
       margin-left: -3.75rem; }
       .loading .curtain-box .loading-bar .load-txt {
-        font-size: 0.43125rem;
+        font-size: 0.53125rem;
         color: #1e0502;
         text-align: center;
         text-shadow: 2px 2px 0 #b9b988;
@@ -688,13 +693,18 @@ img {
 
 .select-dish-box {
   position: absolute;
-  top: 1.17188rem;
+  top: 50%;
   left: 50%;
   width: 10rem;
   height: 15.53125rem;
   margin-left: -5rem;
   background: url(../img/menu_bg.png) no-repeat 0 0/100% auto;
-  padding-top: 2.34375rem; }
+  padding-top: 2.34375rem;
+  -webkit-transform: translate(0, -50%);
+     -moz-transform: translate(0, -50%);
+      -ms-transform: translate(0, -50%);
+       -o-transform: translate(0, -50%);
+          transform: translate(0, -50%); }
   .select-dish-box .tt {
     width: 3.85938rem;
     margin: 0 auto;
@@ -766,7 +776,7 @@ img {
       .poster-mode .leads-box .form-group input , .poster-mode .leads-box .form-group .msg{
         width: 100%;
         height: 0.78125rem;
-		line-height: 0.78125rem;
+        line-height: 0.78125rem;
         font-size: 0.375rem;
         font-size: 20x;
         color: #c19e83;

BIN
minigame/WebContent/images/assets_atlas_P_4.png


BIN
minigame/WebContent/img/btn1.png


+ 2 - 57
minigame/WebContent/index.html

@@ -16,56 +16,8 @@
     <script src="./js/flexiable.js"></script>
     <link rel="stylesheet" type="text/css" href="./css/animate.min.css?v=1">
     <link rel="stylesheet" type="text/css" href="./css/main.css?v=2">
-    <link rel="stylesheet" type="text/css" href="./css/music.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 src="https://cdn.bootcss.com/SoundJS/1.0.2/soundjs.min.js"></script>
-    <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
-    <script>
-// 	var href = location.href.split('#')[0];
-// 	alert(href)
-//     //海报页面的微信分享
-//     $.post("./user/getWxConfigParam?url=" + href, {}, function(resp) {
-// 		if (resp.code == 'error') {
-// 			console.log(resp.code);
-// 		}else{
-// 			wx.config({
-// 			    debug: false,
-// 			    appId: 'wx749c84daac654e1e',
-// 			    timestamp: resp.data.timestamp,
-// 			    nonceStr: resp.data.noncestr,
-// 			    signature: resp.data.sign,
-// 			    jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone', 'showOptionMenu', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem']
-// 			});
-// 			wx.ready(function(){
-// 				const share = {
-// 			        title: "我为你精心准备的美味,快享用吧!",
-// 			        desc: "",
-// 			        imgUrl: "http://wx.ttkuaiban.com/minigame/images/share_picture.png",
-// 			        link: href,
-// 			        success: function() {
-// 			        	$.post("./prize/luckDrawAddShare", {uid: id}, function(resp) {
-// 		    				if (resp.code == 'error') {
-// 		    					console.log(resp.code);
-// 		    				}else{
-// 		    					window.location.href = "http://wx.ttkuaiban.com/minigame/lottery.html";
-// 		    				}
-// 		    			});
-// 			        },
-// 			        cancel: function() {}
-// 			    };
-// 			    wx.onMenuShareAppMessage(share);
-// 			    wx.onMenuShareTimeline(share);
-// 			    wx.onMenuShareQQ(share);
-// 			    wx.onMenuShareQZone(share);
-// 			    wx.onMenuShareWeibo(share);
-// 			});
-// 			wx.error(function(res){
-// 				console.log(res);
-// 			});
-// 		};	
-// 	});
-    </script>
   </head>
 <body onload="getInfo()">
     <!-- loading -->
@@ -160,13 +112,7 @@
     <div class="shake-mode2">
         <img src="./img/wait_shake.png">
     </div>
-	<span id="musicControl">
-        <a id="mc_play" class="on" onclick="play_music();">
-            <audio id="music" loop="loop" autoplay="autoplay">
-                <source src="sound/background_music.mp3" type="audio/mpeg">
-            </audio>
-        </a>
-    </span>
+
     <div class="shake-mode">
         <div class="shake-dialog">
             <!-- <img src="./img/shake_fire.png"> -->
@@ -180,8 +126,7 @@
     <script src="./js/tweenmax.js"></script>
     <script src="./js/wechat.js"></script>
     <script src="./assets.js"></script>
-    <script src="./js/music.js?v=1"></script>
-    <script src="./js/main.js?v=2"></script>
+    <script src="./js/main.js?v=1"></script>
     <script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
     <script>
         // 判断微信分享

+ 5 - 4
minigame/WebContent/js/main.js

@@ -662,7 +662,7 @@ function handleComplete(evt, comp) {
         } else {
             alert('您的手机不支持摇一摇功能!');
         }
-        
+
         //获取加速度信息
         //通过监听上一步获取到的x, y, z 值在一定时间范围内的变化率,进行设备是否有进行晃动的判断。
         //而为了防止正常移动的误判,需要给该变化率设置一个合适的临界值。
@@ -672,6 +672,7 @@ function handleComplete(evt, comp) {
             last_y = 0,
             last_z = 0;
 		var createTime = false;
+
         function deviceMotionHandler(eventData) {
             var acceleration = eventData.accelerationIncludingGravity;
             console.log(acceleration);
@@ -685,13 +686,11 @@ function handleComplete(evt, comp) {
                 var speed = Math.abs(x + y + z - last_x - last_y - last_z) / diffTime * 10000;
                 console.log('speed='+speed+',SHAKE_THRESHOLD='+SHAKE_THRESHOLD)
                 if (speed > SHAKE_THRESHOLD) {
-					
-					if(!createTime) {
+                    if(!createTime) {
 						createTime = true;
 						var video = createjs.Sound.play("shake");//播放
 						setTimeout(function(){ video.paused = true; }, 5000);
 					}
-					
                     $(".shake-mode2").hide();
                     $(".shake-mode").show();
                     shake_cnt++;
@@ -729,6 +728,8 @@ function handleComplete(evt, comp) {
                     }
                     //dosomething
                     $("#fire").addClass("anim-time");
+                    $(".shake-dialog .icon").hide();
+                    $(".shake-dialog .txt").hide();
                 }else{
                     $("#fire").removeClass("anim-time");
                 }

BIN
minigame/WebContent/sound/six.mp3