Files
18xchat/.svn/pristine/7a/7aafb2bedd2601f4cfcb3884a903271b20fd367c.svn-base
T
2025-07-17 17:18:21 +08:00

69 lines
1.0 KiB
Plaintext

export class WebSDK{
//初始化
init(cb: Function = null) {
console.log("init webSDK");
cb && cb();
}
//检查权限
checkAutoSetting(autoKey:string, cb:Function = null) {
cb && cb(true);
}
//获取用户信息
getUserInfo(cb:Function = null) {
cb && cb({ nickName:"", avatarUrl:"" });
}
//登录
login(cb: Function = null) {
cb && cb({ platform:2, code: null });
}
//显示视频广告
show_video(callback:Function, tag:number) {
callback && callback({ code: 0, tag: tag });
}
//显示插屏
show_splash() {
}
//显示Banner
show_banner(...args) {
}
//隐藏Banner
hide_banner(...args) {
}
//主动拉起分享
show_share(rewardCB?:Function) {
rewardCB && rewardCB();
}
//获取设备分辨率
getWindowSize() {
return {width:screen.width, height: screen.height};
}
//显示游戏圈
show_gameClub(leftRatio, topRatio, widthRatio, heightRatio) {
}
//隐藏游戏圈
hide_gameClub() {
}
}