From fd5f9f95240d7707603f054a4ef8024726c003a2 Mon Sep 17 00:00:00 2001 From: qiang Date: Tue, 2 Jun 2020 17:05:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A7=E7=89=88=E6=9C=AC=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=90=8E=E4=BF=AE=E5=A4=8D=E8=B0=83=E7=94=A8=20uni.ge?= =?UTF-8?q?tBackgroundAudioManager=20=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/apis.js | 21 ++++++++++---------- src/core/service/api/network/update.js | 27 ++++++++++++++++++++++++++ src/platforms/h5/helpers/todo-api.js | 1 - 3 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 src/core/service/api/network/update.js diff --git a/lib/apis.js b/lib/apis.js index b41adedcf..a4088bef5 100644 --- a/lib/apis.js +++ b/lib/apis.js @@ -15,7 +15,8 @@ const network = [ 'sendSocketMessage', 'onSocketMessage', 'closeSocket', - 'onSocketClose' + 'onSocketClose', + 'getUpdateManager' ] const route = [ @@ -59,7 +60,7 @@ const media = [ 'saveVideoToPhotosAlbum', 'createVideoContext', 'createCameraContext', - 'createLivePlayerContext', + 'createLivePlayerContext', 'createLivePusherContext' ] @@ -115,7 +116,7 @@ const device = [ 'stopBeaconDiscovery', 'checkIsSupportSoterAuthentication', 'checkIsSoterEnrolledInDevice', - 'startSoterAuthentication', + 'startSoterAuthentication', 'onUIStyleChange' ] @@ -154,7 +155,7 @@ const ui = [ 'startPullDownRefresh', 'stopPullDownRefresh', 'createSelectorQuery', - 'createIntersectionObserver', + 'createIntersectionObserver', 'getMenuButtonBoundingClientRect' ] @@ -201,14 +202,14 @@ const third = [ 'upx2px', 'restoreGlobal', 'getSubNVueById', - 'getCurrentSubNVue', - 'setPageMeta', - 'onNativeEventReceive', - 'sendNativeEvent', + 'getCurrentSubNVue', + 'setPageMeta', + 'onNativeEventReceive', + 'sendNativeEvent', 'preloadPage' ] -const ad = [ +const ad = [ 'createRewardedVideoAd' ] @@ -225,7 +226,7 @@ const apis = [ ...event, ...file, ...canvas, - ...third, + ...third, ...ad ] diff --git a/src/core/service/api/network/update.js b/src/core/service/api/network/update.js new file mode 100644 index 000000000..99e5dd65d --- /dev/null +++ b/src/core/service/api/network/update.js @@ -0,0 +1,27 @@ +class UpdateManager { + constructor () { + + } + + onCheckForUpdate () { + + } + + onUpdateReady () { + + } + + onUpdateFailed () { + + } + + applyUpdate () { + + } +} + +let updateManager + +export function getUpdateManager () { + return updateManager || (updateManager = new UpdateManager()) +} diff --git a/src/platforms/h5/helpers/todo-api.js b/src/platforms/h5/helpers/todo-api.js index a92df02d8..82fd8a06a 100644 --- a/src/platforms/h5/helpers/todo-api.js +++ b/src/platforms/h5/helpers/todo-api.js @@ -1,7 +1,6 @@ export default [ 'saveImageToPhotosAlbum', 'getRecorderManager', - 'getBackgroundAudioManager', 'saveVideoToPhotosAlbum', 'createCameraContext', 'createLivePlayerContext', -- GitLab