123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- declare namespace zs {
- module sdk {
- interface adData {
- position_type: string;
- app_desc: string;
- link_path: string;
- app_id: string;
- open_ad: string;
- appid: string;
- app_icon: string;
- app_title: string;
- app_qrcode: string;
- link_text: string;
- type: string;
- }
-
- interface adDataSet {
- promotion: adData[];
- indexLeft: adData[];
- endPage: adData[];
- backAd: adData[];
- }
- /**
- * 获取广告数据
- * @param {*} callback
- * @returns more 更多好玩 个人中心的广告 现已经不用了
- * promotion 首页推广 首页开始按钮下的广告
- * indexFloat 首页浮动广告 首页右上的广告
- * indexLeft 首页侧栏
- * gameFloat 游戏页浮动广告
- * endPage 结束页广告
- */
- function loadAd(callback:Function);
-
- /**
- * 跳转小程序
- * @param {*} row 从loadAd接口中返回的数组项 @example indexLeft[0]
- * @param {*} openid 小游戏中的用户openid
- * @param {function} success 接口调用成功的回调函数
- * @param {function} fail 接口调用失败的回调函数
- * @param {function} complete 接口调用结束的回调函数(调用成功、失败都会执行)
- */
- function navigate2Mini(adData: adData, uniqueId: string, success: Function, failed: Function, completed: Function);
- /**
- * 初始化 sdk
- * @param {*} user_id 用户唯一标识
- */
- function init(user_id);
-
- /**
- * 发送视频观看记录
- */
- function sendVideoLog();
-
- /**
- * 加载广告配置
- * @param {function} success 接口调用成功的回调函数
- * @param {function} fail 接口调用失败的回调函数
- */
- function loadConfig(success: Function, failed: Function);
- /**
- * 是否开启自家导出
- * @returns true/false
- */
- function isExportValid();
- /**
- * 是否通过链接打开
- * @returns true/false
- */
- function isFromLink();
- }
- }
|