fix(app): 修复分享页返回首页
This commit is contained in:
@@ -39,7 +39,14 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function handleBack() {
|
function handleBack() {
|
||||||
uni.navigateBack({ delta: 1 })
|
const pages = getCurrentPages()
|
||||||
|
|
||||||
|
if (pages.length > 1) {
|
||||||
|
uni.navigateBack({ delta: 1 })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.switchTab({ url: '/pages/home/index' })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user