提交 18271ac9 编写于 作者: Q qiang

chore: build app

上级 9c77d5a2
...@@ -13,7 +13,8 @@ var serviceContext = (function () { ...@@ -13,7 +13,8 @@ var serviceContext = (function () {
'base64ToArrayBuffer', 'base64ToArrayBuffer',
'arrayBufferToBase64', 'arrayBufferToBase64',
'addInterceptor', 'addInterceptor',
'removeInterceptor' 'removeInterceptor',
'interceptors'
]; ];
const network = [ const network = [
...@@ -253,7 +254,7 @@ var serviceContext = (function () { ...@@ -253,7 +254,7 @@ var serviceContext = (function () {
const ad = [ const ad = [
'createRewardedVideoAd', 'createRewardedVideoAd',
'createFullScreenVideoAd', 'createFullScreenVideoAd',
'createInterstitialAd', 'createInterstitialAd',
'createInteractiveAd' 'createInteractiveAd'
]; ];
...@@ -693,7 +694,7 @@ var serviceContext = (function () { ...@@ -693,7 +694,7 @@ var serviceContext = (function () {
} }
if (res === false) { if (res === false) {
return { return {
then () {} then () { }
} }
} }
} }
...@@ -741,15 +742,15 @@ var serviceContext = (function () { ...@@ -741,15 +742,15 @@ var serviceContext = (function () {
if (hook !== 'returnValue') { if (hook !== 'returnValue') {
interceptor[hook] = globalInterceptors[hook].slice(); interceptor[hook] = globalInterceptors[hook].slice();
} }
}); });
const scopedInterceptor = scopedInterceptors[method]; const scopedInterceptor = scopedInterceptors[method];
if (scopedInterceptor) { if (scopedInterceptor) {
Object.keys(scopedInterceptor).forEach(hook => { Object.keys(scopedInterceptor).forEach(hook => {
if (hook !== 'returnValue') { if (hook !== 'returnValue') {
interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]); interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
} }
}); });
} }
return interceptor return interceptor
} }
...@@ -773,10 +774,14 @@ var serviceContext = (function () { ...@@ -773,10 +774,14 @@ var serviceContext = (function () {
if (!isPromise(res)) { if (!isPromise(res)) {
return res return res
} }
return res.then(res => { return new Promise((resolve, reject) => {
return res[1] res.then(res => {
}).catch(res => { if (res[0]) {
return res[0] reject(res[0]);
} else {
resolve(res[1]);
}
});
}) })
} }
}; };
...@@ -1313,14 +1318,6 @@ var serviceContext = (function () { ...@@ -1313,14 +1318,6 @@ var serviceContext = (function () {
this.watchers.splice(index, 1); this.watchers.splice(index, 1);
}; };
} }
mergeLocaleMessage(locale, message) {
if (this.messages[locale]) {
Object.assign(this.messages[locale], message);
}
else {
this.messages[locale] = message;
}
}
t(key, locale, values) { t(key, locale, values) {
let message = this.message; let message = this.message;
if (typeof locale === 'string') { if (typeof locale === 'string') {
...@@ -6806,11 +6803,11 @@ var serviceContext = (function () { ...@@ -6806,11 +6803,11 @@ var serviceContext = (function () {
const errorCallback = warpPlusErrorCallback(callbackId, 'chooseVideo', 'cancel'); const errorCallback = warpPlusErrorCallback(callbackId, 'chooseVideo', 'cancel');
function successCallback (tempFilePath = '') { function successCallback (tempFilePath = '') {
const dst = `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(tempFilePath)}`; const filename = `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(tempFilePath)}`;
const compressVideo = compressed ? new Promise((resolve) => { const compressVideo = compressed ? new Promise((resolve) => {
plus.zip.compressVideo({ plus.zip.compressVideo({
src: tempFilePath, src: tempFilePath,
dst filename
}, ({ tempFilePath }) => { }, ({ tempFilePath }) => {
resolve(tempFilePath); resolve(tempFilePath);
}, () => { }, () => {
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册