| | |
| | | <template> |
| | | <div id="app" :class="{ cantdoit: cantdoits }"> |
| | | <router-view></router-view> |
| | | <router-view v-if="isRouterActive"></router-view> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import AMapLoader from '@amap/amap-jsapi-loader' |
| | | export default { |
| | | name: 'App', |
| | | provide () { |
| | | return { reload: this.reload } |
| | | }, |
| | | data () { |
| | | return { |
| | | cantdoits: false |
| | | cantdoits: false, |
| | | isRouterActive: true |
| | | } |
| | | }, |
| | | mounted () { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | reload () { |
| | | this.isRouterActive = false |
| | | this.$nextTick(() => { |
| | | this.isRouterActive = true |
| | | this.$store.commit('SET_VIEWEREXIST', false) |
| | | }) |
| | | }, |
| | | getQueryString (name) { |
| | | const inlength = |
| | | window.location.href.indexOf('?' + name + '=') + name.length + 2 |