| | |
| | | <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', |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | |
| | | if (!this._isMobile()) { |
| | | new DevicePixelRatio().init() |
| | | } |
| | | }, |
| | | mounted () { |
| | | var transmitData = {} |
| | |
| | | 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> |