<template>
  <div>
    <template v-if="isMobile">
      <login-mobile/>
    </template>
    <template v-else>
      <login/>
    </template>
  </div>
</template>
<script>
  import {Login} from '~components/login'
  import {LoginMobile} from '~components/mobile'
  export default {
    layout (context) {
      return context.store.state.option.isMobile ? 'mobile' : 'isCityFooter'
    },
    fetch ({store, route}) {
      return Promise.all([store.dispatch('GetLoginStyle', {appId: route.query.appId})])
    },
    components: {
      Login,
      LoginMobile
    },
    computed: {
      isMobile () {
        return this.$store.state.option.isMobile
      }
    }
  }
</script>
