feat(固定排行榜): 顶部固定占位
This commit is contained in:
parent
790c1c38ef
commit
7197b28e19
@ -42,7 +42,7 @@
|
|||||||
</itemCenter>
|
</itemCenter>
|
||||||
|
|
||||||
<!-- 状态栏占位区域(仅在APP中显示) -->
|
<!-- 状态栏占位区域(仅在APP中显示) -->
|
||||||
<div v-if="isInAppEnvironment" style="height: 30px"></div>
|
<div style="height: 30px"></div>
|
||||||
|
|
||||||
<!-- 第一名 -->
|
<!-- 第一名 -->
|
||||||
<div style="display: flex; justify-content: center; margin-top: 11vw">
|
<div style="display: flex; justify-content: center; margin-top: 11vw">
|
||||||
@ -747,7 +747,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||||
import { isInApp, viewUserInfo } from '@/utils/appBridge.js'
|
import { viewUserInfo } from '@/utils/appBridge.js'
|
||||||
import { connectToApp } from '@/utils/appConnector.js'
|
import { connectToApp } from '@/utils/appConnector.js'
|
||||||
import { useLangStore } from '@/stores/lang'
|
import { useLangStore } from '@/stores/lang'
|
||||||
import { getPngUrl, getWebpUrl } from '@/config/imagePaths.js'
|
import { getPngUrl, getWebpUrl } from '@/config/imagePaths.js'
|
||||||
@ -768,7 +768,6 @@ import itemCenter from '@/components/itemCenter.vue'
|
|||||||
import TopUser from './components/topUser.vue'
|
import TopUser from './components/topUser.vue'
|
||||||
import maskLayer from '@/components/MaskLayer.vue'
|
import maskLayer from '@/components/MaskLayer.vue'
|
||||||
|
|
||||||
const isInAppEnvironment = ref(false) // 检测是否在APP环境中
|
|
||||||
const gamesKingStore = useGamesKingStore()
|
const gamesKingStore = useGamesKingStore()
|
||||||
|
|
||||||
// 预加载状态
|
// 预加载状态
|
||||||
@ -1104,7 +1103,6 @@ const connectToAppHandler = async () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
connectToAppHandler()
|
connectToAppHandler()
|
||||||
preloadOtherImages() // 预加载其他图片
|
preloadOtherImages() // 预加载其他图片
|
||||||
isInAppEnvironment.value = isInApp()
|
|
||||||
|
|
||||||
checkShow() // 检查是否展示每日弹窗
|
checkShow() // 检查是否展示每日弹窗
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<div class="bg">
|
<div class="bg">
|
||||||
<!-- 状态栏占位区域(仅在APP中显示) -->
|
<!-- 状态栏占位区域(仅在APP中显示) -->
|
||||||
<div v-if="isInAppEnvironment" style="height: 30px"></div>
|
<div style="height: 30px"></div>
|
||||||
|
|
||||||
<!-- 帮助按钮 -->
|
<!-- 帮助按钮 -->
|
||||||
<img
|
<img
|
||||||
@ -788,7 +788,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||||
import { isInApp, viewUserInfo } from '@/utils/appBridge.js'
|
import { viewUserInfo } from '@/utils/appBridge.js'
|
||||||
import { useLangStore } from '@/stores/lang'
|
import { useLangStore } from '@/stores/lang'
|
||||||
import { useThrottle } from '@/utils/useDebounce'
|
import { useThrottle } from '@/utils/useDebounce'
|
||||||
import { connectToApp } from '@/utils/appConnector.js'
|
import { connectToApp } from '@/utils/appConnector.js'
|
||||||
@ -837,8 +837,6 @@ const userInfo = ref({})
|
|||||||
|
|
||||||
const visibleKingList = ref(true)
|
const visibleKingList = ref(true)
|
||||||
|
|
||||||
const isInAppEnvironment = ref(false) // 检测是否在APP环境中
|
|
||||||
|
|
||||||
const historyList = ref([]) // 榜首历史记录
|
const historyList = ref([]) // 榜首历史记录
|
||||||
const showTopOne = computed(() => {
|
const showTopOne = computed(() => {
|
||||||
let topNew = []
|
let topNew = []
|
||||||
@ -1172,7 +1170,6 @@ const completePreloading = async () => {
|
|||||||
|
|
||||||
// 组件挂载时检测环境
|
// 组件挂载时检测环境
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
isInAppEnvironment.value = isInApp()
|
|
||||||
connectToAppHandler()
|
connectToAppHandler()
|
||||||
|
|
||||||
getCountdown()
|
getCountdown()
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<!-- 状态栏占位区域(仅在APP中显示) -->
|
<!-- 状态栏占位区域(仅在APP中显示) -->
|
||||||
<div v-if="isInAppEnvironment" style="height: 60px"></div>
|
<div style="height: 60px"></div>
|
||||||
|
|
||||||
<!-- 顶部导航栏 -->
|
<!-- 顶部导航栏 -->
|
||||||
<div style="padding: 4px 8%">
|
<div style="padding: 4px 8%">
|
||||||
|
|||||||
@ -42,9 +42,7 @@
|
|||||||
<div
|
<div
|
||||||
style="min-height: 20.66vw; display: flex; justify-content: flex-end; width: 100%"
|
style="min-height: 20.66vw; display: flex; justify-content: flex-end; width: 100%"
|
||||||
:style="{
|
:style="{
|
||||||
marginTop: isInAppEnvironment
|
marginTop: 'calc(65vw - 30px - 10vw - 10vw - 20px)',
|
||||||
? 'calc(65vw - 30px - 10vw - 10vw - 20px)'
|
|
||||||
: 'calc(65vw - 10vw - 10vw - 20px)',
|
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
@ -852,7 +850,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||||
import { isInApp, viewUserInfo } from '@/utils/appBridge.js'
|
import { viewUserInfo } from '@/utils/appBridge.js'
|
||||||
import { useLangStore } from '@/stores/lang'
|
import { useLangStore } from '@/stores/lang'
|
||||||
import { connectToApp } from '@/utils/appConnector.js'
|
import { connectToApp } from '@/utils/appConnector.js'
|
||||||
import { useThrottle } from '@/utils/useDebounce'
|
import { useThrottle } from '@/utils/useDebounce'
|
||||||
@ -904,7 +902,6 @@ const connectToAppHandler = async () => {
|
|||||||
|
|
||||||
const userInfo = ref({})
|
const userInfo = ref({})
|
||||||
|
|
||||||
const isInAppEnvironment = ref(false) // 检测是否在APP环境中
|
|
||||||
const helpInfoShow = ref(false) //帮助模块
|
const helpInfoShow = ref(false) //帮助模块
|
||||||
const historyShow = ref(false) //历史模块
|
const historyShow = ref(false) //历史模块
|
||||||
const giftsShow = ref(false) //礼物模块
|
const giftsShow = ref(false) //礼物模块
|
||||||
@ -1280,7 +1277,6 @@ const completePreloading = async () => {
|
|||||||
// 组件挂载时检测环境
|
// 组件挂载时检测环境
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
connectToAppHandler()
|
connectToAppHandler()
|
||||||
isInAppEnvironment.value = isInApp()
|
|
||||||
|
|
||||||
getCountdown()
|
getCountdown()
|
||||||
timer = setInterval(getCountdown, 1000) //每秒更新
|
timer = setInterval(getCountdown, 1000) //每秒更新
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user