jxdnsong
2022-10-25 bf5ba56e8a82f0ef699f2eae413d0dc2c4e4f67d
src/App.vue
@@ -1,11 +1,12 @@
<template>
    <div id="app" :class="{ cantdoit: cantdoits }">
    <div ref="appRef" id="app" :class="{ cantdoit: cantdoits }">
        <router-view v-if="isRouterActive"></router-view>
    </div>
</template>
<script>
import AMapLoader from '@amap/amap-jsapi-loader'
import DevicePixelRatio from './utils/devicePixelRatio'
export default {
    name: 'App',
@@ -19,7 +20,9 @@
        }
    },
    created () {
        if (!this._isMobile()) {
            new DevicePixelRatio().init()
        }
    },
    mounted () {
        var transmitData = {}
@@ -111,6 +114,12 @@
            if (r != null) return decodeURIComponent(r)
            return null
        },
        _isMobile () {
            const flag = navigator.userAgent.match(
                /(phone|pad|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows phone)/i
            )
            return flag
        }
    }
}
</script>