From 4702bf0d30623a1a845412eb1a80db477077b3bf Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 3 Apr 2020 17:44:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E5=88=86=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=BA=E4=BB=85=E5=9C=A8=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/service/bridge/subscribe.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/service/bridge/subscribe.js b/src/core/service/bridge/subscribe.js index 1f9e474f7a..c5e6dee2dd 100644 --- a/src/core/service/bridge/subscribe.js +++ b/src/core/service/bridge/subscribe.js @@ -9,13 +9,13 @@ export default function initSubscribe (subscribe, { getCurrentPages }) { function createPageEvent (eventType) { - return function (args, pageId) { + return function (args, pageId) { pageId = parseInt(pageId) const pages = getCurrentPages() const page = pages.find(page => page.$page.id === pageId) if (page) { callPageHook(page, eventType, args) - } else { + } else if (process.env.NODE_ENV !== 'production') { console.error(`Not Found:Page[${pageId}]`) } } @@ -48,7 +48,7 @@ export default function initSubscribe (subscribe, { } callback(res) } - } + } if (__PLATFORM__ === 'h5') { subscribe('onPageReady', createPageEvent('onReady')) @@ -59,4 +59,4 @@ export default function initSubscribe (subscribe, { subscribe('onRequestComponentInfo', onRequestComponentInfo) subscribe('onRequestComponentObserver', onRequestComponentObserver) -} +} -- GitLab