| | |
| | | <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 = {} |
| | |
| | | } else { |
| | | // pc端 |
| | | // this.$router.replace('/large') |
| | | this.$router.replace('/pcLayout') |
| | | |
| | | // if (this.$route.path == '/pcLayout/default') { |
| | | // this.$router.replace('/pcLayout') |
| | | // } else { |
| | | // this.$router.replace('/login') |
| | | // } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | var r = window.location.href.slice(inlength) |
| | | if (r != null) return decodeURIComponent(r) |
| | | return null |
| | | }, |
| | | getQueryVariable (variable) { |
| | | var query = window.location.search.substring(1) |
| | | var vars = query.split('&') |
| | | for (var i = 0; i < vars.length; i++) { |
| | | var pair = vars[i].split('=') |
| | | if (pair[0] == variable) { |
| | | return pair[1] |
| | | } |
| | | } |
| | | return false |
| | | }, |
| | | _isMobile () { |
| | | const flag = navigator.userAgent.match( |