提交 c25fc1ca 编写于 作者: d-u-a's avatar d-u-a

update: ad

上级 e0c6f45a
...@@ -72,10 +72,8 @@ class RewardedVideoAd { ...@@ -72,10 +72,8 @@ class RewardedVideoAd {
this._dispatchEvent('adClicked', {}) this._dispatchEvent('adClicked', {})
}) })
if (this._preload) {
this._loadAd() this._loadAd()
} }
}
get isExpired () { get isExpired () {
return (this._lastLoadTime !== 0 && (Math.abs(Date.now() - this._lastLoadTime) > EXPIRED_TIME)) return (this._lastLoadTime !== 0 && (Math.abs(Date.now() - this._lastLoadTime) > EXPIRED_TIME))
......
...@@ -436,6 +436,7 @@ export default { ...@@ -436,6 +436,7 @@ export default {
const data = this._pl[this._pi] const data = this._pl[this._pi]
const providerConfig = this._b[data.a1][data.t] const providerConfig = this._b[data.a1][data.t]
const script = providerConfig.script const script = providerConfig.script
this._currentChannel = data.a1
var id = this._randomId() var id = this._randomId()
var view = this._createView(id) var view = this._createView(id)
...@@ -517,7 +518,7 @@ export default { ...@@ -517,7 +518,7 @@ export default {
_checkRender () { _checkRender () {
var hasContent = (this.$refs.container.children.length > 0 && this.$refs.container.clientHeight > 40) var hasContent = (this.$refs.container.children.length > 0 && this.$refs.container.clientHeight > 40)
if (hasContent) { if (hasContent) {
this._report(40) this._report(40, this._currentChannel)
} }
return hasContent return hasContent
}, },
...@@ -543,12 +544,16 @@ export default { ...@@ -543,12 +544,16 @@ export default {
this._checkTimer = null this._checkTimer = null
} }
}, },
_report (type) { _report (type, currentChannel) {
AdReport.instance.get({ let reportData = {
h: __uniConfig.compilerVersion, h: __uniConfig.compilerVersion,
a: this.adpid, a: this.adpid,
at: type at: type
}) }
if (currentChannel) {
reportData.t = currentChannel
}
AdReport.instance.get(reportData)
}, },
_randomId () { _randomId () {
var result = '' var result = ''
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册