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.
26 lines
416 B
26 lines
416 B
|
|
/**
|
|
* 打开链接
|
|
*/
|
|
export const openUrl = (item) => {
|
|
if(item.target == 'uni.navigateTo'){
|
|
return uni.navigateTo({
|
|
url: item.path
|
|
})
|
|
}
|
|
if(item.target == 'uni.switchTab'){
|
|
return uni.switchTab({
|
|
url: item.path
|
|
})
|
|
}
|
|
if(item.target == 'uni.redirectTo'){
|
|
return uni.redirectTo({
|
|
url: item.path
|
|
})
|
|
}
|
|
if(item.target == 'uni.reLaunch'){
|
|
return uni.reLaunch({
|
|
url: item.path
|
|
})
|
|
}
|
|
}
|