Browse Source

Merge remote-tracking branch 'origin/master'

sunyadv 5 years ago
parent
commit
f939b83555

+ 1 - 1
minigame/WebContent/assets.js

@@ -1290,7 +1290,7 @@ p.nominalBounds = new cjs.Rectangle(0,0,614,392);
 
 	// btn1
 	this.btn1 = new lib.btn1_1();
-	this.btn1.name = "btn1";
+	this.btn1.name = "kspr";
 	this.btn1.parent = this;
 	this.btn1.setTransform(320.7,918.8,1,1,0,0,0,90,29.5);
 	this.btn1.alpha = 0;

minigame/WebContent/img/btn1.png → minigame/WebContent/img/kspr.png


+ 2 - 2
minigame/WebContent/index.html

@@ -131,9 +131,9 @@
 <script src="./js/create.js"></script>
 <script src="./js/tweenmax.js"></script>
 <script src="./js/wechat.js"></script>
-<script src="./assets.js"></script>
+<script src="./assets.js?v=1"></script>
 <script src="./js/music.js"></script>
-<script src="./js/main.js"></script>
+<script src="./js/main.js?v=1"></script>
 
 <!--<script>-->
 <!--// 判断微信分享-->

+ 41 - 1
minigame/WebContent/js/main.js

@@ -945,7 +945,47 @@ function saveText() {
 
                 $("#cover").show();
                 
-                posterShare(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);
+            			});
+            		};	
+            	});
                 //if(type == 1) {
 //                setTimeout(function(){
 //                    window.location.href = "http://wx.ttkuaiban.com/minigame/lottery.html";

+ 0 - 43
minigame/WebContent/js/wechat.js

@@ -68,47 +68,4 @@
 
 
 })();
-function posterShare(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);
-			});
-		};	
-	});
-}