fix(初始化): 获取userId前加上初始化处理
This commit is contained in:
parent
a371df6bba
commit
50bdee106f
@ -641,6 +641,8 @@ import {
|
|||||||
getHistoryTopOne,
|
getHistoryTopOne,
|
||||||
} from '@/api/topList.js'
|
} from '@/api/topList.js'
|
||||||
import { useDebounce, useThrottle } from '@/utils/useDebounce'
|
import { useDebounce, useThrottle } from '@/utils/useDebounce'
|
||||||
|
import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
|
||||||
|
|
||||||
//vite动态批量导入图片
|
//vite动态批量导入图片
|
||||||
const imageModules = import.meta.glob('@/assets/images/TopList/*.{png,jpg,svg}', { eager: true })
|
const imageModules = import.meta.glob('@/assets/images/TopList/*.{png,jpg,svg}', { eager: true })
|
||||||
// 生成文件名映射对象(自动移除路径和扩展名)
|
// 生成文件名映射对象(自动移除路径和扩展名)
|
||||||
@ -887,6 +889,7 @@ const updatePageData = () => {
|
|||||||
// 组件挂载时检测环境
|
// 组件挂载时检测环境
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
isInAppEnvironment.value = isInApp()
|
isInAppEnvironment.value = isInApp()
|
||||||
|
usePageInitializationWithConfig()
|
||||||
|
|
||||||
getCountdown()
|
getCountdown()
|
||||||
timer = setInterval(getCountdown, 1000) //每秒更新
|
timer = setInterval(getCountdown, 1000) //每秒更新
|
||||||
|
|||||||
@ -742,6 +742,7 @@ import itemCenter from '@/components/WeeklyStar/itemCenter.vue'
|
|||||||
import TopUser from '@/components/WeeklyStar/topUser.vue'
|
import TopUser from '@/components/WeeklyStar/topUser.vue'
|
||||||
import maskLayer from '../../components/MaskLayer.vue'
|
import maskLayer from '../../components/MaskLayer.vue'
|
||||||
import { useDebounce, useThrottle } from '@/utils/useDebounce'
|
import { useDebounce, useThrottle } from '@/utils/useDebounce'
|
||||||
|
import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
|
||||||
import { getUserId } from '@/utils/userStore.js'
|
import { getUserId } from '@/utils/userStore.js'
|
||||||
import { showError, showWarning, showInfo, showSuccess } from '@/utils/toast.js'
|
import { showError, showWarning, showInfo, showSuccess } from '@/utils/toast.js'
|
||||||
import {
|
import {
|
||||||
@ -1071,6 +1072,7 @@ const observer = new IntersectionObserver((entries) => {
|
|||||||
|
|
||||||
// 组件挂载时检测环境
|
// 组件挂载时检测环境
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
usePageInitializationWithConfig()
|
||||||
isInAppEnvironment.value = isInApp()
|
isInAppEnvironment.value = isInApp()
|
||||||
|
|
||||||
getCountdown()
|
getCountdown()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user