修复:首页不刷新问题
This commit is contained in:
parent
e4ecea471c
commit
c87099de2a
@ -39,9 +39,11 @@ const showBottomNav = computed(() => {
|
|||||||
if (!display.smAndDown.value) return false
|
if (!display.smAndDown.value) return false
|
||||||
return currentRoute.value === '/' || currentRoute.value === '/search' || currentRoute.value === '/earn-activity' || currentRoute.value === '/profile'
|
return currentRoute.value === '/' || currentRoute.value === '/search' || currentRoute.value === '/earn-activity' || currentRoute.value === '/profile'
|
||||||
})
|
})
|
||||||
|
|
||||||
const mineTargetPath = computed(() =>
|
const mineTargetPath = computed(() =>
|
||||||
userStore.isLoggedIn ? '/profile' : '/login',
|
userStore.isLoggedIn ? '/profile' : '/login',
|
||||||
)
|
)
|
||||||
|
|
||||||
const bottomNavValue = computed({
|
const bottomNavValue = computed({
|
||||||
get() {
|
get() {
|
||||||
const p = currentRoute.value
|
const p = currentRoute.value
|
||||||
@ -116,6 +118,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => userStore.isLoggedIn,
|
() => userStore.isLoggedIn,
|
||||||
(loggedIn) => {
|
(loggedIn) => {
|
||||||
|
|||||||
@ -150,12 +150,15 @@ onMounted(() => {
|
|||||||
window.addEventListener('scroll', update)
|
window.addEventListener('scroll', update)
|
||||||
update()
|
update()
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(async () => {
|
||||||
console.log('home onMounted')
|
console.log('home onMounted')
|
||||||
if (layerActiveValues.value.length !== 0) {
|
if (layerActiveValues.value.length !== 0) {
|
||||||
loadEvents(1, false)
|
loadEvents(1, false)
|
||||||
} else {
|
} else {
|
||||||
|
const res = await getPmTagMain()
|
||||||
|
if (res.code === 0 || res.code === 200) {
|
||||||
|
menuStore.onCategorySelect(0, res.data[0]?.id || '')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -448,7 +451,7 @@ async function loadEvents(page: number, append: boolean, keyword?: string) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
@ -905,6 +908,7 @@ onActivated(() => {
|
|||||||
|
|
||||||
.item-label {
|
.item-label {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-count {
|
.item-count {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user