wangcz %!s(int64=7) %!d(string=hai) anos
pai
achega
3d01e2a975
Modificáronse 2 ficheiros con 13 adicións e 14 borrados
  1. 13 13
      pages/index.vue
  2. 0 1
      plugins/axios-nuxt.js

+ 13 - 13
pages/index.vue

@@ -15,20 +15,20 @@
     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})
-    //   ])
+    // 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

+ 0 - 1
plugins/axios-nuxt.js

@@ -12,7 +12,6 @@ export function axiosHttp(store) {
         config.url = process.env.baseUrl + config.url
       }
     }
-    console.log(config.url)
     // if (typeof window === 'undefined') {
       // config.headers.cookie = store.state.option.cookies + '; ' + store.state.option.sessionId
       // // config.headers['User-Agent'] = Vue.$store.state.option.userAgent