Browse Source

docker环境下运行异常处理

yingp 8 năm trước cách đây
mục cha
commit
bf6729a68f
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      components/home/Carousel.vue
  2. 1 1
      store/index.js

+ 1 - 1
components/home/Carousel.vue

@@ -44,7 +44,7 @@
         return this.$store.state.carousel.banners
       },
       activeColor () {
-        return this.banners.data[this.activeSlide].metadata['background-color']
+        return this.banners.data.length ? this.banners.data[this.activeSlide].metadata['background-color'] : null
       }
     }
   }

+ 1 - 1
store/index.js

@@ -43,7 +43,7 @@ export const actions = {
   // 获取轮播配置
   loadBanners ({ commit }) {
     commit('carousel/REQUEST_BANNER')
-    return axios.get('/api/carousel/home page banner')
+    return axios.get('/api/carousel/home%20page%20banner')
       .then(response => {
         commit('carousel/GET_BANNER_SUCCESS', response.data)
       }, err => {