union.jpg
在main.js中增加以下代码
let onFun = uni.$on; uni.$on = (eventName,obj) =>{ try { uni.$off(eventName); } catch (error) {} onFun(eventName,obj); }