提交 412e65c0 编写于 作者: Q qiang

build v3

上级 41525070
...@@ -5651,14 +5651,21 @@ var serviceContext = (function () { ...@@ -5651,14 +5651,21 @@ var serviceContext = (function () {
openLocation: openLocation$1 openLocation: openLocation$1
}); });
function openLocation$2 (data) { function openLocation$2 (data, callbackId) {
showPage({ showPage({
url: '__uniappopenlocation', url: '__uniappopenlocation',
data, data,
style: { style: {
titleNView: { titleNView: {
type: 'transparent' type: 'transparent'
} },
popGesture: 'close',
backButtonAutoControl: 'close'
},
onClose () {
invoke$1(callbackId, {
errMsg: 'openLocation:fail cancel'
});
} }
}); });
return { return {
...@@ -9253,17 +9260,14 @@ var serviceContext = (function () { ...@@ -9253,17 +9260,14 @@ var serviceContext = (function () {
const eventNames = [ const eventNames = [
'load', 'load',
'close', 'close',
'verify',
'error' 'error'
]; ];
const ERROR_CODE_LIST = [-5001, -5002, -5003, -5004, -5005, -5006]; const ERROR_CODE_LIST = [-5001, -5002, -5003, -5004, -5005, -5006];
class RewardedVideoAd { class RewardedVideoAd {
constructor (adpid) { constructor (options = {}) {
this._options = {
adpid: adpid
};
const _callbacks = this._callbacks = {}; const _callbacks = this._callbacks = {};
eventNames.forEach(item => { eventNames.forEach(item => {
_callbacks[item] = []; _callbacks[item] = [];
...@@ -9277,7 +9281,7 @@ var serviceContext = (function () { ...@@ -9277,7 +9281,7 @@ var serviceContext = (function () {
this._adError = ''; this._adError = '';
this._loadPromiseResolve = null; this._loadPromiseResolve = null;
this._loadPromiseReject = null; this._loadPromiseReject = null;
const rewardAd = this._rewardAd = plus.ad.createRewardedVideoAd(this._options); const rewardAd = this._rewardAd = plus.ad.createRewardedVideoAd(options);
rewardAd.onLoad((e) => { rewardAd.onLoad((e) => {
this._isLoad = true; this._isLoad = true;
this._dispatchEvent('load', {}); this._dispatchEvent('load', {});
...@@ -9290,6 +9294,9 @@ var serviceContext = (function () { ...@@ -9290,6 +9294,9 @@ var serviceContext = (function () {
this._loadAd(); this._loadAd();
this._dispatchEvent('close', { isEnded: e.isEnded }); this._dispatchEvent('close', { isEnded: e.isEnded });
}); });
rewardAd.onVerify((e) => {
this._dispatchEvent('verify', { isValid: e.isValid });
});
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 };
...@@ -9323,6 +9330,12 @@ var serviceContext = (function () { ...@@ -9323,6 +9330,12 @@ var serviceContext = (function () {
} }
}) })
} }
getProvider () {
return this._rewardAd.getProvider()
}
destroy () {
this._rewardAd.destroy();
}
_loadAd () { _loadAd () {
this._isLoad = false; this._isLoad = false;
this._rewardAd.load(); this._rewardAd.load();
...@@ -9336,10 +9349,8 @@ var serviceContext = (function () { ...@@ -9336,10 +9349,8 @@ var serviceContext = (function () {
} }
} }
function createRewardedVideoAd ({ function createRewardedVideoAd (options) {
adpid = '' return new RewardedVideoAd(options)
} = {}) {
return new RewardedVideoAd(adpid)
} }
...@@ -10730,17 +10741,13 @@ var serviceContext = (function () { ...@@ -10730,17 +10741,13 @@ var serviceContext = (function () {
callback.invoke(callbackId, data); callback.invoke(callbackId, data);
}); });
const methods = ['getCenterLocation', 'getScale', 'getRegion', 'includePoints', 'translateMarker']; const methods = ['getCenterLocation', 'moveToLocation', 'getScale', 'getRegion', 'includePoints', 'translateMarker'];
class MapContext { class MapContext {
constructor (id, pageVm) { constructor (id, pageVm) {
this.id = id; this.id = id;
this.pageVm = pageVm; this.pageVm = pageVm;
} }
moveToLocation () {
operateMapPlayer$3(this.id, this.pageVm, 'moveToLocation');
}
} }
MapContext.prototype.$getAppMap = function () { MapContext.prototype.$getAppMap = function () {
...@@ -12147,7 +12154,7 @@ var serviceContext = (function () { ...@@ -12147,7 +12154,7 @@ var serviceContext = (function () {
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.
先完成此消息的编辑!
想要评论请 注册