|
@@ -8,6 +8,7 @@
|
|
<title>抽奖</title>
|
|
<title>抽奖</title>
|
|
<script src="js/jquery.min.js"></script>
|
|
<script src="js/jquery.min.js"></script>
|
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
|
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
|
|
|
|
+ <script src="http://tjs.sjs.sinajs.cn/open/thirdpart/js/jsapi/mobile.js" charset="utf-8"></script>
|
|
<script src="js/wechat.js"></script>
|
|
<script src="js/wechat.js"></script>
|
|
<link rel="stylesheet" href="css/lottery2.css?v=2" type="text/css" />
|
|
<link rel="stylesheet" href="css/lottery2.css?v=2" type="text/css" />
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
@@ -27,6 +28,48 @@
|
|
window.location.href = "https://wx.ttkuaiban.com/minigame";
|
|
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*/
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ 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) {
|
|
$.post("./user/getWxConfigParam?url=https://wx.ttkuaiban.com/minigame/lottery.html", {}, function(resp) {
|
|
if (resp.code == 'error') {
|
|
if (resp.code == 'error') {
|
|
console.log(resp.code);
|
|
console.log(resp.code);
|
|
@@ -238,30 +281,6 @@
|
|
$(".failed").show();
|
|
$(".failed").show();
|
|
$(".result_failed_button").show();
|
|
$(".result_failed_button").show();
|
|
}
|
|
}
|
|
-
|
|
|
|
- //判断微信分享
|
|
|
|
-// document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
|
|
|
|
-// //发送给好友
|
|
|
|
-// WeixinJSBridge.on('menu:share:appmessage', function(argv){
|
|
|
|
-// $.post("./prize/luckDrawAddShare", {uid: id}, function(resp) {
|
|
|
|
-// if (resp.code == 'error') {
|
|
|
|
-// console.log(resp.code);
|
|
|
|
-// }else{
|
|
|
|
-// alert("分享成功");
|
|
|
|
-// }
|
|
|
|
-// });
|
|
|
|
-// });
|
|
|
|
-// //分享到朋友圈
|
|
|
|
-// WeixinJSBridge.on('menu:share:timeline', function(argv){
|
|
|
|
-// $.post("./prize/luckDrawAddShare", {uid: id}, function(resp) {
|
|
|
|
-// if (resp.code == 'error') {
|
|
|
|
-// console.log(resp.code);
|
|
|
|
-// }else{
|
|
|
|
-// alert("分享成功");
|
|
|
|
-// }
|
|
|
|
-// });
|
|
|
|
-// });
|
|
|
|
-// }, false);
|
|
|
|
</script>
|
|
</script>
|
|
</head>
|
|
</head>
|
|
|
|
|