|
@@ -30,7 +30,8 @@ for (i=0; i < params.length ; i++){
|
|
|
URLParams[aParam[0]] = aParam[1];
|
|
|
}
|
|
|
function init() {
|
|
|
- createjs.Sound.play("bgm", {loop: -1});
|
|
|
+ //createjs.Sound.play("bgm", {loop: -1});
|
|
|
+ just_play();
|
|
|
var comp = AdobeAn.getComposition("5529E26743974F469545223C44E61D22");
|
|
|
var lib = comp.getLibrary();
|
|
|
var loader = new createjs.LoadQueue(false);
|
|
@@ -92,7 +93,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;
|
|
@@ -100,19 +101,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(){
|
|
@@ -507,6 +508,15 @@ function handleComplete(evt, comp) {
|
|
|
exportRoot.blackboard.material2.removeAllEventListeners();
|
|
|
exportRoot.blackboard.material3.removeAllEventListeners();
|
|
|
$(".poster-mode").addClass("poster-bg3");
|
|
|
+ if(dishIndex == 0){
|
|
|
+ $('#poster').attr('src','./img/poster/hsr_lv.png');
|
|
|
+ }else if(dishIndex == 1){
|
|
|
+ $('#poster').attr('src','./img/poster/qcdf_lv.png');
|
|
|
+ }else if(dishIndex == 2){
|
|
|
+ $('#poster').attr('src','./img/poster/swy_lv.png');
|
|
|
+ }else{
|
|
|
+ $('#poster').attr('src','./img/poster/ymc_lv.png');
|
|
|
+ }
|
|
|
materialAnim(exportRoot.blackboard.material1, 300, 180, function() {
|
|
|
exportRoot.blackboard.material1.x -=300;
|
|
|
exportRoot.blackboard.material1.y -=180;
|
|
@@ -519,6 +529,15 @@ function handleComplete(evt, comp) {
|
|
|
exportRoot.blackboard.material2.removeAllEventListeners();
|
|
|
exportRoot.blackboard.material3.removeAllEventListeners();
|
|
|
$(".poster-mode").addClass("poster-bg2");
|
|
|
+ if(dishIndex == 0){
|
|
|
+ $('#poster').attr('src','./img/poster/hsr_hei.png');
|
|
|
+ }else if(dishIndex == 1){
|
|
|
+ $('#poster').attr('src','./img/poster/qcdf_hei.png');
|
|
|
+ }else if(dishIndex == 2){
|
|
|
+ $('#poster').attr('src','./img/poster/swy_hei.png');
|
|
|
+ }else{
|
|
|
+ $('#poster').attr('src','./img/poster/ymc_hei.png');
|
|
|
+ }
|
|
|
materialAnim(exportRoot.blackboard.material2, 120, 180, function() {
|
|
|
exportRoot.blackboard.material2.x -=120;
|
|
|
exportRoot.blackboard.material2.y -=180;
|
|
@@ -531,6 +550,15 @@ function handleComplete(evt, comp) {
|
|
|
exportRoot.blackboard.material2.removeAllEventListeners();
|
|
|
exportRoot.blackboard.material3.removeAllEventListeners();
|
|
|
$(".poster-mode").addClass("poster-bg1");
|
|
|
+ if(dishIndex == 0){
|
|
|
+ $('#poster').attr('src','./img/poster/hsr_fen.png');
|
|
|
+ }else if(dishIndex == 1){
|
|
|
+ $('#poster').attr('src','./img/poster/qcdf_fen.png');
|
|
|
+ }else if(dishIndex == 2){
|
|
|
+ $('#poster').attr('src','./img/poster/swy_fen.png');
|
|
|
+ }else{
|
|
|
+ $('#poster').attr('src','./img/poster/ymc_fen.png');
|
|
|
+ }
|
|
|
materialAnim(exportRoot.blackboard.material3, -30, 180, function() {
|
|
|
exportRoot.blackboard.material3.x +=30;
|
|
|
exportRoot.blackboard.material3.y -=180;
|
|
@@ -725,15 +753,47 @@ function getInfo() {
|
|
|
chooseType = URLParams['type'];
|
|
|
dishType = URLParams['food'];
|
|
|
$(".poster-mode").addClass("poster-bg" + chooseType);
|
|
|
- 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');
|
|
|
+ if(chooseType == 3) {
|
|
|
+ if(dishType == 0){
|
|
|
+ $('#poster').attr('src','./img/poster/hsr_lv.png');
|
|
|
+ }else if(dishType == 1){
|
|
|
+ $('#poster').attr('src','./img/poster/qcdf_lv.png');
|
|
|
+ }else if(dishType == 2){
|
|
|
+ $('#poster').attr('src','./img/poster/swy_lv.png');
|
|
|
+ }else{
|
|
|
+ $('#poster').attr('src','./img/poster/ymc_lv.png');
|
|
|
+ }
|
|
|
+ } else if(chooseType == 2) {
|
|
|
+ if(dishType == 0){
|
|
|
+ $('#poster').attr('src','./img/poster/hsr_hei.png');
|
|
|
+ }else if(dishType == 1){
|
|
|
+ $('#poster').attr('src','./img/poster/qcdf_hei.png');
|
|
|
+ }else if(dishType == 2){
|
|
|
+ $('#poster').attr('src','./img/poster/swy_hei.png');
|
|
|
+ }else{
|
|
|
+ $('#poster').attr('src','./img/poster/ymc_hei.png');
|
|
|
+ }
|
|
|
+ } else if(chooseType == 1) {
|
|
|
+ if(dishType == 0){
|
|
|
+ $('#poster').attr('src','./img/poster/hsr_fen.png');
|
|
|
+ }else if(dishType == 1){
|
|
|
+ $('#poster').attr('src','./img/poster/qcdf_fen.png');
|
|
|
+ }else if(dishType == 2){
|
|
|
+ $('#poster').attr('src','./img/poster/swy_fen.png');
|
|
|
+ }else{
|
|
|
+ $('#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 {
|
|
@@ -878,10 +938,52 @@ function saveText() {
|
|
|
}
|
|
|
|
|
|
$("#cover").show();
|
|
|
+
|
|
|
+ //海报页面的微信分享
|
|
|
+ $.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);
|
|
|
+ });
|
|
|
+ };
|
|
|
+ });
|
|
|
//if(type == 1) {
|
|
|
- setTimeout(function(){
|
|
|
- window.location.href = "http://wx.ttkuaiban.com/minigame/lottery.html";
|
|
|
- }, 10000);
|
|
|
+// setTimeout(function(){
|
|
|
+// window.location.href = "http://wx.ttkuaiban.com/minigame/lottery.html";
|
|
|
+// }, 10000);
|
|
|
//}
|
|
|
}else{
|
|
|
console.log("错误"+xhr.status)
|