【实例简介】
【实例截图】


【核心代码】
数粽赢大礼过端午——盐龙网var GID = "shuqian";
var SCORE_LIMIT = ;
var APP_LIST_URL = 'http://1251002861.cdn.myqcloud.com/1251002861/index.html';
html,body,canvas {
margin: 0px;
padding: 0px;
border:none;
text-align: center;
background-color: black;
}
canvas {
background-color: white;
}
您的浏览器不支持html5, 请换用支持html5的浏览器。
var mebtnopenurl = 'http://www.ylw0813.com/default.html';
window.shareData = {
"imgUrl": "http://game2.id87.com/games/sqsdscj/icon.png",
"timeLineLink": "http://www.ylw0813.com/default.html",
"tTitle": "数粽赢大礼过端午",
"tContent": "数粽赢大礼过端午"
};
function goHome(){
window.location=mebtnopenurl;
}
function clickMore(){
if((window.location "").indexOf("zf",1)>0){
window.location = "http://www.ylw0813.com/default.html";
}
else{
goHome();
}
}
function dp_share(){
document.title ="我30秒内数了" myData.score "个粽子,手都快抽筋,你也来试试看!";
document.getElementById("share").style.display="";
window.shareData.tTitle = document.title;
}
function dp_Ranking(){
window.location=mebtnopenurl;
}
function showAd(){
}
function hideAd(){

}
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
WeixinJSBridge.on('menu:share:appmessage', function(argv) {
WeixinJSBridge.invoke('sendAppMessage', {
"img_url": window.shareData.imgUrl,
"link": window.shareData.timeLineLink,
"desc": window.shareData.tContent,
"title": window.shareData.tTitle
}, onShareComplete);
});
WeixinJSBridge.on('menu:share:timeline', function(argv) {
WeixinJSBridge.invoke('shareTimeline', {
"img_url": window.shareData.imgUrl,
"img_width": "640",
"img_height": "640",
"link": window.shareData.timeLineLink,
"desc": window.shareData.tContent,
"title": window.shareData.tTitle
}, onShareComplete);
});
}, false);
var myData = { gameid: "sqsdscj" };
function dp_submitScore(score){
myData.score = score;
myData.scoreName = "数了" score "个粽子";
if(score>0){
if (confirm("我勒个去了,30秒你数了" score "个粽子!快通知一下小伙伴吧!")){
dp_share();
}
}
}
function onShareComplete(res) {
if (localStorage.myuid && myData.score != undefined) {
setTimeout(function(){
if (confirm("要将成绩提交到数粽游戏排行榜吗?")) {
window.location ="http://www.ylw0813.com/default.html";
}
else {
document.location.href = mebtnopenurl;
}
}, 500);
}
else {
document.location.href = mebtnopenurl;
}
}

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/98387.html