修改跳转问题

This commit is contained in:
zhouyanli
2026-04-20 17:10:47 +08:00
parent 8af229f25b
commit c8940e5b02
9 changed files with 85 additions and 88 deletions

View File

@@ -122,12 +122,16 @@
}
// 返回
const narBack = () =>{
// uni.navigateBack({
// delta: 1
// })
uni.switchTab({
url:"/pages/index/index"
})
if(uni.getStorageSync('sourcePage') === "index"){
uni.switchTab({
url:"/pages/index/index"
})
}else if(uni.getStorageSync('sourcePage') === "serviceIndex"){
uni.switchTab({
url:"/pages/serviceIndex/serviceIndex"
})
}
uni.removeStorageSync('sourcePage')
}
</script>

View File

@@ -68,12 +68,17 @@ const selectDoor = (index) => {
}
// 返回
const narBack = () =>{
// uni.navigateBack({
// delta: 1
// })
uni.switchTab({
url:"/pages/index/index"
})
if(uni.getStorageSync('sourcePage') === "index"){
uni.switchTab({
url:"/pages/index/index"
})
}else if(uni.getStorageSync('sourcePage') === "serviceIndex"){
uni.switchTab({
url:"/pages/serviceIndex/serviceIndex"
})
}
uni.removeStorageSync('sourcePage')
}
// 确认开门方法
const openDoor = () => {

View File

@@ -164,7 +164,7 @@ const getCommunityList = () =>{
}
onLoad(() =>{
getCommunityList()
// getCommunityList()
})