diff --git a/src/views/TopList/TopList.vue b/src/views/TopList/TopList.vue index bd4b171..b8a7c10 100644 --- a/src/views/TopList/TopList.vue +++ b/src/views/TopList/TopList.vue @@ -692,9 +692,7 @@ const connectToApp = async () => { console.groupEnd() // 触发连接成功回调 - // if (onConnectionSuccess) { - // onConnectionSuccess({ environment: 'browser' }) - // } + getUserInfo() return { success: true, environment: 'browser' } } @@ -717,9 +715,7 @@ const connectToApp = async () => { console.groupEnd() // 触发连接成功回调 - // if (onConnectionSuccess) { - // onConnectionSuccess({ environment: 'app', fromCache: true }) - // } + getUserInfo() return { success: true, environment: 'app', fromCache: true } } @@ -735,9 +731,7 @@ const connectToApp = async () => { console.groupEnd() // 触发连接成功回调 - // if (onConnectionSuccess) { - // onConnectionSuccess({ environment: 'app', fromCache: true }) - // } + getUserInfo() return { success: true, environment: 'app', fromCache: true } } @@ -797,9 +791,7 @@ const connectToApp = async () => { console.groupEnd() // 触发连接成功回调 - // if (onConnectionSuccess) { - // onConnectionSuccess(connectionResult) - // } + getUserInfo() return connectionResult } catch (error) { @@ -809,11 +801,6 @@ const connectToApp = async () => { appConnected.value = false console.groupEnd() - // 触发连接失败回调 - // if (onConnectionFailed) { - // onConnectionFailed(error) - // } - // 连接失败的特殊处理 if (error.message && error.message.includes('parse access')) { router.push({ path: '/not_app', query: { message: error.message } }) @@ -964,6 +951,7 @@ const getCountdown = () => { let diff = targetTime.value - now if (diff <= 0) { + getUserInfo() updatePageData() // 刷新页面数据 targetTime.value += 7 * 86400000 // +7天 (更新闭包变量) diff = targetTime.value - now @@ -1101,7 +1089,6 @@ const observer = new IntersectionObserver((entries) => { // 刷新页面数据 const updatePageData = () => { - getUserInfo() getTopList(kingListParams.value) // 获取国王榜单 getTopList(queenListParams.value) // 获取女王榜单 getRewardsAndGifts() //获取本周的礼物和国王和皇后top奖励列表