123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <script setup lang="ts">
- import { onBeforeMount } from "vue";
- import { RouterView } from "vue-router";
- onBeforeMount(() => {
- // 移动端和pc端的切换
- if (
- window.navigator.userAgent.match(
- /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
- )
- ) {
- // 移动端
- if (window.location.href.indexOf("en.capitalmuseum.org.cn") > -1) {
- window.location.href =
- window.location.origin + "/mobile/index.html#/Layout/Home";
- setTimeout(() => {
- location.reload();
- }, 200);
- }
- }
- });
- </script>
- <template>
- <RouterView />
- </template>
- <style lang="scss">
- body.aria-active {
- margin-top: 105px;
- }
- .van-swipe {
- cursor: default !important;
- }
- .container {
- margin: 0 auto;
- width: 100%;
- max-width: 1200px;
- }
- </style>
|