提交 721a648d 编写于 作者: fxy060608's avatar fxy060608

Merge branch 'dev' of https://github.com/dcloudio/uni-app into dev-mp-welink

# Conflicts:
#	packages/vue-cli-plugin-uni/lib/env.js
...@@ -44,7 +44,10 @@ export default { ...@@ -44,7 +44,10 @@ export default {
methods: { methods: {
initKeyboard (el) { initKeyboard (el) {
el.addEventListener('focus', () => { el.addEventListener('focus', () => {
UniViewJSBridge.subscribe('hideKeyboard', hideKeyboard) this.hideKeyboardTemp = function () {
hideKeyboard()
}
UniViewJSBridge.subscribe('hideKeyboard', this.hideKeyboardTemp)
document.addEventListener('click', iosHideKeyboard, false) document.addEventListener('click', iosHideKeyboard, false)
this.setSoftinputNavBar() this.setSoftinputNavBar()
this.setSoftinputTemporary() this.setSoftinputTemporary()
...@@ -101,7 +104,7 @@ export default { ...@@ -101,7 +104,7 @@ export default {
} }
}, },
onKeyboardHide () { onKeyboardHide () {
UniViewJSBridge.unsubscribe('hideKeyboard', hideKeyboard) UniViewJSBridge.unsubscribe('hideKeyboard', this.hideKeyboardTemp)
document.removeEventListener('click', iosHideKeyboard, false) document.removeEventListener('click', iosHideKeyboard, false)
this.resetSoftinputNavBar() this.resetSoftinputNavBar()
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
const eventNames = [ const eventNames = [
'load', 'load',
'close', 'close',
'verify',
'error' 'error'
] ]
...@@ -35,6 +36,9 @@ class RewardedVideoAd { ...@@ -35,6 +36,9 @@ class RewardedVideoAd {
this._loadAd() this._loadAd()
this._dispatchEvent('close', { isEnded: e.isEnded }) this._dispatchEvent('close', { isEnded: e.isEnded })
}) })
rewardAd.onVerify((e) => {
this._dispatchEvent('verify', { isValid: e.valid })
})
rewardAd.onError((e) => { rewardAd.onError((e) => {
const { code, message } = e const { code, message } = e
const data = { code: code, errMsg: message } const data = { code: code, errMsg: message }
...@@ -68,6 +72,9 @@ class RewardedVideoAd { ...@@ -68,6 +72,9 @@ class RewardedVideoAd {
} }
}) })
} }
getProvider () {
return this._rewardAd.getProvider()
}
_loadAd () { _loadAd () {
this._isLoad = false this._isLoad = false
this._rewardAd.load() this._rewardAd.load()
......
...@@ -5,7 +5,7 @@ function onMessage (pageId, arg) { ...@@ -5,7 +5,7 @@ function onMessage (pageId, arg) {
return return
} }
if (!page.$page.meta.isNVue) { if (!page.$page.meta.isNVue) {
const target = page.$vm._$vd.elements.find(target => target.tagName === 'web-view' && target.events['message']) const target = page.$vm._$vd.elements.find(target => target.type === 'web-view' && target.events['message'])
if (!target) { if (!target) {
return return
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册