You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
726 B

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
}