|
@@ -107,9 +107,11 @@ function handleComplete(evt, comp) {
|
|
|
$(".select-dish-box").hide();
|
|
|
$(".game-box").show();
|
|
|
$(".cut-mode2").show();
|
|
|
+ setTimeout(function(){ $(".cut-mode2").hide(); }, 1500);
|
|
|
$(".cut-mode2").on("touchend",function(){
|
|
|
$(this).hide();
|
|
|
})
|
|
|
+
|
|
|
$(".move-mode2").on("touchend",function(){
|
|
|
$(this).hide();
|
|
|
})
|
|
@@ -147,7 +149,6 @@ function handleComplete(evt, comp) {
|
|
|
$(".replay-btn").on("click",function(){
|
|
|
URLParams = new Array();
|
|
|
window.location.href = "https://wx.ttkuaiban.com/minigame/";
|
|
|
- //location.reload()
|
|
|
})
|
|
|
//$(".secret-btn").on("click",function(){
|
|
|
//saveText();
|
|
@@ -208,21 +209,22 @@ function handleComplete(evt, comp) {
|
|
|
}
|
|
|
function oilIconAnim() {
|
|
|
oilAnim();
|
|
|
- var video = "";
|
|
|
+ var video = "" , noice = "";
|
|
|
if(dishIndex == 0){
|
|
|
- createjs.Sound.play("hsr");//播放
|
|
|
+ noice = createjs.Sound.play("hsr");//播放
|
|
|
video = createjs.Sound.play("oil");//播放
|
|
|
}else if(dishIndex == 1){
|
|
|
- createjs.Sound.play("qcdf");//播放
|
|
|
+ noice = createjs.Sound.play("qcdf");//播放
|
|
|
video = createjs.Sound.play("soup");//播放
|
|
|
}else if(dishIndex == 2){
|
|
|
- createjs.Sound.play("swy");//播放
|
|
|
+ noice = createjs.Sound.play("swy");//播放
|
|
|
}else{
|
|
|
- createjs.Sound.play("ymc");//播放
|
|
|
+ noice = createjs.Sound.play("ymc");//播放
|
|
|
video = createjs.Sound.play("oil");//播放
|
|
|
}
|
|
|
-
|
|
|
- setTimeout(function(){ video.paused = true; }, 5000);
|
|
|
+ noice.volume = 1;
|
|
|
+ video.volume = 0.2;
|
|
|
+ setTimeout(function(){ video.paused = true; }, 4500);
|
|
|
|
|
|
var anim = new TimelineMax({ repeat:10,delay:1});
|
|
|
anim.to(exportRoot.pro.oil_icon2, 0.3, {y:"+=100",alpha:0})
|
|
@@ -584,7 +586,7 @@ function handleComplete(evt, comp) {
|
|
|
exportRoot.blackboard.material1.x -=300;
|
|
|
exportRoot.blackboard.material1.y -=180;
|
|
|
// $(".shake-mode").show();
|
|
|
- setTimeout(function(){ shakeInit(); }, 3000);
|
|
|
+ setTimeout(function(){ shakeInit(); }, 2000);
|
|
|
if(dishIndex == 0){
|
|
|
exportRoot.pot.hsr.play();
|
|
|
}else if(dishIndex == 1){
|
|
@@ -618,7 +620,7 @@ function handleComplete(evt, comp) {
|
|
|
exportRoot.blackboard.material2.x -=120;
|
|
|
exportRoot.blackboard.material2.y -=180;
|
|
|
// $(".shake-mode").show();
|
|
|
- setTimeout(function(){ shakeInit(); }, 3000);
|
|
|
+ setTimeout(function(){ shakeInit(); }, 2000);
|
|
|
if(dishIndex == 0){
|
|
|
exportRoot.pot.hsr.play();
|
|
|
}else if(dishIndex == 1){
|
|
@@ -652,7 +654,7 @@ function handleComplete(evt, comp) {
|
|
|
exportRoot.blackboard.material3.x +=30;
|
|
|
exportRoot.blackboard.material3.y -=180;
|
|
|
// $(".shake-mode").show();
|
|
|
- setTimeout(function(){ shakeInit(); }, 3000);
|
|
|
+ setTimeout(function(){ shakeInit(); }, 2000);
|
|
|
|
|
|
if(dishIndex == 0){
|
|
|
exportRoot.pot.hsr.play();
|
|
@@ -684,6 +686,7 @@ function handleComplete(evt, comp) {
|
|
|
bowlAnim(function() {
|
|
|
|
|
|
$(".move-mode2").show();
|
|
|
+ setTimeout(function(){ $(".move-mode2").hide(); }, 1500);
|
|
|
if(dishIndex == 0){
|
|
|
dishMove(exportRoot.plate.hsr_icon1,0,0);
|
|
|
dishMove(exportRoot.plate.hsr_icon2,0,0);
|
|
@@ -731,7 +734,6 @@ function handleComplete(evt, comp) {
|
|
|
|
|
|
function deviceMotionHandler(eventData) {
|
|
|
var acceleration = eventData.accelerationIncludingGravity;
|
|
|
- console.log(acceleration);
|
|
|
var curTime = new Date().getTime();
|
|
|
if ((curTime - last_update) > 10) {
|
|
|
var diffTime = curTime - last_update;
|
|
@@ -740,12 +742,11 @@ function handleComplete(evt, comp) {
|
|
|
y = acceleration.y;
|
|
|
z = acceleration.z;
|
|
|
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) {
|
|
|
createTime = true;
|
|
|
var video = createjs.Sound.play("shake");//播放
|
|
|
- setTimeout(function(){ video.paused = true;createTime = false; }, 5000);
|
|
|
+ setTimeout(function(){ video.paused = true;createTime = false; }, 2500);
|
|
|
}
|
|
|
$(".shake-mode2").hide();
|
|
|
$(".shake-mode").show();
|
|
@@ -887,16 +888,6 @@ function getInfo() {
|
|
|
$('#poster').attr('src','./img/poster/ymc_fen.png');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // if(dishType == 0){
|
|
|
- // $('#poster').attr('src','./img/poster/hsr.png');
|
|
|
- // }else if(dishType == 1){
|
|
|
- // $('#poster').attr('src','./img/poster/qcdf.png');
|
|
|
- // }else if(dishType == 2){
|
|
|
- // $('#poster').attr('src','./img/poster/swy.png');
|
|
|
- // }else{
|
|
|
- // $('#poster').attr('src','./img/poster/ymc.png');
|
|
|
- // }
|
|
|
getMsg();
|
|
|
$(".poster-mode").fadeIn();
|
|
|
} else {
|
|
@@ -1039,54 +1030,8 @@ function saveText() {
|
|
|
if(href != document.location.href){
|
|
|
history.pushState("", "Title", href);
|
|
|
}
|
|
|
-
|
|
|
- shareWeixin(msg.data.message);
|
|
|
//海报页面的微信分享
|
|
|
-// $.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: "https://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 = "https://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);
|
|
|
-// });
|
|
|
-// };
|
|
|
-// });
|
|
|
- //if(type == 1) {
|
|
|
-// setTimeout(function(){
|
|
|
-// window.location.href = "https://wx.ttkuaiban.com/minigame/lottery.html";
|
|
|
-// }, 10000);
|
|
|
- //}
|
|
|
+ shareWeixin(msg.data.message);
|
|
|
}else{
|
|
|
console.log("错误"+xhr.status)
|
|
|
}
|