quyueting 5 년 전
부모
커밋
a48050bd58
3개의 변경된 파일60개의 추가작업 그리고 6개의 파일을 삭제
  1. 55 1
      minigame/WebContent/index.html
  2. 3 3
      minigame/WebContent/js/main.js
  3. 2 2
      minigame/WebContent/js/wechat.js

+ 55 - 1
minigame/WebContent/index.html

@@ -16,8 +16,54 @@
     <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="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 -->
@@ -112,7 +158,13 @@
     <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"> -->
@@ -126,7 +178,9 @@
     <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=1"></script>
+    
     <script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
     <script>
         // 判断微信分享

+ 3 - 3
minigame/WebContent/js/main.js

@@ -992,9 +992,9 @@ function saveText() {
             		};	
             	});
                 //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)

+ 2 - 2
minigame/WebContent/js/wechat.js

@@ -8,7 +8,7 @@
             link:window.location.href.split('#')[0]
         }
     };
-   
+
 	/*
     $.ajax({
       url:"",
@@ -66,6 +66,6 @@
     }
 	*/
 
-
+    
 })();