| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <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'
- },
- created() {
- this.$http.get('/sso/login/page/style', { params: {appId: this.$route.query.appId} })
- .then(response => {
- console.log(response.data)
- this.$store.commit('login/REQUEST_LOGIN_STYLE_SUCCESS', response.data)
- }, err => {
- this.$store.commit('login/REQUEST_LOGIN_STYLE_FAILURE', err)
- })
- },
- // asyncData ({store, route}) {
- // return Promise.all([
- // store.dispatch('GetLoginStyle', {appId: route.query.appId})
- // ])
- // },
- components: {
- Login,
- LoginMobile
- },
- computed: {
- isMobile () {
- return this.$store.state.option.isMobile
- }
- }
- }
- </script>
|