-
Notifications
You must be signed in to change notification settings - Fork 324
Open
Description
监控导致小程序全局会有转发、分享朋友圈功能
解决方案(建议):
在执行监控初始化后执行 noMonitorPageLift 将分享功能重置为其原有方式,并且此方式貌似不会影响监控功能
MITO.init()
const WX_PAGE_LIFT = ['onShareAppMessage', 'onShareTimeline']
const originPage = Page
const noMonitorPageLift = (cb) => {
cb()
Page = (options) => {
WX_PAGE_LIFT.map((lift, index) => {
const originMethod = options[lift]
WX_PAGE_LIFT[index] = { name: lift, method: originMethod }
})
originPage.call(this, options)
WX_PAGE_LIFT.forEach((liftInfo) => {
originPage[liftInfo.name] = liftInfo.method
})
}
}
noMonitorPageLift ()
Metadata
Metadata
Assignees
Labels
No labels