diff --git a/packages/uni-mp-weixin/dist/wx.js b/packages/uni-mp-weixin/dist/wx.js index e00168d6777b548d34c073acabaa2f0d83b6f6bb..0ca023f566b07ceab8df1ada8a6955dd2b87e8ce 100644 --- a/packages/uni-mp-weixin/dist/wx.js +++ b/packages/uni-mp-weixin/dist/wx.js @@ -9,15 +9,23 @@ const objectKeys = [ 'router', 'worklet', ] - +const singlePageDisableKey = [ + 'lanDebug', + 'router', + 'worklet', +] const target = typeof globalThis !== 'undefined' ? globalThis : (function() { return this })() const key = ['w', 'x'].join('') const oldWx = target[key] +const launchOption = oldWx.getLaunchOptionsSync() function isWxKey(key) { + if (launchOption.scene === 1154 && singlePageDisableKey.includes(key)) { + return false + } return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function' } @@ -32,4 +40,4 @@ function initWx() { return newWx } target[key] = initWx() -export default target[key] +export default target[key]