Commit 95e38ed0 authored by liuxinjun's avatar liuxinjun

-

添加多视频广告id以及分享视频切换计数bug
parent 4b08db29
This diff is collapsed.
{
"ver": "1.0.5",
"uuid": "76a9ae71-a532-45e8-8a6e-d959fc353c11",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -1497,6 +1497,45 @@ var sdk = { ...@@ -1497,6 +1497,45 @@ var sdk = {
} }
} }
}, },
createRewardedVideoAdByAdId(videoAdUnitId) {
let self = this;
if (true) {
if (this.VideoAd) {
return this.VideoAd;
} else {
this.VideoAd = wx.createRewardedVideoAd({ adUnitId: videoAdUnitId })
this.VideoAd.onLoad(function (res) {
console.log("sdk VideoAd广告加载事件:", res)
});
var closeFun = function (res) {
// 用户点击了【关闭广告】按钮
// 小于 2.1.0 的基础库版本,res 是一个 undefined
if (res && res.isEnded || res === undefined) {
console.log("sdk 看视频成功");
self.videoSuccess();
} else {
console.error("sdk 看视频失败");
self.videoFail();
}
};
this.VideoAd.onClose(closeFun);
this.VideoAd.onError(function (res) {
//console.log("sdk VideoAd广告错误事件:", res)
wx.showToast({
title: '暂未开通,请谅解!',
icon: 'none'
});
});
return this.VideoAd;
}
}
},
/** /**
* @apiGroup C * @apiGroup C
* @apiName Screenshot * @apiName Screenshot
...@@ -2319,7 +2358,7 @@ var sdk = { ...@@ -2319,7 +2358,7 @@ var sdk = {
if (nextCacheVal >= data[nextKey].count) { if (nextCacheVal > data[nextKey].count) {
//当前缓存中的记录当前key的次数已经超过配置次数 //当前缓存中的记录当前key的次数已经超过配置次数
if (data[nextKey].next == 'start') { if (data[nextKey].next == 'start') {
......
...@@ -2,9 +2,9 @@ var sdk_conf = { ...@@ -2,9 +2,9 @@ var sdk_conf = {
//.开发调试环境:prod 或 test,env_apis配合使用,主要是将接口切换正式环境和测试环境,上线务必修改为:prod //.开发调试环境:prod 或 test,env_apis配合使用,主要是将接口切换正式环境和测试环境,上线务必修改为:prod
env:'prod', env:'prod',
//.游戏唯一标识:由游戏技术修改 //.游戏唯一标识:由游戏技术修改
game: 'jinjibazuqiu-weixin', game: 'woyaoyangtiaogou-weixin',
//.当前游戏版本:由游戏技术修改 //.当前游戏版本:由游戏技术修改
version: '1.0.0', version: '1.0.4',
//以下广告ID获取已经废弃,改成从服务端配置config4中获取 //以下广告ID获取已经废弃,改成从服务端配置config4中获取
//.banner广告单元id //.banner广告单元id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment