Procházet zdrojové kódy

index的微博分享

Reiskuchen před 5 roky
rodič
revize
9f66c5a8bb
2 změnil soubory, kde provedl 82 přidání a 39 odebrání
  1. 43 0
      minigame/WebContent/index.html
  2. 39 39
      minigame/WebContent/lottery.html

+ 43 - 0
minigame/WebContent/index.html

@@ -259,6 +259,49 @@
                 });
             };
         });
+        
+        //weibo
+        $.post("./user/getWeiboConfigParam?url=https://wx.ttkuaiban.com/minigame/lottery.html", {}, function(resp) {
+    		if (resp.code == 'error') {
+    			console.log(resp.code);
+    		}else{
+    			window.WeiboJS.init({
+    			    'appkey' : resp.data.appkey,
+    			    'debug': true,
+    			    'timestamp': resp.data.timestamp,
+    			    'noncestr': resp.data.noncestr,
+    			    'signature': resp.data.sign,
+    			    'scope': [
+    			        'getNetworkType',
+    			        'networkTypeChanged',
+    			        'getBrowserInfo',
+    			        'checkAvailability',
+    			        'setBrowserTitle',
+    			        'openMenu',
+    			        'setMenuItems',
+    			        'menuItemSelected',
+    			        'setSharingContent',
+    			        'openImage',
+    			        'scanQRCode',
+    			        'pickImage',
+    			        'getLocation',
+    			        'pickContact',
+    			        'apiFromTheFuture'
+    			    ]
+    			}, function(ret){
+    			    alert('init done\n' + JSON.stringify(ret));/*DEBUG*/
+    			});
+    			
+    			WeiboJS.invoke("setSharingContent", {
+    			    title: "抽奖页面测试标题",
+    			    desc: "抽奖页面测试描述",
+    			    icon: "https://wx.ttkuaiban.com/minigame/images/share_picture.png"
+    			}, function(e) {
+    	            alert("设置分享内容成功:" + JSON.stringify(e));
+    	        });
+    		}
+        });
+        
     })
 </script>
 </body>

+ 39 - 39
minigame/WebContent/lottery.html

@@ -28,46 +28,46 @@
             	window.location.href = "https://wx.ttkuaiban.com/minigame";
             }
         	
-            $.post("./user/getWeiboConfigParam?url=https://wx.ttkuaiban.com/minigame/lottery.html", {}, function(resp) {
-        		if (resp.code == 'error') {
-        			console.log(resp.code);
-        		}else{
-        			window.WeiboJS.init({
-        			    'appkey' : resp.data.appkey,
-        			    'debug': true,
-        			    'timestamp': resp.data.timestamp,
-        			    'noncestr': resp.data.noncestr,
-        			    'signature': resp.data.sign,
-        			    'scope': [
-        			        'getNetworkType',
-        			        'networkTypeChanged',
-        			        'getBrowserInfo',
-        			        'checkAvailability',
-        			        'setBrowserTitle',
-        			        'openMenu',
-        			        'setMenuItems',
-        			        'menuItemSelected',
-        			        'setSharingContent',
-        			        'openImage',
-        			        'scanQRCode',
-        			        'pickImage',
-        			        'getLocation',
-        			        'pickContact',
-        			        'apiFromTheFuture'
-        			    ]
-        			}, function(ret){
-        			    alert('init done\n' + JSON.stringify(ret));/*DEBUG*/
-        			});
+//             $.post("./user/getWeiboConfigParam?url=https://wx.ttkuaiban.com/minigame/lottery.html", {}, function(resp) {
+//         		if (resp.code == 'error') {
+//         			console.log(resp.code);
+//         		}else{
+//         			window.WeiboJS.init({
+//         			    'appkey' : resp.data.appkey,
+//         			    'debug': true,
+//         			    'timestamp': resp.data.timestamp,
+//         			    'noncestr': resp.data.noncestr,
+//         			    'signature': resp.data.sign,
+//         			    'scope': [
+//         			        'getNetworkType',
+//         			        'networkTypeChanged',
+//         			        'getBrowserInfo',
+//         			        'checkAvailability',
+//         			        'setBrowserTitle',
+//         			        'openMenu',
+//         			        'setMenuItems',
+//         			        'menuItemSelected',
+//         			        'setSharingContent',
+//         			        'openImage',
+//         			        'scanQRCode',
+//         			        'pickImage',
+//         			        'getLocation',
+//         			        'pickContact',
+//         			        'apiFromTheFuture'
+//         			    ]
+//         			}, function(ret){
+//         			    alert('init done\n' + JSON.stringify(ret));/*DEBUG*/
+//         			});
         			
-        			WeiboJS.invoke("setSharingContent", {
-        			    title: "抽奖页面测试标题",
-        			    desc: "抽奖页面测试描述",
-        			    icon: "https://wx.ttkuaiban.com/minigame/images/share_picture.png"
-        			}, function(e) {
-        	            alert("设置分享内容成功:" + JSON.stringify(e));
-        	        });
-        		}
-            });
+//         			WeiboJS.invoke("setSharingContent", {
+//         			    title: "抽奖页面测试标题",
+//         			    desc: "抽奖页面测试描述",
+//         			    icon: "https://wx.ttkuaiban.com/minigame/images/share_picture.png"
+//         			}, function(e) {
+//         	            alert("设置分享内容成功:" + JSON.stringify(e));
+//         	        });
+//         		}
+//             });
         	
             $.post("./user/getWxConfigParam?url=https://wx.ttkuaiban.com/minigame/lottery.html", {}, function(resp) {
         		if (resp.code == 'error') {