提交 653d65a8 编写于 作者: fxy060608's avatar fxy060608

build:app:view

上级 f77a0944
...@@ -1429,7 +1429,6 @@ var serviceContext = (function () { ...@@ -1429,7 +1429,6 @@ var serviceContext = (function () {
}); });
// App端可以只使用files不传filePath和name // App端可以只使用files不传filePath和name
// import getRealPath from 'uni-platform/helpers/get-real-path'
const uploadFile = { const uploadFile = {
url: { url: {
...@@ -1440,7 +1439,12 @@ var serviceContext = (function () { ...@@ -1440,7 +1439,12 @@ var serviceContext = (function () {
type: Array type: Array
}, },
filePath: { filePath: {
type: String type: String,
validator (value, params) {
if (value) {
params.type = getRealPath(value);
}
}
}, },
name: { name: {
type: String type: String
...@@ -8240,6 +8244,9 @@ var serviceContext = (function () { ...@@ -8240,6 +8244,9 @@ var serviceContext = (function () {
// 查找当前 tabBarPage,且设置 visible // 查找当前 tabBarPage,且设置 visible
getCurrentPages(true).forEach(page => { getCurrentPages(true).forEach(page => {
if (('/' + page.route) === path) { if (('/' + page.route) === path) {
if (!page.$page.meta.visible) {
page.$vm.__call_hook('onShow');
}
page.$page.meta.visible = true; page.$page.meta.visible = true;
tabBarPage = page; tabBarPage = page;
} else { } else {
...@@ -8250,7 +8257,6 @@ var serviceContext = (function () { ...@@ -8250,7 +8257,6 @@ var serviceContext = (function () {
}); });
if (tabBarPage) { if (tabBarPage) {
tabBarPage.$vm.__call_hook('onShow');
tabBarPage.$getAppWebview().show('none'); tabBarPage.$getAppWebview().show('none');
} else { } else {
return showWebview(registerPage({ return showWebview(registerPage({
...@@ -8808,6 +8814,8 @@ var serviceContext = (function () { ...@@ -8808,6 +8814,8 @@ var serviceContext = (function () {
'error' 'error'
]; ];
const ERROR_CODE_LIST = [-5001, -5002, -5003, -5004, -5005, -5006];
class RewardedVideoAd { class RewardedVideoAd {
constructor (adpid) { constructor (adpid) {
this._options = { this._options = {
...@@ -8824,7 +8832,7 @@ var serviceContext = (function () { ...@@ -8824,7 +8832,7 @@ var serviceContext = (function () {
}); });
this._isLoad = false; this._isLoad = false;
this._adError = false; 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(this._options);
...@@ -8843,9 +8851,9 @@ var serviceContext = (function () { ...@@ -8843,9 +8851,9 @@ var serviceContext = (function () {
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 };
this._adError = (code && code < 5005); this._adError = message;
this._dispatchEvent('error', data); this._dispatchEvent('error', data);
if (code === 5005 && this._loadPromiseReject != null) { if ((code === -5005 || ERROR_CODE_LIST.index(code) === -1) && this._loadPromiseReject != null) {
this._loadPromiseReject(data); this._loadPromiseReject(data);
this._loadPromiseReject = null; this._loadPromiseReject = null;
} }
...@@ -8869,14 +8877,11 @@ var serviceContext = (function () { ...@@ -8869,14 +8877,11 @@ var serviceContext = (function () {
this._rewardAd.show(); this._rewardAd.show();
resolve(); resolve();
} else { } else {
reject(new Error('')); reject(new Error(this._adError));
} }
}) })
} }
_loadAd () { _loadAd () {
if (this._adError) {
return
}
this._isLoad = false; this._isLoad = false;
this._rewardAd.load(); this._rewardAd.load();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册