Browse Source

Merge branch 'master' of C:\Users\yc\.ssh\mall-web-ssr with conflicts.

yangc 8 years ago
parent
commit
9cc5c63633

+ 16 - 3
components/home/Carousel.vue

@@ -12,6 +12,8 @@
             </div>
           </div>
           <div class="swiper-pagination swiper-pagination-bullets"></div>
+          <div class="swiper-button-prev"><i class="iconfont icon-arrow-left"></i></div>
+          <div class="swiper-button-next"><i class="iconfont icon-arrow-right"></i></div>
         </div>
       </div>
     </div>
@@ -27,9 +29,11 @@
           autoplay: 6000,
           pagination: '.swiper-pagination',
           paginationClickable: true,
-          mousewheelControl: true,
+          mousewheelControl: false,
           effect: 'fade',
           lazyLoading: true,
+          prevButton: '.swiper-button-prev',
+          nextButton: '.swiper-button-next',
           onTransitionStart: (swiper) => {
             // 不要通过vue刷新dom,会导致pagination无法刷新
             // this.activeSlide = swiper.activeIndex
@@ -37,14 +41,23 @@
               this.banners.data[swiper.activeIndex].metadata['background-color']
           }
         }
+    //    banners: {}
       }
     },
+//    mounted () {
+//      this.$http.get('/api/carousel/home%20page%20banner')
+//        .then(response => {
+//          this.banners = response
+//        })
+//    },
     computed: {
-      banners () {
+      banner () {
         return this.$store.state.carousel.banners
       },
       activeColor () {
-        return this.banners.data.length ? this.banners.data[this.activeSlide].metadata['background-color'] : null
+        if (this.banners.data) {
+          return this.banners.data.length ? this.banners.data[this.activeSlide].metadata['background-color'] : null
+        }
       }
     }
   }

+ 22 - 6
components/home/KindCategory.vue

@@ -8,8 +8,8 @@
           <i class="iconfont icon-arrow-right icon-sm pull-right"></i>
         </nuxt-link>
       </li>
-      <li class="kind-main-item item-more">
-        <nuxt-link to="/product/kind">
+      <li class="kind-main-item item-more"  @mouseenter="hideChildrenLayout()">
+        <nuxt-link to="/product/kind/home">
           <span>查看更多器件分类</span>
         </nuxt-link>
       </li>
@@ -50,6 +50,7 @@
     data () {
       return {
         activeKindId: 0
+  //      kinds: {}
       }
     },
     methods: {
@@ -65,20 +66,30 @@
         this.activeKindId = null
       }
     },
+//    mounted () {
+//      this.$http.get(`/api/product/kind/0/children_all`)
+//        .then(response => {
+//          this.kinds = response
+//        })
+//    },
     computed: {
       kinds () {
         return this.$store.state.product.kind.kinds
       },
       kindsToShow () {
         // 只显示前13个根类目
-        return this.kinds.data.slice(0, 13)
+        if (this.kinds.data) {
+          return this.kinds.data.slice(0, 13)
+        }
       }
     }
   }
 </script>
 <style lang="scss" scoped>
   @import '~assets/scss/variables';
-
+  .kind-children .kind-children-layout{
+    padding: 15px 0 0 0;
+  }
   .kind-category {
     position: absolute;
     width: 200px;
@@ -92,7 +103,7 @@
       .kind-main-item {
         height: 34.1px;
         line-height: 34.1px;
-        padding: 0 20px;
+        padding: 0 10px 0 20px;
         background: rgba(80, 120, 203, 0.9);
         display: block;
 
@@ -137,7 +148,12 @@
         height: 477px;
         font-size: 12px;
         overflow-y: auto;
-
+        a {
+            color: #000;
+        }
+        a:hover {
+         color: #ff0006;
+        }
         .kind-children-item-wrap {
           height: 100%;
           width: 100%;

+ 19 - 4
components/home/News.vue

@@ -6,7 +6,7 @@
       </h2>
       <ul class="title-list">
         <li v-for="n in news5" class="item">
-          <nuxt-link :to="`/news/${n.id}`">
+          <nuxt-link :to="`/news/${n.id}`" target="_blank">
             {{ n.title }}
           </nuxt-link>
         </li>
@@ -14,7 +14,7 @@
       </ul>
       <ul class="thumbnail-list">
         <li v-for="n in news3" class="item">
-          <nuxt-link :to="`/news/${n.id}`">
+          <nuxt-link :to="`/news/${n.id}`" target="_blank">
             <img :src="n.thumbnail">
             <span>{{ n.title }}</span>
           </nuxt-link>
@@ -27,15 +27,30 @@
 <script>
   export default {
     name: 'news',
+//    data () {
+//      return {
+//        news: {}
+//      }
+//    },
+//    mounted () {
+//      this.$http.get('/api/news/created', {params: { page: 1, pageSize: 10 }})
+//        .then(response => {
+//          this.news = response
+//        })
+//    },
     computed: {
       news () {
         return this.$store.state.news.snapshot
       },
       news3 () {
-        return this.news.data.slice(0, 3)
+        if (this.news.data) {
+          return this.news.data.content.slice(0, 3)
+        }
       },
       news5 () {
-        return this.news.data.slice(0, 5)
+        if (this.news.data) {
+          return this.news.data.content.slice(0, 5)
+        }
       }
     }
   }

+ 15 - 2
components/home/floor/FloorList.vue

@@ -9,13 +9,23 @@
 <script>
   import Floor from './Floor.vue'
   import FloorBar from './FloorBar.vue'
-
   export default {
     name: 'floor-list',
     components: {
       Floor,
       FloorBar
     },
+//    data () {
+//      return {
+//        floors: {}
+//      }
+//    },
+//    mounted () {
+//      this.$http.get('/api/floors/home')
+//        .then(response => {
+//          this.floors = response
+//        })
+//    }
     computed: {
       floors () {
         return this.$store.state.floor.list
@@ -25,7 +35,10 @@
 </script>
 <style lang="scss" scoped>
   @import '~assets/scss/variables';
-
+  /*add*/
+  .floor-list .container{
+    padding: 0;
+  }
   .floor-list {
     margin-bottom: $xlg-pad;
   }

+ 24 - 9
components/news/Detail.vue

@@ -4,7 +4,7 @@
         <h1 >{{item.title}}</h1>
         <div class="hot-time">
           <span class="text-num">时间:<span >{{item.created | date}}</span></span>
-          <span class="pull-right text-num ng-binding" style="font-size: 12px;"><i class="fa fa-eye" style="margin-left: 15px;"></i>{{item.viewCount}}</span>
+          <span class="pull-right text-num" style="font-size: 12px;"><i class="fa fa-eye" style="margin-left: 15px;"></i>{{item.viewCount}}</span>
         </div>
         <div class="news-detail-content" v-html=item.content>
         </div>
@@ -12,25 +12,40 @@
     </div>
 </template>
 <script>
+ // import axios from '~plugins/axios'
   export default {
     name: 'Detail',
+//    data () {
+//      return {
+//        new: {}
+//      }
+//    },
+//    mounted () {
+//      this.$http.get(`/api/news/${this.$route.params.id}`)
+//        .then(response => {
+//          this.new = response
+//        })
+//    },
     computed: {
-      news () {
-        return this.$store.state.detailNews.detailNews
+      new () {
+        return this.$store.state.newsData.detailNews.detailNews
       },
       item () {
-        return this.news.data
+        if (this.new.data) {
+          return this.new.data
+        }
       }
     },
     filters: {
       date: function (input) {
         const d = new Date(input)
         const year = d.getFullYear()
-        const month = d.getMonth() + 1
-        const hour = d.getHours()
-        const minutes = d.getMinutes()
-        const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' ' + hour + ':' + minutes
-        return year + '-' + month + '-' + day
+        const monthTemp = d.getMonth() + 1
+        const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+        const hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours() + ' '
+        const minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes() + ' '
+        const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
+        return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes
       }
     }
   }

+ 25 - 6
components/news/Left.vue

@@ -4,7 +4,6 @@
     <h4>
       <span>hot</span>热门文章
     </h4>
-
     <div>
       <ol class="list-unstyled">
         <li v-for="item in news_show" v-bind="item">
@@ -28,19 +27,34 @@
 </template>
 <script>
   export default {
+//    data () {
+//      return {
+//        new: {}
+//      }
+//    },
+//    mounted () {
+//      this.$http.get('/api/news/viewCount')
+//        .then(response => {
+//          this.new = response
+//        })
+//    },
     computed: {
-      news () {
-        return this.$store.state.hotNews.hotNews
+      new () {
+        return this.$store.state.newsData.hotNews.hotNews
       },
       news_show () {
-        return this.news.data
+     //   console.log(this.new.data)
+        if (this.new.data) {
+          return this.new.data.content
+        }
       }
     },
     filters: {
       date: function (input) {
         const d = new Date(input)
         const year = d.getFullYear()
-        const month = d.getMonth() + 1
+        const monthTemp = d.getMonth() + 1
+        const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
         const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
         return year + '-' + month + '-' + day
       }
@@ -53,7 +67,6 @@
     border: 1px solid #e8e8e8;
     width:260px;
     padding: 0;
-    margin-top: 15px
   }
   .hot-news h4{
     background: #ecf2fd;
@@ -62,6 +75,7 @@
     line-height: 40px;
     font-size: 18px!important;
     margin: 0;
+    font-weight: normal;
   }
   .hot-news h4 span{
     background: #feb900;
@@ -119,6 +133,11 @@
     color: #323232;
   }
 
+  .hot-news li h5 a:hover{
+    color: #5078cb;
+    text-decoration: underline !important;
+  }
+
   .hot-time{
     line-height: 30px;
   }

+ 35 - 12
components/news/Right.vue

@@ -32,55 +32,74 @@
       return {
         pageSize: 10,
         nowPage: 1
+  //      new: {}
       }
     },
     components: {
       Page
     },
+//    mounted () {
+//      this.loadPageNews()
+//    },
     computed: {
-      news () {
-        return this.$store.state.newsPage.allNews
+      new () {
+        return this.$store.state.newsData.newsPage.allNews
       },
       news_show () {
-        return this.news.data.content
+        if (this.new.data) {
+          return this.new.data.content
+        }
       },
       totalCount () {
-        return this.news.data.count
+        if (this.new.data) {
+          return this.new.data.count
+        }
       }
     },
     filters: {
       date: function (input) {
         const d = new Date(input)
         const year = d.getFullYear()
-        const month = d.getMonth() + 1
-        const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
-        const hour = d.getHours()
-        const minutes = d.getMinutes()
+        const monthTemp = d.getMonth() + 1
+        const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+        const hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours() + ' '
+        const minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes() + ' '
+        const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
         return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes
       }
     },
     methods: {
       listenPage: function (changedPage) {
         this.nowPage = changedPage
-        this.$emit('childEvent', this.nowPage)
+        this.$emit('pageEvent', this.nowPage)
       }
+//      loadPageNews: function () {
+//        this.$http.get('/api/news/created', {params: { page: this.nowPage, pageSize: this.pageSize }})
+//          .then(response => {
+//            this.new = response
+//          })
+//      }
     }
   }
 
 </script>
 
-<style>
+<style scoped>
   .news-content{
     padding-left: 0;
     float: right;
     width: 75%;
-    margin-top: 10px;
+    padding-bottom: 15px;
+  }
+  .news-content .news{
+    margin-bottom: 15px;
   }
   .news-content h4{
     border-bottom: #e8e8e8 1px solid;
     line-height: 40px;
-    font-size: 18px!important;
     margin: 0;
+    font-weight: normal;
+    font-size: 18px;
   }
   .news-content h4 span.label{
     font-size: 12px;
@@ -129,6 +148,10 @@
     color: #323232;
     font-weight: normal;
   }
+  .news .new h5 a:hover {
+   color: #5078cb;
+    text-decoration: underline !important;
+  }
   .news-list >p{
     line-height: 25px;
   }

+ 10 - 2
components/provider/Carousel.vue

@@ -7,8 +7,8 @@
         </div>
       </div>
       <div class="swiper-pagination swiper-pagination-bullets"></div>
-      <div class="swiper-button-prev"></div>
-      <div class="swiper-button-next"></div>
+      <div class="swiper-button-prev"><i class="iconfont icon-arrow-left"></i></div>
+      <div class="swiper-button-next"><i class="iconfont icon-arrow-right"></i></div>
     </div>
   </div>
 </template>
@@ -30,8 +30,16 @@
           prevButton: '.swiper-button-prev',
           nextButton: '.swiper-button-next'
         }
+    //    banners: {}
       }
     },
+//    mounted () {
+//      this.$http.get('/api/carousel/home%20page%20banner')
+//      .then(response => {
+//        this.banners = response.data
+//        this.x++
+//      })
+//    }
     computed: {
       banners () {
         return this.$store.state.carousel.banners.data

+ 7 - 23
pages/news/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="container news-container">
     <left></left>
-    <right v-on:childEvent="listenChild"></right>
+    <right @pageEvent="listenChild"></right>
   </div>
 </template>
 
@@ -17,8 +17,8 @@
     },
     fetch ({ store }) {
       return Promise.all([
-        store.dispatch('loadAllNews', { page: this.nowPage, pageSize: this.pageSize }),
-        store.dispatch('loadHotNews')
+        store.dispatch('newsData/loadAllNews', { page: this.nowPage, pageSize: this.pageSize }),
+        store.dispatch('newsData/loadHotNews')
       ])
     },
     components: {
@@ -28,34 +28,18 @@
     methods: {
       listenChild: function (nPage) {
         this.nowPage = nPage
-        this.$store.dispatch('loadAllNews', { page: this.nowPage, pageSize: this.pageSize })
+        this.$store.dispatch('newsData/loadAllNews', { page: this.nowPage, pageSize: this.pageSize })
       }
     }
 
   }
 </script>
 
-<style>
-  .clearfix, .nav-list{
+<style scoped>
+  body{
     font-size: 14px!important;
   }
-  .footer .item{
-    margin-top: 20px;
-  }
-  .navbar{
-    height: 36px!important;
-    min-height: 36px!important;
-  }
   .news-container{
-    font: 100%/1.2 verdana, "Microsoft YaHei", '宋体', serif;
+    margin-top: 15px;
   }
-  .news-container a:hover{
-    text-decoration: underline;
-  }
-
-  div{
-    display: block;
-  }
-
-
 </style>

+ 13 - 12
pages/provider/factories.vue

@@ -2,11 +2,11 @@
   <!-- 组件模板只能包含一个根元素,除非使用v-if 和 v-if-else -->
   <div>
     <!-- 轮播及店铺推荐 -->
-    <recommend-store/>
+    <recommend-store :isOriginal="true" :types="types"/>
 
     <recommend-original/>
 
-    <suppliers :op="'findByOriginal'"/>
+    <suppliers :types="'ORIGINAL_FACTORY'"/>
   </div>
 </template>
 <script>
@@ -14,15 +14,15 @@ import { RecommendStore, RecommendOriginal, Suppliers } from '~components/provid
 
 export default {
   layout: 'main',
-  fetch ({ store }) {
-    return Promise.all([
-      store.dispatch('loadBanners'),
-      store.dispatch('provider/loadSalesStore', { isOriginal: true }),
-      store.dispatch('provider/loadNewStores', { types: 'ORIGINAL_FACTORY' }),
-      store.dispatch('provider/loadRecommendOriginal'),
-      store.dispatch('provider/findStoreList', { op: 'findByOriginal' })
-    ])
-  },
+//  fetch ({ store }) {
+//    return Promise.all([
+//      store.dispatch('loadBanners'),
+//      store.dispatch('provider/loadSalesStore', { isOriginal: true }),
+//      store.dispatch('provider/loadNewStores', { types: 'ORIGINAL_FACTORY' }),
+//      store.dispatch('provider/loadRecommendOriginal'),
+//      store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' })
+//    ])
+//  },
   components: {
     RecommendStore,
     RecommendOriginal,
@@ -30,7 +30,8 @@ export default {
   },
   data () {
     return {
-      msg: 'hello vue'
+      msg: 'hello vue',
+      types: 'ORIGINAL_FACTORY'
     }
   }
 }

+ 36 - 0
store/newsData.js

@@ -0,0 +1,36 @@
+import axios from '~plugins/axios'
+
+export const actions = {
+// 获取快讯页新闻
+  loadAllNews ({ commit }, params = {}) {
+    commit('newsPage/REQUEST_ALLNEWS')
+    return axios.get('/api/news/created', {params})
+      .then(response => {
+        commit('newsPage/GET_ALLNEWS_SUCCESS', response.data)
+      }, err => {
+        commit('newsPage/GET_ALLNEWS_FAILURE', err)
+      })
+  },
+  // 获取详细新闻
+  loadDetailNews ({ commit }, params = {}) {
+    let id = params.id
+    commit('detailNews/REQUEST_DETAILNEWS', params)
+    return axios.get(`/api/news/${id}`)
+      .then(response => {
+        commit('detailNews/GET_DETAILNEWS_SUCCESS', response.data)
+      }, err => {
+        commit('detailNews/GET_DETAILNEWS_FAILURE', err)
+      })
+  },
+  // 获取热点新闻
+  loadHotNews ({ commit }, params = {}) {
+    commit('hotNews/REQUEST_HOTNEWS')
+    return axios.get('/api/news/viewCount', {params})
+      .then(response => {
+        commit('hotNews/GET_HOTNEWS_SUCCESS', response.data)
+      }, err => {
+        commit('hotNews/GET_HOTNEWS_FAILURE', err)
+      })
+  }
+}
+

+ 20 - 0
store/newsData/detailNews.js

@@ -0,0 +1,20 @@
+export const state = () => ({
+  detailNews: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_DETAILNEWS (state) {
+    state.detailNews.fetching = true
+  },
+  GET_DETAILNEWS_FAILURE (state) {
+    state.detailNews.fetching = false
+  },
+  GET_DETAILNEWS_SUCCESS (state, result) {
+    state.detailNews.fetching = false
+    state.detailNews.data = result
+  }
+}
+

+ 19 - 0
store/newsData/hotNews.js

@@ -0,0 +1,19 @@
+export const state = () => ({
+  hotNews: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_HOTNEWS (state) {
+    state.hotNews.fetching = true
+  },
+  GET_HOTNEWS_FAILURE (state) {
+    state.hotNews.fetching = false
+  },
+  GET_HOTNEWS_SUCCESS (state, result) {
+    state.hotNews.fetching = false
+    state.hotNews.data = result.content
+  }
+}

+ 19 - 0
store/newsData/newsPage.js

@@ -0,0 +1,19 @@
+export const state = () => ({
+  allNews: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_ALLNEWS (state) {
+    state.allNews.fetching = true
+  },
+  GET_ALLNEWS_FAILURE (state) {
+    state.allNews.fetching = false
+  },
+  GET_ALLNEWS_SUCCESS (state, result) {
+    state.allNews.fetching = false
+    state.allNews.data = result
+  }
+}

+ 56 - 0
store/product/kind.js

@@ -2,6 +2,22 @@ export const state = () => ({
   kinds: {
     fetching: false,
     data: []
+  },
+  kindsParentWithBother: {
+    fetching: false,
+    data: []
+  },
+  children: {
+    fetching: false,
+    data: []
+  },
+  kindProperty: {
+    fetching: false,
+    data: []
+  },
+  brands: {
+    fetching: false,
+    data: []
   }
 })
 
@@ -40,5 +56,45 @@ export const mutations = {
         kind.children = action.result
       }
     }
+  },
+  REQUEST_KINDPARENTSWITHBOTHERS (state) {
+    state.kindsParentWithBother.fetching = true
+  },
+  GET_KINDPARENTSWITHBOTHERS_SUCCESS (state, result) {
+    state.kindsParentWithBother.fetching = false
+    state.kindsParentWithBother.data = result
+  },
+  GET_KINDPARENTSWITHBOTHERS_FAILURE (state) {
+    state.kindsParentWithBother.fetching = false
+  },
+  REQUEST_CHILDREN (state) {
+    state.children.fetching = true
+  },
+  GET_CHILDREN_SUCCESS (state, result) {
+    state.children.fetching = false
+    state.children.data = result
+  },
+  GET_CHILDREN_FAILURE (state) {
+    state.children.fetching = false
+  },
+  REQUEST_KINDPROPERTY (state) {
+    state.kindProperty.fetching = true
+  },
+  GET_KINDPROPERTY_SUCCESS (state, result) {
+    state.kindProperty.fetching = false
+    state.kindProperty.data = result
+  },
+  GET_KINDPROPERTY_FAILURE (state) {
+    state.kindProperty.fetching = false
+  },
+  REQUEST_KINDBRANDS (state) {
+    state.brands.fetching = true
+  },
+  GET_KINDBRANDS_SUCCESS (state, result) {
+    state.brands.fetching = false
+    state.brands.data = result
+  },
+  GET_KINDBRANDS_FAILURE (state) {
+    state.brands.fetching = false
   }
 }

+ 0 - 1
store/provider/storeCms.js

@@ -61,7 +61,6 @@ export const mutations = {
   GET_RECOMMEND_STORE_SUCCESS (state, result) {
     state.recommendStore.fetching = false
     state.recommendStore.data = result
-    console.log('Recommend Store', result.length)
   },
   REQUEST_HOT_COMPONENTS (state) {
     state.hotComponents.fetching = true

+ 106 - 0
store/shop/storeInfo.js

@@ -0,0 +1,106 @@
+/**
+ * 店铺状态信息
+ */
+export const state = () => ({
+  store: {
+    fetching: false,
+    data: {}
+  },
+  commodity: {
+    fetching: false,
+    data: {}
+  },
+  component: {
+    fetching: false,
+    data: {}
+  },
+  storeCommodity: {
+    fetching: false,
+    data: {}
+  },
+  saveHistory: {
+    fetching: false,
+    data: {}
+  },
+  focus: {
+    fetching: false,
+    data: {}
+  },
+  focusList: {
+    fetching: false,
+    data: {}
+  }
+})
+
+export const mutations = {
+  REQUEST_STORE_INFO (state) {
+    state.store.fetching = true
+  },
+  GET_STORE_INFO_FAILURE (state) {
+    state.store.fetching = false
+  },
+  GET_STORE_INFO_SUCCESS (state, result = {}) {
+    state.store.fetching = false
+    state.store.data = result
+  },
+  REQUEST_COMMODITY (state) {
+    state.commodity.fetching = true
+  },
+  GET_COMMODITY_FAILURE (state) {
+    state.commodity.fetching = false
+  },
+  GET_COMMODITY_SUCCESS (state, result = {}) {
+    state.commodity.fetching = false
+    state.commodity.data = result
+  },
+  REQUEST_COMPONENT (state) {
+    state.component.fetching = true
+  },
+  GET_COMPONENT_FAILURE (state) {
+    state.component.fetching = false
+  },
+  GET_COMPONENT_SUCCESS (state, result = {}) {
+    state.component.fetching = false
+    state.component.data = result
+  },
+  REQUEST_STORE_COMMODITY (state) {
+    state.storeCommodity.fetching = true
+  },
+  GET_STORE_COMMODITY_FAILURE (state) {
+    state.storeCommodity.fetching = false
+  },
+  GET_STORE_COMMODITY_SUCCESS (state, result = {}) {
+    state.storeCommodity.fetching = false
+    state.storeCommodity.data = result
+  },
+  REQUEST_SAVEHISOTRY (state) {
+    state.saveHistory.fetching = true
+  },
+  GET_SAVEHISOTRY_FAILURE (state) {
+    state.saveHistory.fetching = false
+  },
+  GET_SAVEHISOTRY_SUCCESS (state, result) {
+    state.saveHistory.fetching = false
+    state.saveHistory.data = result
+  },
+  REQUEST_FOCUS (state) {
+    state.focus.fetching = true
+  },
+  GET_FOCUS_FAILURE (state) {
+    state.focus.fetching = false
+  },
+  GET_FOCUS_SUCCESS (state, result) {
+    state.focus.fetching = false
+    state.focus.data = result
+  },
+  REQUEST_FOCUSLIST (state) {
+    state.focusList.fetching = true
+  },
+  GET_FOCUSLIST_FAILURE (state) {
+    state.focusList.fetching = false
+  },
+  GET_FOCUSLIST_SUCCESS (state, result) {
+    state.focusList.fetching = false
+    state.focusList.data = result
+  }
+}