diff --git a/src/App.vue b/src/App.vue index 96991db..c7b1087 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,7 @@ import { storeToRefs } from 'pinia' import { onMounted, provide, ref } from 'vue' import { useI18n } from 'vue-i18n' import { loadingKey, loadingState } from '@/components/Loading' -import PlayMusic from '@/components/PlayMusic/index.vue' +// import PlayMusic from '@/components/PlayMusic/index.vue' import useStore from '@/store' import { themeChange } from '@/utils' @@ -14,74 +14,10 @@ const prizeConfig = useStore().prizeConfig const system = useStore().system const { getTheme: localTheme } = storeToRefs(globalConfig) const { getPrizeConfig: prizeList } = storeToRefs(prizeConfig) - -const tipDialog = ref() -// 设置当前奖列表 -function setCurrentPrize() { - if (prizeList.value.length <= 0) { - return - } - for (let i = 0; i < prizeList.value.length; i++) { - if (!prizeList.value[i].isUsed) { - prizeConfig.setCurrentPrize(prizeList.value[i]) - - break - } - } -} -// 判断是否手机端访问 -function judgeMobile() { - const ua = navigator.userAgent - const isAndroid = ua.includes('Android') || ua.includes('Adr') - const isIOS = !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) - - system.setIsMobile(isAndroid || isIOS) - - return isAndroid || isIOS -} -// 判断是否chrome或者edge访问 -function judgeChromeOrEdge() { - const ua = navigator.userAgent - const isChrome = ua.includes('Chrome') - const isEdge = ua.includes('Edg') - - system.setIsChrome(isChrome) - - return isChrome || isEdge -} -onMounted(() => { - themeChange(localTheme.value.name) - setCurrentPrize() - if (judgeMobile() || !judgeChromeOrEdge()) { - tipDialog.value.showModal() - } -}) diff --git a/src/components.d.ts b/src/components.d.ts index df513c9..86e9d91 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -16,7 +16,6 @@ declare module 'vue' { ImageSync: typeof import('./components/ImageSync/index.vue')['default'] Loading: typeof import('./components/Loading/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] - PlayMusic: typeof import('./components/PlayMusic/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] diff --git a/src/components/ToTop/index.vue b/src/components/ToTop/index.vue index 9f1efa4..0a9e133 100644 --- a/src/components/ToTop/index.vue +++ b/src/components/ToTop/index.vue @@ -1,10 +1,10 @@ diff --git a/src/components/PlayMusic/index.vue b/src/layout/RightButton/index.vue similarity index 50% rename from src/components/PlayMusic/index.vue rename to src/layout/RightButton/index.vue index b85d020..24ae249 100644 --- a/src/components/PlayMusic/index.vue +++ b/src/layout/RightButton/index.vue @@ -1,97 +1,25 @@