提交 d7dc6096 作者: 王进

附上简单demo

上级 708ddc83
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<style type="text/css">
html,body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background: #ccc;
}
iframe {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
background: #000;
}
a {
text-decoration: none;
}
.box {
padding: 20px;
overflow: hidden;
position: relative;
}
.box > a {
display: block;
width: 100%;
background-color: #01a72c;
color: #fff;
margin-bottom: 7px;
text-align: center;
line-height: 35px;
}
</style>
</head>
<body>
<div class="box">
<a onclick="doLogin()" href="javascript:void(0)">登录</a>
<a onclick="addShortcut()" href="javascript:void(0)">收藏游戏</a>
<a onclick="share()" href="javascript:void(0)">分享</a>
<a onclick="reportRegister1()" href="javascript:void(0)">上报注册</a>
<a onclick="reportLogin1()" href="javascript:void(0)">上报登录</a>
<a onclick="createRole1()" href="javascript:void(0)">上报创角</a>
<a onclick="payOrder()" href="javascript:void(0)">支付</a>
</div>
</body>
<script src="jquery-1.7.2.min.js"></script>
<script src="QQSDKlib.js"></script>
<script type="text/javascript">
$(function(){
whaleSDK.init(function(){
console.log("::吃屎化成功::");
});
})
function doLogin() {
var user = whaleSDK.getuser();
console.log("SDK::user", user);
}
function addShortcut() {
var info = {};
info.title = "石器文明";
info.icon = "";
whaleSDK.addShortcut(info);
}
function share() {
var info = {};
info.title = "石器文明";
info.desc = "经典玩法,登录即送VIP3";
info.icon = "";
whaleSDK.share(info);
}
function reportRegister1() {
whaleSDK.reportRegister();
}
function reportLogin1() {
whaleSDK.reportLogin();
}
function createRole1() {
whaleSDK.createRole();
}
function payOrder() {
var orderInfo = {};
whaleSDK.pay();
}
</script>
</html>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论