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

update: 互动广告,增加绑定用户逻辑

上级 8ab611e0
...@@ -81,6 +81,7 @@ class InteractiveAd { ...@@ -81,6 +81,7 @@ class InteractiveAd {
this._adError = '' this._adError = ''
this._adpid = options.adpid this._adpid = options.adpid
this._provider = options.provider this._provider = options.provider
this._userData = options.userData
this._isLoaded = false this._isLoaded = false
this._isLoading = false this._isLoading = false
this._loadPromiseResolve = null this._loadPromiseResolve = null
...@@ -99,6 +100,9 @@ class InteractiveAd { ...@@ -99,6 +100,9 @@ class InteractiveAd {
provider: this._provider, provider: this._provider,
success: (res) => { success: (res) => {
this._ad = res this._ad = res
if (this._userData) {
this.bindUserData(this._userData)
}
this._loadAd() this._loadAd()
}, },
fail: (err) => { fail: (err) => {
...@@ -164,6 +168,12 @@ class InteractiveAd { ...@@ -164,6 +168,12 @@ class InteractiveAd {
} }
} }
bindUserData (data) {
if (this._ad !== null) {
this._ad.bindUserData(data)
}
}
_loadAd () { _loadAd () {
if (this._ad !== null) { if (this._ad !== null) {
if (this._isLoading === true) { if (this._isLoading === true) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册