From d5819723ee697e6b27235cf60316ec703a30cde8 Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 20 Dec 2019 15:31:10 +0800 Subject: [PATCH] build runtime --- packages/uni-mp-alipay/dist/index.js | 35 ++++++++++++++++++++++----- packages/uni-mp-qq/dist/index.js | 28 ++++++++++----------- packages/uni-mp-toutiao/dist/index.js | 4 +-- 3 files changed, 45 insertions(+), 22 deletions(-) diff --git a/packages/uni-mp-alipay/dist/index.js b/packages/uni-mp-alipay/dist/index.js index 033fdab96..40a1dfb76 100644 --- a/packages/uni-mp-alipay/dist/index.js +++ b/packages/uni-mp-alipay/dist/index.js @@ -352,20 +352,17 @@ var baseApi = /*#__PURE__*/Object.freeze({ // 不支持的 API 列表 const todos = [ - 'saveImageToPhotosAlbum', 'getRecorderManager', 'getBackgroundAudioManager', 'createInnerAudioContext', 'createVideoContext', 'createCameraContext', 'createLivePlayerContext', - 'openDocument', 'onMemoryWarning', 'startAccelerometer', 'startCompass', 'addPhoneContact', 'authorize', - 'chooseAddress', 'chooseInvoiceTitle', 'addTemplate', 'deleteTemplate', @@ -377,8 +374,7 @@ const todos = [ 'getExtConfig', 'getExtConfigSync', 'onWindowResize', - 'offWindowResize', - 'saveVideoToPhotosAlbum' + 'offWindowResize' ]; // 存在兼容性的 API 列表 @@ -397,7 +393,11 @@ const canIUses = [ 'createIntersectionObserver', 'getUpdateManager', 'setBackgroundColor', - 'setBackgroundTextStyle' + 'setBackgroundTextStyle', + 'checkIsSupportSoterAuthentication', + 'startSoterAuthentication', + 'checkIsSoterEnrolledInDevice', + 'openDocument' ]; function _handleNetworkInfo (result) { @@ -754,6 +754,29 @@ const protocols = { // 需要做转换的 API 列表 }, hideHomeButton: { name: 'hideBackHome' + }, + saveImageToPhotosAlbum: { + name: 'saveImage', + args: { + filePath: 'url' + } + }, + saveVideoToPhotosAlbum: { + args: { + filePath: 'src' + } + }, + chooseAddress: { + name: 'getAddress', + returnValue (result) { + let info = result.result || {}; + result.userName = info.fullname; + result.provinceName = info.prov; + result.cityName = info.city; + result.detailInfo = info.address; + result.telNumber = info.mobilePhone; + result.errMsg = result.resultStatus; + } } }; diff --git a/packages/uni-mp-qq/dist/index.js b/packages/uni-mp-qq/dist/index.js index 259cd9f96..e6d4c75dd 100644 --- a/packages/uni-mp-qq/dist/index.js +++ b/packages/uni-mp-qq/dist/index.js @@ -388,11 +388,6 @@ const protocols = { previewImage }; const todos = [ - 'createLivePlayerContext', - 'createLivePusherContext', - 'loadFontFace', - 'onMemoryWarning', - 'onNetworkStatusChange', 'startBeaconDiscovery', 'stopBeaconDiscovery', 'getBeacons', @@ -412,10 +407,7 @@ const todos = [ 'setWifiList', 'onWifiConnected', 'getConnectedWifi', - 'setNavigationBarColor', 'setTopBarText', - 'getExtConfig', - 'getExtConfigSync', 'getPhoneNumber', 'chooseAddress', 'addCard', @@ -425,11 +417,11 @@ const todos = [ 'chooseInvoiceTitle', 'checkIsSupportSoterAuthentication', 'startSoterAuthentication', - 'checkIsSoterEnrolledInDevice', - 'reportMonitor', - 'getLogManager', - 'reportAnalytics', - 'vibrate' + 'checkIsSoterEnrolledInDevice', + 'vibrate', + 'loadFontFace', + 'getExtConfig', + 'getExtConfigSync' ]; const canIUses = [ 'scanCode', @@ -454,7 +446,15 @@ const canIUses = [ 'onSocketClose', 'openDocument', 'updateShareMenu', - 'getShareInfo' + 'getShareInfo', + 'createLivePlayerContext', + 'createLivePusherContext', + 'setNavigationBarColor', + 'onMemoryWarning', + 'onNetworkStatusChange', + 'reportMonitor', + 'getLogManager', + 'reportAnalytics' ]; const CALLBACKS = ['success', 'fail', 'cancel', 'complete']; diff --git a/packages/uni-mp-toutiao/dist/index.js b/packages/uni-mp-toutiao/dist/index.js index 41e0b59a2..4a53d998f 100644 --- a/packages/uni-mp-toutiao/dist/index.js +++ b/packages/uni-mp-toutiao/dist/index.js @@ -537,9 +537,9 @@ const protocols = { } }, requestPayment: { - name: tt.canIUse && tt.canIUse('pay') ? 'pay' : 'requestPayment', + name: tt.pay ? 'pay' : 'requestPayment', args: { - orderInfo: tt.canIUse && tt.canIUse('pay') ? 'orderInfo' : 'data' + orderInfo: tt.pay ? 'orderInfo' : 'data' } }, getFileInfo: { -- GitLab