浏览代码

Merge branch 'master' of http://47.100.37.243:10080/wutt/game

# Conflicts:
#	minigame/WebContent/index.html
#	minigame/WebContent/js/main.js
sunyadv 5 年之前
父节点
当前提交
4d7e5a78b4
共有 3 个文件被更改,包括 60 次插入54 次删除
  1. 57 52
      minigame/WebContent/index.html
  2. 2 1
      minigame/WebContent/lottery.html
  3. 1 1
      minigame/WebContent/result_all.html

+ 57 - 52
minigame/WebContent/index.html

@@ -151,15 +151,15 @@
 <script src="./js/wechat.js"></script>
 <script src="./assets.js?v=2"></script>
 <script src="./js/music.js?v=1"></script>
-<script src="./js/main.js?v=9"></script>
+<script src="./js/main.js?v=7"></script>
 <script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
 <!-- 必须加在微信api资源 -->
 <script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script>
-    //解决IOS下分享签名失败问题
-    if (navigator.userAgent.indexOf('iPhone') !== -1) {
-        window.wechaturl = window.location + '';
-    }
+	//解决IOS下分享签名失败问题
+	if (navigator.userAgent.indexOf('iPhone') !== -1) {
+	  window.wechaturl = window.location + '';
+	}
     //一般情况下,这样就可以自动播放了,但是一些奇葩iPhone机不可以
     var music = document.getElementById('music').play();
     music.volume = 0.1;
@@ -169,53 +169,58 @@
         music.volume = 0.1;
     }, false);
 
-    function shareWeixin(msg) {
-        let wechaturl = window.location.href.split('#')[0];
-        var shareUrl = wechaturl;
-        if (window.wechaturl !== undefined) {
-            wechaturl = window.wechaturl;
+        function shareWeixin(msg) {
+        	let wechaturl = window.location.href.split('#')[0];
+        	var shareUrl = wechaturl;
+        	if (window.wechaturl !== undefined) {
+        	 	wechaturl = window.wechaturl;
+        	}
+        	alert('shareUrl='+shareUrl);
+//         	var url = window.location.href.split('#')[0];
+//         	var plainUrl = url;
+//         	var href="https://wx.ttkuaiban.com/minigame/index.html";
+        	url = escape(originUrl);
+//         	alert(url)
+        	$.post("./user/getWxConfigParam?url="+wechaturl, {}, function(resp) {
+        		if (resp.code == 'error') {
+        			console.log(resp.code);
+        		}else{
+        			wx.config({
+        			    debug: true,
+        			    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(){
+                        $("#cover").show();
+                        const share = {
+           			        title: "我为你精心准备的美味,快享用吧!",
+           			        desc: msg,
+           			        imgUrl: "https://wx.ttkuaiban.com/minigame/images/share_picture.png",
+           			        link: shareUrl,
+           			        success: function() {
+           			            alert("分享成功")
+           			        	window.location.href = "https://wx.ttkuaiban.com/minigame/lottery.html";
+           			        },
+           			        cancel: function() {
+                                alert("分享失败")
+           			        }
+           			    };
+        			    wx.onMenuShareAppMessage(share);
+        			    wx.onMenuShareTimeline(share);
+        			    wx.onMenuShareQQ(share);
+        			    wx.onMenuShareQZone(share);
+        			    wx.onMenuShareWeibo(share);
+        			});
+        			wx.error(function(res){
+                        alert("分享失败")
+        				console.log(res);
+        			});
+        		};
+        	});
         }
-        var url = escape(wechaturl);
-        $.post("./user/getWxConfigParam?url="+url, {}, function(resp) {
-            if (resp.code == 'error') {
-                console.log(resp.code);
-            }else{
-                wx.config({
-                    debug: true,
-                    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(){
-                    $("#cover").show();
-                    const share = {
-                        title: "我为你精心准备的美味,快享用吧!",
-                        desc: msg,
-                        imgUrl: "https://wx.ttkuaiban.com/minigame/images/share_picture.png",
-                        link: shareUrl,
-                        success: function() {
-//            			            alert("分享成功")
-                            window.location.href = "https://wx.ttkuaiban.com/minigame/lottery.html";
-                        },
-                        cancel: function() {
-//                                 alert("分享失败")
-                        }
-                    };
-                    wx.onMenuShareAppMessage(share);
-                    wx.onMenuShareTimeline(share);
-                    wx.onMenuShareQQ(share);
-                    wx.onMenuShareQZone(share);
-                    wx.onMenuShareWeibo(share);
-                });
-                wx.error(function(res){
-                    alert("分享失败")
-                    console.log(res);
-                });
-            };
-        });
-    }
-</script>
+    </script>
 </body>
 </html>

+ 2 - 1
minigame/WebContent/lottery.html

@@ -273,7 +273,8 @@
     <span class="title"><span style="color: #FF356B">活动</span>说明</span>
     <span class="tips">1.中奖者留下姓名和电话,在活动结束后会联系邮寄奖品;<br>
         2.微博参与抽奖方式:<br>
-        关注@贝蒂斯橄榄油官方微博,转发或评论置顶微博并上传“游戏结果海报”。
+        关注@贝蒂斯橄榄油官方微博,转发或评论置顶微博并上传“游戏结果海报”。<br>
+        3.每人每天通过游戏获得两次抽奖机会,转发本页面额外获得一次抽奖机会。
     </span>
 
     <div class="case">

+ 1 - 1
minigame/WebContent/result_all.html

@@ -23,7 +23,7 @@
 					for(let index in resp.data){
 						$("table").append(
 								"<tr><td>" + 
-								index +
+								(index + 1) +
 								"</td><td>" +
 								resp.data[index].nickName + 
 								"</td><td>" +