function routeLink(url, type) { let isClick = true; if(isClick){ isClick = false; if(type == 'switchTab'){ wx.switchTab({ url: url }); }else if(type == 'reLaunch'){ wx.reLaunch({ url: url }); }else if(type == 'redirect'){ wx.redirectTo({ url: url }); }else if(type == 'back'){ wx.navigateBack({ delta: Number(url) }); }else{ if (getCurrentPages().length > 9) { wx.redirectTo({ url: url }); } else { wx.navigateTo({ url: url }); } } setTimeout(()=>{ isClick = true; },600); } }; module.exports = { routeLink: routeLink }