Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	components/provider/HotCommodity.vue
#	components/store/CommodityList.vue
hangb 8 gadi atpakaļ
vecāks
revīzija
05e7da8365
45 mainītis faili ar 742 papildinājumiem un 475 dzēšanām
  1. 2 1
      components/common/image-upload/imageUpload.vue
  2. 2 0
      components/common/page/pageComponent.vue
  3. 18 7
      components/default/RightBar.vue
  4. 23 6
      components/help/left.vue
  5. 14 5
      components/home/Carousel.vue
  6. 20 6
      components/home/KindCategory.vue
  7. 20 5
      components/home/News.vue
  8. 14 4
      components/home/floor/FloorList.vue
  9. 18 4
      components/news/Detail.vue
  10. 18 4
      components/news/Left.vue
  11. 21 7
      components/news/Right.vue
  12. 2 1
      components/product/CategoryNav.vue
  13. 5 4
      components/product/ComponentGoods.vue
  14. 1 0
      components/product/brand/BrandComponent.vue
  15. 1 0
      components/product/brand/CategoriesList.vue
  16. 1 0
      components/product/component/ComponentDetail.vue
  17. 36 7
      components/product/original/OriginalDetail.vue
  18. 59 60
      components/provider/HotCommodity.vue
  19. 2 1
      components/provider/Suppliers.vue
  20. 12 1
      components/store/BaseInfo.vue
  21. 2 1
      components/store/CommodityList.vue
  22. 1 1
      components/store/ComponentInfo.vue
  23. 16 0
      components/store/RecommendProduct.vue
  24. 6 1
      components/store/common/StoreHeader.vue
  25. 21 11
      nuxt.config.js
  26. 2 1
      package.json
  27. 28 9
      pages/help/helpDetail/_id.vue
  28. 45 12
      pages/help/helpList/_id.vue
  29. 16 4
      pages/help/home.vue
  30. 8 4
      pages/index.vue
  31. 6 6
      pages/news/_id.vue
  32. 19 19
      pages/news/index.vue
  33. 0 1
      pages/product/original.vue
  34. 1 1
      pages/provider/home.vue
  35. 2 0
      pages/search/_keyword.vue
  36. 2 3
      pages/store/_uuid/index.vue
  37. 18 18
      store/floor.js
  38. 65 65
      store/index.js
  39. 33 33
      store/news.js
  40. 36 36
      store/newsData.js
  41. 20 20
      store/newsData/detailNews.js
  42. 19 19
      store/newsData/hotNews.js
  43. 19 19
      store/newsData/newsPage.js
  44. 39 39
      store/product/kind.js
  45. 29 29
      store/provider.js

+ 2 - 1
components/common/image-upload/imageUpload.vue

@@ -41,7 +41,8 @@
     }
   }
 </script>
-<style>
+<style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
   input[type="file"] {
     display: none;
   }

+ 2 - 0
components/common/page/pageComponent.vue

@@ -44,6 +44,8 @@
 </script>
 
 <style>
+  @import "~font-awesome/css/font-awesome.css";
+  @import "~element-ui/lib/theme-default/index.css";
   a {
     color: #2d8cf0;
     background: 0 0;

+ 18 - 7
components/default/RightBar.vue

@@ -36,13 +36,13 @@
       </ul>
       <ul class="right-bar-bottom">
         <li class="right-bar-item" @mouseenter="loadHistorys()">
-          <a href="http://www.usoftmall.com/user#/browsingHistory" class="title" target="_blank">
+          <a @click="goHistory" class="title" target="_blank">
             <i class="iconfont icon-zuji icon-xlg"></i>
           </a>
-          <div class="sidebar-menu" v-if="!user.logged"><a href="/user#/browsingHistory" title="浏览记录" target="_blank">浏览记录</a></div>
+          <div class="sidebar-menu" v-if="!user.logged"><a @click="goHistory" title="浏览记录" target="_blank">浏览记录</a></div>
           <div class="sidebar-menu" v-if="user.logged && listMe(history).length == 0"><a href="/user#/browsingHistory" title="浏览记录" target="_blank">浏览记录</a></div>
           <div class="foot-record sidebar-menu" v-if="user.logged && listMe(history).length > 0">
-            <h3><a href="">浏览历史</a></h3>
+            <h3><a>浏览历史</a></h3>
             <dl>
               <dd v-for="item in listMe(history)">
                   <a :href="'/store/' + item.storeid + '/' + item.batchCode" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>
@@ -72,7 +72,6 @@
   </div>
 </template>
 <script>
-  import axios from '~/plugins/axios'
   import { scrollTo } from '~utils/scroll'
   import MessageBoard from '~components/messageBoard/MessageBoard.vue'
   export default {
@@ -150,6 +149,17 @@
         this.$store.dispatch('user/deleteHistory', {id: id})
         this.$store.dispatch('user/loadHistory')
       },
+      goHistory: function () {
+        if (!this.user.logged) {
+          this.$http.get('/login/page').then(response => {
+            if (response.data) {
+              this.$router.push('/auth/login')
+            }
+          })
+        } else {
+          window.location.href = '/user#/browsingHistory'
+        }
+      },
       goCart: function () {
         if (!this.user.logged) {
           this.$http.get('/login/page').then(response => {
@@ -174,14 +184,14 @@
           // 获得窗口的水平位置
           let iLeft = (window.screen.availWidth - 10 - 1030) / 2
           let newTab = window.open('', '即时对话框', 'height=600, width=1030, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
-          axios.get('/basic/enterprise/' + this.enterprise.uu + '/info')
+          this.$http.get('/basic/enterprise/' + this.enterprise.uu + '/info')
             .then(response => {
               let obj = {}
               obj.enUU = response.data.uu
               obj.enterprise = {enUU: response.data.uu, name: response.data.enName}
               obj.type = 'LIST'
               obj.userPhone = this.user.data.userTel
-              axios.post('http://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
+              this.$http.post('http://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
                 .then(response => {
                   if (response.data.success) {
                     newTab.location.href = 'http://im.ubtob.com/chat/visit?gid=' + response.data.content
@@ -194,7 +204,7 @@
       },
       getChatCount: function () {
         if (this.user.logged) {
-          axios.get('http://im.ubtob.com/api/chat/message', {params: {enUU: this.enterprise.uu, operate: 'count_unread', phone: this.user.data.userTel}})
+          this.$http.get('http://im.ubtob.com/api/chat/message', {params: {enUU: this.enterprise.uu, operate: 'count_unread', phone: this.user.data.userTel}})
             .then(response => {
               this.chatCount = response.data.count
             })
@@ -204,6 +214,7 @@
   }
 </script>
 <style lang="scss" scoped>
+  @import "~element-ui/lib/theme-default/index.css";
   /*查看*/
   #image-box .x-floating-wrap {
     position: fixed;

+ 23 - 6
components/help/left.vue

@@ -22,7 +22,7 @@
       let value2 = object2[propertyName]
       if (value1 > value2) {
         return 1
-      } else if (value1 < value2) {
+      } else if (value1 > value2) {
         return -1
       } else {
         return 0
@@ -36,13 +36,29 @@
         defaultProps: {
           children: 'children',
           label: 'item'
-        }
+        },
+        getFlag: true,
+        helps: {}
       }
     },
+    mounted () {
+      this.$http.get('/api/help-service/helps', {params: { parentId: 0 }})
+        .then(response => {
+          console.log(response.data)
+          this.helps = response.data.sort(compare('detno'))
+         // let help = this.helps
+
+          for (let i; i < this.helps.length; i++) {
+            this.helps[i] = this.helps[i].children.sort(compare('detno'))
+          }
+          console.log(this.helps)
+        })
+      this.getFlag = false
+    },
     computed: {
-      helps () {
-        return this.$store.state.help.snapsho.data.sort(compare('detno'))
-      }
+//      helps () {
+//        return this.$store.state.help.snapsho.data.sort(compare('detno'))
+//      }
     },
     methods: {
       openList (data) {
@@ -53,7 +69,8 @@
     }
   }
 </script>
-<style>
+<style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
    .el-tree{
     border: none;
      min-height: 300px;

+ 14 - 5
components/home/Carousel.vue

@@ -40,15 +40,24 @@
             document.querySelector('.carousel').style.backgroundColor =
               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 () {
-        return this.$store.state.carousel.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
+        }
       }
     }
   }

+ 20 - 6
components/home/KindCategory.vue

@@ -49,7 +49,8 @@
     name: 'kind-category',
     data () {
       return {
-        activeKindId: 0
+        activeKindId: 0,
+        kinds: {}
       }
     },
     methods: {
@@ -65,13 +66,21 @@
         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
-      },
+//      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)
+        }
       }
     }
   }
@@ -139,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%;

+ 20 - 5
components/home/News.vue

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

+ 14 - 4
components/home/floor/FloorList.vue

@@ -9,18 +9,28 @@
 <script>
   import Floor from './Floor.vue'
   import FloorBar from './FloorBar.vue'
-
   export default {
     name: 'floor-list',
     components: {
       Floor,
       FloorBar
     },
-    computed: {
-      floors () {
-        return this.$store.state.floor.list
+    data () {
+      return {
+        floors: {}
       }
+    },
+    mounted () {
+      this.$http.get('/api/floors/home')
+        .then(response => {
+          this.floors = response
+        })
     }
+//    computed: {
+//      floors () {
+//        return this.$store.state.floor.list
+//      }
+//    }
   }
 </script>
 <style lang="scss" scoped>

+ 18 - 4
components/news/Detail.vue

@@ -12,14 +12,28 @@
     </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: {
-      new () {
-        return this.$store.state.newsData.detailNews.detailNews
-      },
+//      new () {
+//        return this.$store.state.newsData.detailNews.detailNews
+//      },
       item () {
-        return this.new.data
+        if (this.new.data) {
+          return this.new.data
+        }
       }
     },
     filters: {

+ 18 - 4
components/news/Left.vue

@@ -27,12 +27,26 @@
 </template>
 <script>
   export default {
+    data () {
+      return {
+        new: {}
+      }
+    },
+    mounted () {
+      this.$http.get('/api/news/viewCount')
+        .then(response => {
+          this.new = response
+        })
+    },
     computed: {
-      new () {
-        return this.$store.state.newsData.hotNews.hotNews
-      },
+//      new () {
+//        return this.$store.state.newsData.hotNews.hotNews
+//      },
       news_show () {
-        return this.new.data
+     //   console.log(this.new.data)
+        if (this.new.data) {
+          return this.new.data.content
+        }
       }
     },
     filters: {

+ 21 - 7
components/news/Right.vue

@@ -31,21 +31,29 @@
     data () {
       return {
         pageSize: 10,
-        nowPage: 1
+        nowPage: 1,
+        new: {}
       }
     },
     components: {
       Page
     },
+    mounted () {
+      this.loadPageNews()
+    },
     computed: {
-      new () {
-        return this.$store.state.newsData.newsPage.allNews
-      },
+//      new () {
+//        return this.$store.state.newsData.newsPage.allNews
+//      },
       news_show () {
-        return this.new.data.content
+        if (this.new.data) {
+          return this.new.data.content
+        }
       },
       totalCount () {
-        return this.new.data.count
+        if (this.new.data) {
+          return this.new.data.count
+        }
       }
     },
     filters: {
@@ -63,7 +71,13 @@
     methods: {
       listenPage: function (changedPage) {
         this.nowPage = changedPage
-        this.$emit('childEvent', this.nowPage)
+        this.loadPageNews()
+      },
+      loadPageNews: function () {
+        this.$http.get('/api/news/created', {params: { page: this.nowPage, pageSize: this.pageSize }})
+          .then(response => {
+            this.new = response
+          })
       }
     }
   }

+ 2 - 1
components/product/CategoryNav.vue

@@ -30,7 +30,8 @@
   }
 </script>
 
-<style>
+<style scoped>
+  @import "~element-ui/lib/theme-default/breadcrumb.css";
   /* breadcrumbs */
   .breadcrumbs {
     margin-top: 20px;

+ 5 - 4
components/product/ComponentGoods.vue

@@ -24,12 +24,12 @@
       <tr v-for="compGoods in componentGoods.content">
         <td>
           <!--store/{{compGoods.storeId}}#/batchInfo/{{compGoods.batchCode}}-->
-          <a v-if="compGoods.batchCode" href="#">
+          <nuxt-link v-if="compGoods.batchCode" :to="`/product/component/${compGoods.uuid}`">
             <img :src="compGoods.img || '/images/all/default.png'"/>
-          </a>
+          </nuxt-link>
           <img v-if="!compGoods.batchCode" :src="compGoods.img || '/images/all/default.png'"/>
           <!--store/{{compGoods.storeId}}#/home-->
-          <a href="#" class="contact" :title="compGoods.storeName">{{compGoods.storeName}}</a>
+          <nuxt-link :to="'/store/' + compGoods.storeId" class="contact" :title="compGoods.storeName">{{compGoods.storeName}}</nuxt-link>
         </td>
         <td class="brand-code">
           <div class="brand"><nuxt-link :to="`/product/brand/${compGoods.brand.uuid}/`" title="compGoods.brand.nameEn">{{compGoods.brand.nameEn}}</nuxt-link></div>
@@ -173,7 +173,8 @@
   }
 </script>
 
-<style>
+<style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
   .product-list{
     width: 1190px;
     margin-bottom: 20px;

+ 1 - 0
components/product/brand/BrandComponent.vue

@@ -98,6 +98,7 @@
   }
 </script>
 <style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
   .component-list {
     float: left;
     margin-left: 20px;

+ 1 - 0
components/product/brand/CategoriesList.vue

@@ -114,6 +114,7 @@
   }
 </script>
 <style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
   /*  产品分类调整*/
   .el-tree {
     border: none;

+ 1 - 0
components/product/component/ComponentDetail.vue

@@ -132,6 +132,7 @@
   }
 </script>
 <style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
   .header-text {
     text-align: center;
     font-size: 20px;

+ 36 - 7
components/product/original/OriginalDetail.vue

@@ -52,24 +52,53 @@
   </div>
 </template>
 <script>
+  import axios from '~plugins/axios'
   export default {
     name: 'OriginalDetail',
+    data () {
+      return {
+        lists: {}
+      }
+    },
+    mounted () {
+      axios.get('/api/commodity/latest', {params: { length: 17 }})
+        .then(response => {
+          this.lists = response
+        })
+    },
     computed: {
-      lists () {
-        return this.$store.state.original.hot
-      },
+//      lists () {
+//        return this.$store.state.original.hot
+//      },
       list1 () {
-        return this.lists.data.slice(0, 3)
+        if (this.lists.data) {
+          return this.lists.data.slice(0, 3)
+        }
       },
       list2 () {
-        return this.lists.data.slice(3, 8)
+        if (this.lists.data) {
+          return this.lists.data.slice(3, 8)
+        }
       },
       list3 () {
-        return this.lists.data.slice(8, 11)
+        if (this.lists.data) {
+          return this.lists.data.slice(8, 11)
+        }
       },
       list4 () {
-        return this.lists.data.slice(11, 16)
+        if (this.lists.data) {
+          return this.lists.data.slice(11, 16)
+        }
       }
+//      list2 () {
+//        return this.lists.data.slice(3, 8)
+//      },
+//      list3 () {
+//        return this.lists.data.slice(8, 11)
+//      },
+//      list4 () {
+//        return this.lists.data.slice(11, 16)
+//      }
     }
   }
 </script>

+ 59 - 60
components/provider/HotCommodity.vue

@@ -12,26 +12,25 @@
   </div>
 </template>
 <script>
-
-export default {
-  data () {
-    return {
-      hotComponents: {}
+  export default {
+    name: 'hot-commodity',
+    data () {
+      return {
+        hotComponents: {}
+      }
+    },
+    mounted () {
+      this.$http.get('/api/cms-service/storeCms/inventory')
+        .then(response => {
+          this.hotComponents = response.data
+        })
+    },
+    computed: {
+      // hotComponents () {
+      // return this.$store.state.provider.storeCms.hotComponents.data
+      // }
     }
-  },
-  name: 'hot-commodity',
-  mounted () {
-    this.$http.get('/api/cms-service/storeCms/inventory')
-//      .then(response => {
-//        this.hotComponents = response.data
-//      })
-  },
-  computed: {
-//    hotComponents () {
-//      return this.$store.state.provider.storeCms.hotComponents.data
-//    }
   }
-}
 </script>
 <style scoped>
   .hot-commodity {
@@ -47,50 +46,50 @@ export default {
   }
 
   .hot-commodity .hot-commodity-box {
-		width: 238px;
-		height: 239px;
-		border-top: 1px solid #D6D3CE;
-		border-left: 1px solid #D6D3CE;
-		overflow: hidden;
-	}
+    width: 238px;
+    height: 239px;
+    border-top: 1px solid #D6D3CE;
+    border-left: 1px solid #D6D3CE;
+    overflow: hidden;
+  }
 
-	.hot-commodity > ul > li {
-		/*float: left;*/
-	}
-	.hot-commodity > ul > li:hover{
-		border: #5078cb 1px solid;
-	}
-	.hot-commodity > ul > li:hover span{
-		color: #5078cb;
-		font-weight: bold;
-	}
-	.hot-commodity > ul > li:hover img{
-		transform: scale(1.1);
-	}
-	.hot-commodity ul {
-		border-bottom: 1px solid #D6D3CE;
-		font-size: 0px;
-	}
+  .hot-commodity > ul > li {
+    /*float: left;*/
+  }
+  .hot-commodity > ul > li:hover{
+    border: #5078cb 1px solid;
+  }
+  .hot-commodity > ul > li:hover span{
+    color: #5078cb;
+    font-weight: bold;
+  }
+  .hot-commodity > ul > li:hover img{
+    transform: scale(1.1);
+  }
+  .hot-commodity ul {
+    border-bottom: 1px solid #D6D3CE;
+    font-size: 0px;
+  }
 
-	.hot-commodity-box img {
-		width: 238px;
-		height: 180px;
-		margin-top: 10px;
-	}
+  .hot-commodity-box img {
+    width: 238px;
+    height: 180px;
+    margin-top: 10px;
+  }
 
-	.hot-commodity-box span {
-		font-size: 14px;
-		font-family: "Microsoft Yahei", "微软雅黑";
-		color: #333434;
-		text-align: center;
-		display: inline-block;
-		width: 100%;
-		height: 30px;
-		line-height: 30px;
-		margin-top: 12px;
-	}
+  .hot-commodity-box span {
+    font-size: 14px;
+    font-family: "Microsoft Yahei", "微软雅黑";
+    color: #333434;
+    text-align: center;
+    display: inline-block;
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    margin-top: 12px;
+  }
 
-	.hot-commodity .border-right {
-		border-right: 1px solid #D6D3CE;
-	}
+  .hot-commodity .border-right {
+    border-right: 1px solid #D6D3CE;
+  }
 </style>

+ 2 - 1
components/provider/Suppliers.vue

@@ -136,7 +136,8 @@ export default {
   }
 }
 </script>
-<style>
+<style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
   .el-pagination .el-pager li.active{
     background-color: #5078cb;
     border-color: #337ab7;

+ 12 - 1
components/store/BaseInfo.vue

@@ -81,9 +81,20 @@ function isPdf (path) {
     return false
   }
 }
-
+// import axios from '~plugins/axios'
 export default {
   name: 'base-info',
+//  data () {
+//    return {
+//      storeInfo: {}
+//    }
+//  },
+//  mounted () {
+//    axios.get('/api/store-service/stores', {params: {StoreUuid: this.$route.params.uuid}})
+//      .then(response => {
+//        this.storeInfo = response.data
+//      })
+//  },
   computed: {
     storeInfo () {
       return this.$store.state.shop.storeInfo.store.data

+ 2 - 1
components/store/CommodityList.vue

@@ -215,7 +215,8 @@ export default {
   }
 }
 </script>
-<style>
+<style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
 /*  产品分类调整*/
   .category-content .el-tree{
     border: none;

+ 1 - 1
components/store/ComponentInfo.vue

@@ -4,7 +4,7 @@
       <div class="head">
         <span class="tab">产品参数<b class="tip">(仅供参考,以实际产品为准)</b></span>
       </div>
-      <ul class="list-unstyled list-inline" v-if="component.properties">
+      <ul class="list-unstyled list-inline" style="margin-left: 0px;" v-if="component.properties">
         <li v-for="property in component.properties" v-if="property.value">
           <div class="property-name">
             <span v-text="property.property.labelCn"></span>:

+ 16 - 0
components/store/RecommendProduct.vue

@@ -35,6 +35,22 @@
     components: {
       Buy
     },
+//    data () {
+//      return {
+//        commodities: {},
+//        storeInfo: {}
+//      }
+//    },
+//    mounted () {
+//      axios.get('/api/store/recommend/products', {params: {StoreUuid: this.$route.params.uuid}})
+//        .then(response => {
+//          this.commodities = response.data ? JSON.parse(response.data) : []
+//        })
+//      axios.get('/api/store-service/stores', {params: {StoreUuid: this.$route.params.uuid}})
+//        .then(response => {
+//          this.storeInfo = response.data
+//        })
+//    },
     computed: {
       commodities () {
         return this.$store.state.shop.recommend.products.data

+ 6 - 1
components/store/common/StoreHeader.vue

@@ -67,13 +67,13 @@
 </template>
 <script>
 import SearchBox from '~components/main/Search.vue'
-
 export default {
   name: 'store-header',
   data () {
     return {
       isOpen: false,
       dialogVisible: false
+   //   storeInfo: {}
     }
   },
   components: {
@@ -95,6 +95,10 @@ export default {
     this.$nextTick(() => {
       this.loadFocusList()
     })
+//    axios.get('/api/store-service/stores', this.$route.params)
+//      .then(response => {
+//        this.storeInfo = response.data
+//      })
   },
   methods: {
     loadFocusList () {
@@ -125,6 +129,7 @@ export default {
 }
 </script>
 <style scoped>
+  @import "~element-ui/lib/theme-default/index.css";
   body{
 		font-family: "Microsoft Yahei", "微软雅黑";
 	}

+ 21 - 11
nuxt.config.js

@@ -2,6 +2,7 @@ const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://www.usoftmall.com/' : 'http://192.168.253.60:9090/platform-b2c/')
 const webpack = require('webpack')
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
 
 module.exports = {
   router: {
@@ -44,6 +45,18 @@ module.exports = {
         test: /\.js$/,
         loader: 'babel-loader'
       })
+      config.module.rules.push({
+        test: /\.css$/,
+        loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
+      })
+      config.module.rules.push({
+        test: /\.scss$/,
+        loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
+      })
+      config.module.rules.push({
+        test: /\.less$/,
+        loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
+      })
       if (isClient) {
         config.module.rules.push({
           enforce: 'pre',
@@ -72,18 +85,15 @@ module.exports = {
       })
     ]
   },
-  css: [ {
-    src: 'bootstrap/dist/css/bootstrap.css'
-  }, {
+  css: [ {src: 'bootstrap/dist/css/bootstrap.min.css'},
+    /* {
     src: 'font-awesome/css/font-awesome.css'
-  }, {
-    src: '~assets/scss/app.scss',
-    lang: 'scss'
-  }, {
-    src: 'swiper/dist/css/swiper.css'
-  }, {
-    src: 'element-ui/lib/theme-default/index.css'
-  }],
+  }, */{src: '~assets/scss/app.scss', lang: 'scss'}/* , {
+      src: 'swiper/dist/css/swiper.css'
+    } */ /*, {
+      src: 'element-ui/lib/theme-default/index.css'
+    } */
+  ],
   dev: !isProdMode,
   env: {
     baseUrl

+ 2 - 1
package.json

@@ -46,6 +46,7 @@
     "eslint-plugin-standard": "^2.0.1",
     "extract-text-webpack-plugin": "^3.0.0",
     "node-sass": "^4.5.3",
-    "sass-loader": "^6.0.6"
+    "sass-loader": "^6.0.6",
+    "webpack": "^3.2.0"
   }
 }

+ 28 - 9
pages/help/helpDetail/_id.vue

@@ -17,7 +17,7 @@
                 <span>{{helpTitle.item}}</span><i class="fa fa-close"></i></nuxt-link>
                 <i class="dot fa fa-angle-right"></i>
               </span>
-              <nuxt-link :to="`/help/helpList/{$helpDetail.navId}`" class="box" style="font-size: 14px"><span v-text="helpDetail.title"></span><i class="fa fa-close"></i></nuxt-link>
+              <nuxt-link :to="`/help/helpList/${helpTitle.id}`" class="box" style="font-size: 14px"><span v-text="helpDetail.title"></span><i class="fa fa-close"></i></nuxt-link>
             </div>
             <!--文章详情-->
             <div class="help-center-details" style="color: #000">
@@ -35,24 +35,43 @@
   import { left, helpHeader } from '~components/help'
   export default {
     name: 'help',
+    data () {
+      return {
+        helpDetail: {},
+        helpTitle: {}
+      }
+    },
     components: {
       left,
       helpHeader
     },
+    mounted () {
+      let id = this.$route.params.id
+      this.$http.get(`/api/help-service/issues/${id}`)
+        .then(response => {
+          this.helpDetail = response.data
+          let ids = response.data.navId
+          this.$http.get(`/api/help-service/${ids}`)
+            .then(response => {
+              this.helpTitle = response.data
+              console.log(this.helpTitle)
+            })
+        })
+    },
     fetch ({ store, route }) {
       return Promise.all([
-        store.dispatch('loadHelpSnapsho', { parentId: 0 }),
-        store.dispatch('loadHelpDetail', route.params)
+//        store.dispatch('loadHelpSnapsho', { parentId: 0 }),
+//        store.dispatch('loadHelpDetail', route.params)
         // store.dispatch('loadHelpTitle', route)
       ])
     },
     computed: {
-      helpTitle () {
-        return this.$store.state.help.title.data
-      },
-      helpDetail () {
-        return this.$store.state.help.detail.data
-      }
+//      helpTitle () {
+//        return this.$store.state.help.title.data
+//      }
+//      helpDetail () {
+//        return this.$store.state.help.detail.data
+//      }
     }
   }
 </script>

+ 45 - 12
pages/help/helpList/_id.vue

@@ -35,11 +35,12 @@
 </div>
 </template>
 <script>
+  import { left, helpHeader } from '~components/help'
   // 升序
   function compare (propertyName) {
     return function (object1, object2) {
-      var value1 = object1[propertyName]
-      var value2 = object2[propertyName]
+      let value1 = object1[propertyName]
+      let value2 = object2[propertyName]
       if (value1 > value2) {
         return 1
       } else if (value1 < value2) {
@@ -49,27 +50,59 @@
       }
     }
   }
-  import { left, helpHeader } from '~components/help'
   export default {
     name: 'help',
+    data () {
+      return {
+        helpList: {},
+        getFlag: true,
+        helpTitle: {}
+      }
+    },
     components: {
       left,
       helpHeader
     },
+    mounted () {
+      this.$http.get('/api/help-service/issues', {params: { navId: this.$route.params.id }})
+        .then(response => {
+          this.helpList = response.data.sort(compare('detno'))
+        })
+      this.getFlag = false
+      let id = this.$route.params.id
+      this.$http.get(`/api/help-service/${id}`)
+        .then(response => {
+          this.helpTitle = response.data
+        })
+    },
+    updated () {
+      if (this.getFlag) {
+        this.$http.get('/api/help-service/issues', {params: { navId: this.$route.params.id }})
+          .then(response => {
+            this.helpList = response.data.sort(compare('detno'))
+          })
+        this.getFlag = false
+        let id = this.$route.params.id
+        this.$http.get(`/api/help-service/${id}`)
+          .then(response => {
+            this.helpTitle = response.data
+          })
+      }
+    },
     fetch ({ store, route }) {
       return Promise.all([
-        store.dispatch('loadHelpSnapsho', { parentId: 0 }),
-        store.dispatch('loadHelpList', { navId: route.params.id }),
-        store.dispatch('loadHelpTitle', route.params)
+//        store.dispatch('loadHelpSnapsho', { parentId: 0 }),
+//        store.dispatch('loadHelpList', { navId: route.params.id }),
+//        store.dispatch('loadHelpTitle', route.params)
       ])
     },
     computed: {
-      helpTitle () {
-        return this.$store.state.help.title.data
-      },
-      helpList () {
-        return this.$store.state.help.helplist.data.sort(compare('detno'))
-      }
+//      helpTitle () {
+//        return this.$store.state.help.title.data
+//      }
+//      helpList () {
+//        return this.$store.state.help.helplist.data.sort(compare('detno'))
+//      }
     }
   }
 </script>

+ 16 - 4
pages/help/home.vue

@@ -34,19 +34,31 @@
   import { left, helpHeader } from '~components/help'
   export default {
     name: 'help',
+    data () {
+      return {
+        helpNav: {},
+        getFlag: false
+      }
+    },
     components: {
       left,
       helpHeader
     },
+    mounted () {
+      this.$http.get('/api/help-service/helps', {params: { parentId: 0 }})
+        .then(response => {
+          this.helpNav = response.data
+        })
+    },
     fetch ({ store }) {
       return Promise.all([
-        store.dispatch('loadHelpSnapsho', { parentId: 0 })
+//        store.dispatch('loadHelpSnapsho', { parentId: 0 })
       ])
     },
     computed: {
-      helpNav () {
-        return this.$store.state.help.snapsho.data
-      }
+//      helpNav () {
+//        return this.$store.state.help.snapsho.data.sort(compare('detno'))
+//      }
     }
   }
 </script>

+ 8 - 4
pages/index.vue

@@ -17,10 +17,10 @@
     layout: 'main',
     fetch ({ store }) {
       return Promise.all([
-        store.dispatch('loadFloors'),
-        store.dispatch('loadBanners'),
-        store.dispatch('loadProductKinds', { id: 0 }),
-        store.dispatch('loadNewsSnapshot', { page: 1, pageSize: 10 })
+     //   store.dispatch('loadFloors')
+    //    store.dispatch('loadBanners'),
+    //    store.dispatch('loadProductKinds', { id: 0 }),
+    //    store.dispatch('loadNewsSnapshot', { page: 1, pageSize: 10 })
       ])
     },
     components: {
@@ -38,3 +38,7 @@
     }
   }
 </script>
+
+<style scoped>
+  @import "~swiper/dist/css/swiper.css";
+</style>

+ 6 - 6
pages/news/_id.vue

@@ -11,12 +11,12 @@
   import NuxtLink from '../../.nuxt/components/nuxt-link'
   export default {
     layout: 'main',
-    fetch ({store, route}) {
-      return Promise.all([
-        store.dispatch('newsData/loadHotNews'),
-        store.dispatch('newsData/loadDetailNews', {id: route.params.id})
-      ])
-    },
+//    fetch ({store, route}) {
+//      return Promise.all([
+//        store.dispatch('newsData/loadHotNews'),
+//        store.dispatch('newsData/loadDetailNews', {id: route.params.id})
+//      ])
+//    },
     components: {
       NuxtLink,
       Left,

+ 19 - 19
pages/news/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="container news-container">
     <left></left>
-    <right v-on:childEvent="listenChild"></right>
+    <right></right>
   </div>
 </template>
 
@@ -9,28 +9,28 @@
   import { Left, Right } from '~components/news'
   export default {
     layout: 'main',
-    data () {
-      return {
-        pageSize: 10,
-        nowPage: 1
-      }
-    },
-    fetch ({ store }) {
-      return Promise.all([
-        store.dispatch('newsData/loadAllNews', { page: this.nowPage, pageSize: this.pageSize }),
-        store.dispatch('newsData/loadHotNews')
-      ])
-    },
+//    data () {
+//      return {
+//        pageSize: 10,
+//        nowPage: 1
+//      }
+//    },
+//    fetch ({ store }) {
+//      return Promise.all([
+//        store.dispatch('newsData/loadAllNews', { page: this.nowPage, pageSize: this.pageSize }),
+//        store.dispatch('newsData/loadHotNews')
+//      ])
+//    },
     components: {
       Left,
       Right
-    },
-    methods: {
-      listenChild: function (nPage) {
-        this.nowPage = nPage
-        this.$store.dispatch('newsData/loadAllNews', { page: this.nowPage, pageSize: this.pageSize })
-      }
     }
+//    methods: {
+//      listenChild: function (nPage) {
+//        this.nowPage = nPage
+//        this.$store.dispatch('newsData/loadAllNews', { page: this.nowPage, pageSize: this.pageSize })
+//      }
+//    }
 
   }
 </script>

+ 0 - 1
pages/product/original.vue

@@ -18,5 +18,4 @@
   }
 </script>
 <style  scoped>
-
 </style>

+ 1 - 1
pages/provider/home.vue

@@ -34,7 +34,7 @@ export default{
   }
 }
 </script>
-<style>
+<style scoped>
   .container{
     padding:0;
   }

+ 2 - 0
pages/search/_keyword.vue

@@ -178,3 +178,5 @@
   }
 </script>
 
+<style scoped>
+</style>

+ 2 - 3
pages/store/_uuid/index.vue

@@ -5,7 +5,6 @@
   </div>
 </template>
 <script>
-import axios from '~plugins/axios'
 import { CommodityList, RecommendProduct } from '~components/store'
 
 export default {
@@ -23,7 +22,7 @@ export default {
     ])
   },
   async asyncData ({ params }) {
-    let { data } = await axios.get('/api/commodity/components/kinds', { params: { StoreUuid: params.uuid } })
+    let { data } = await this.$http.get('/api/commodity/components/kinds', { params: { StoreUuid: params.uuid } })
     return { kinds: data }
   },
   components: {
@@ -32,7 +31,7 @@ export default {
   }
 }
 </script>
-<style>
+<style scoped>
   #nav_fragment .el-dialog__wrapper .el-dialog--tiny{
     width: 320px !important;
   }

+ 18 - 18
store/floor.js

@@ -1,18 +1,18 @@
-export const state = () => ({
-  list: {
-    fetching: false,
-    data: []
-  }
-})
-export const mutations = {
-  REQUEST_LIST (state) {
-    state.list.fetching = true
-  },
-  GET_LIST_FAILURE (state) {
-    state.list.fetching = false
-  },
-  GET_LIST_SUCCESS (state, result) {
-    state.list.fetching = false
-    state.list.data = result
-  }
-}
+// export const state = () => ({
+//   list: {
+//     fetching: false,
+//     data: []
+//   }
+// })
+// export const mutations = {
+//   REQUEST_LIST (state) {
+//     state.list.fetching = true
+//   },
+//   GET_LIST_FAILURE (state) {
+//     state.list.fetching = false
+//   },
+//   GET_LIST_SUCCESS (state, result) {
+//     state.list.fetching = false
+//     state.list.data = result
+//   }
+// }

+ 65 - 65
store/index.js

@@ -72,15 +72,15 @@ export const actions = {
       })
   },
   // 获取轮播配置
-  loadBanners ({ commit }) {
-    commit('carousel/REQUEST_BANNER')
-    return axios.get('/api/carousel/home%20page%20banner')
-      .then(response => {
-        commit('carousel/GET_BANNER_SUCCESS', response.data)
-      }, err => {
-        commit('carousel/GET_BANNER_FAILURE', err)
-      })
-  },
+  // loadBanners ({ commit }) {
+  //   commit('carousel/REQUEST_BANNER')
+  //   return axios.get('/api/carousel/home%20page%20banner')
+  //     .then(response => {
+  //       commit('carousel/GET_BANNER_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('carousel/GET_BANNER_FAILURE', err)
+  //     })
+  // },
   // 获取子器件类目
   loadProductKinds ({ commit }, params = {}) {
     let id = params.id
@@ -137,15 +137,15 @@ export const actions = {
     commit('search/RESET_KEYWORDS')
   },
   // 热卖推荐页面
-  loadProductHot ({commit}, params = {}) {
-    commit('original/REQUEST_HOT')
-    return axios.get('/api/commodity/latest', {params})
-      .then(response => {
-        commit('original/GET_HOT_SUCCESS', response.data)
-      }, err => {
-        commit('original/GET_HOT_FAILURE', err)
-      })
-  },
+  // loadProductHot ({commit}, params = {}) {
+  //   commit('original/REQUEST_HOT')
+  //   return axios.get('/api/commodity/latest', {params})
+  //     .then(response => {
+  //       commit('original/GET_HOT_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('original/GET_HOT_FAILURE', err)
+  //     })
+  // },
   // 器件详情页面
   // 获得器件详情信息
   loadComponentDetail ({commit}, params = {}) {
@@ -296,55 +296,55 @@ export const actions = {
       }, err => {
         commit('messageBoardInformation/GET_INFORMATION_FAILURE', err)
       })
-  },
+  }
   // 获取帮助中心信息
-  loadHelpSnapsho ({ commit }, params = {}) {
-    commit('help/REQUEST_SNAPSHO')
-    return axios.get('/api/help-service/helps', {params})
-      .then(response => {
-        commit('help/GET_SNAPSHO_SUCCESS', response.data)
-      }, err => {
-        commit('help/GET_SNAPSHO_FAILURE', err)
-      })
-  },
+  // loadHelpSnapsho ({ commit }, params = {}) {
+  //   commit('help/REQUEST_SNAPSHO')
+  //   return axios.get('/api/help-service/helps', {params})
+  //     .then(response => {
+  //       commit('help/GET_SNAPSHO_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('help/GET_SNAPSHO_FAILURE', err)
+  //     })
+  // },
   // 获取帮助中心二级菜单
-  loadHelpList ({ commit }, params = {}) {
-    commit('help/REQUEST_HELPLIST')
-    return axios.get('/api/help-service/issues', {params})
-      .then(response => {
-        commit('help/GET_HELPLIST_SUCCESS', response.data)
-      }, err => {
-        commit('help/GET_HELPLIST_FAILURE', err)
-      })
-  },
+  // loadHelpList ({ commit }, params = {}) {
+  //   commit('help/REQUEST_HELPLIST')
+  //   return axios.get('/api/help-service/issues', {params})
+  //     .then(response => {
+  //       commit('help/GET_HELPLIST_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('help/GET_HELPLIST_FAILURE', err)
+  //     })
+  // },
   // 获取帮助中心名称
-  loadHelpTitle ({ commit }, params = {}) {
-    let id = params.id
-    commit('help/REQUEST_TITLE')
-    return axios.get(`/api/help-service/${id}`, {params})
-      .then(response => {
-        commit('help/GET_TITLE_SUCCESS', response.data)
-      }, err => {
-        commit('help/GET_TITLE_FAILURE', err)
-      })
-  },
+  // loadHelpTitle ({ commit }, params = {}) {
+  //   let id = params.id
+  //   commit('help/REQUEST_TITLE')
+  //   return axios.get(`/api/help-service/${id}`, {params})
+  //     .then(response => {
+  //       commit('help/GET_TITLE_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('help/GET_TITLE_FAILURE', err)
+  //     })
+  // },
   // 获取详情
-  loadHelpDetail ({ commit }, params = {}) {
-    let id = params.id
-    commit('help/REQUEST_DETAIL')
-    return axios.get(`/api/help-service/issues/${id}`, {params})
-      .then(response => {
-        commit('help/GET_DETAIL_SUCCESS', response.data)
-        let id = response.data.navId
-        commit('help/REQUEST_TITLE')
-        return axios.get(`/api/help-service/${id}`)
-          .then(response => {
-            commit('help/GET_TITLE_SUCCESS', response.data)
-          }, err => {
-            commit('help/GET_TITLE_FAILURE', err)
-          })
-      }, err => {
-        commit('help/GET_DETAIL_FAILURE', err)
-      })
-  }
+  // loadHelpDetail ({ commit }, params = {}) {
+  //   let id = params.id
+  //   commit('help/REQUEST_DETAIL')
+  //   return axios.get(`/api/help-service/issues/${id}`, {params})
+  //     .then(response => {
+  //       commit('help/GET_DETAIL_SUCCESS', response.data)
+  //       let id = response.data.navId
+  //       commit('help/REQUEST_TITLE')
+  //       return axios.get(`/api/help-service/${id}`)
+  //         .then(response => {
+  //           commit('help/GET_TITLE_SUCCESS', response.data)
+  //         }, err => {
+  //           commit('help/GET_TITLE_FAILURE', err)
+  //         })
+  //     }, err => {
+  //       commit('help/GET_DETAIL_FAILURE', err)
+  //     })
+  // }
 }

+ 33 - 33
store/news.js

@@ -1,33 +1,33 @@
-export const state = () => ({
-  snapshot: {
-    fetching: false,
-    data: []
-  },
-  detail: {
-    fetching: false,
-    data: []
-  }
-})
-
-export const mutations = {
-  REQUEST_SNAPSHOT (state) {
-    state.snapshot.fetching = true
-  },
-  GET_SNAPSHOT_FAILURE (state) {
-    state.snapshot.fetching = false
-  },
-  GET_SNAPSHOT_SUCCESS (state, result) {
-    state.snapshot.fetching = false
-    state.snapshot.data = result.content
-  },
-  REQUEST_DETAIL (state) {
-    state.detail.fetching = true
-  },
-  GET_DETAIL_FAILURE (state) {
-    state.detail.fetching = false
-  },
-  GET_DETAIL_SUCCESS (state, result) {
-    state.detail.fetching = false
-    state.detail.data = result
-  }
-}
+// export const state = () => ({
+//   snapshot: {
+//     fetching: false,
+//     data: []
+//   },
+//   detail: {
+//     fetching: false,
+//     data: []
+//   }
+// })
+//
+// export const mutations = {
+//   REQUEST_SNAPSHOT (state) {
+//     state.snapshot.fetching = true
+//   },
+//   GET_SNAPSHOT_FAILURE (state) {
+//     state.snapshot.fetching = false
+//   },
+//   GET_SNAPSHOT_SUCCESS (state, result) {
+//     state.snapshot.fetching = false
+//     state.snapshot.data = result.content
+//   },
+//   REQUEST_DETAIL (state) {
+//     state.detail.fetching = true
+//   },
+//   GET_DETAIL_FAILURE (state) {
+//     state.detail.fetching = false
+//   },
+//   GET_DETAIL_SUCCESS (state, result) {
+//     state.detail.fetching = false
+//     state.detail.data = result
+//   }
+// }

+ 36 - 36
store/newsData.js

@@ -1,36 +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)
-      })
-  }
-}
-
+// 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 - 20
store/newsData/detailNews.js

@@ -1,20 +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
-  }
-}
-
+// 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 - 19
store/newsData/hotNews.js

@@ -1,19 +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
-  }
-}
+// 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 - 19
store/newsData/newsPage.js

@@ -1,19 +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
-  }
-}
+// 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
+//   }
+// }

+ 39 - 39
store/product/kind.js

@@ -1,8 +1,8 @@
 export const state = () => ({
-  kinds: {
-    fetching: false,
-    data: []
-  },
+  // kinds: {
+  //   fetching: false,
+  //   data: []
+  // },
   kindsParentWithBother: {
     fetching: false,
     data: []
@@ -22,41 +22,41 @@ export const state = () => ({
 })
 
 export const mutations = {
-  REQUEST_KIND (state, action) {
-    if (!action.id) {
-      state.kinds.fetching = true
-    } else {
-      const kind = state.kinds.data.find(kind => Object.is(kind.id, action.id))
-      if (kind) {
-        kind.fetching = true
-      }
-    }
-  },
-  GET_KIND_FAILURE (state, action) {
-    if (!action.id) {
-      state.kinds.fetching = false
-    } else {
-      const kind = state.kinds.data.find(kind => Object.is(kind.id, action.id))
-      if (kind) {
-        kind.fetching = false
-      }
-    }
-  },
-  GET_KIND_SUCCESS (state, action) {
-    if (!action.id) {
-      state.kinds.fetching = false
-      action.result.forEach(kind => {
-        kind.fetching = false
-      })
-      state.kinds.data = action.result
-    } else {
-      const kind = state.kinds.data.find(kind => Object.is(kind.id, action.id))
-      if (kind) {
-        kind.fetching = false
-        kind.children = action.result
-      }
-    }
-  },
+  // REQUEST_KIND (state, action) {
+  //   if (!action.id) {
+  //     state.kinds.fetching = true
+  //   } else {
+  //     const kind = state.kinds.data.find(kind => Object.is(kind.id, action.id))
+  //     if (kind) {
+  //       kind.fetching = true
+  //     }
+  //   }
+  // },
+  // GET_KIND_FAILURE (state, action) {
+  //   if (!action.id) {
+  //     state.kinds.fetching = false
+  //   } else {
+  //     const kind = state.kinds.data.find(kind => Object.is(kind.id, action.id))
+  //     if (kind) {
+  //       kind.fetching = false
+  //     }
+  //   }
+  // },
+  // GET_KIND_SUCCESS (state, action) {
+  //   if (!action.id) {
+  //     state.kinds.fetching = false
+  //     action.result.forEach(kind => {
+  //       kind.fetching = false
+  //     })
+  //     state.kinds.data = action.result
+  //   } else {
+  //     const kind = state.kinds.data.find(kind => Object.is(kind.id, action.id))
+  //     if (kind) {
+  //       kind.fetching = false
+  //       kind.children = action.result
+  //     }
+  //   }
+  // },
   REQUEST_KINDPARENTSWITHBOTHERS (state) {
     state.kindsParentWithBother.fetching = true
   },

+ 29 - 29
store/provider.js

@@ -75,34 +75,34 @@ export const actions = {
     }, err => {
       commit('storeCms/GET_RECOMMEND_STORE_FAILURE', err)
     })
-  },
-  // 获取优秀商家信息
-  loadRecommendStores ({ commit }) {
-    commit('storeCms/REQUEST_RECOMMEND_STORE')
-    return axios.get('/api/cms-service/storeIn/5')
-      .then(response => {
-        commit('storeCms/GET_RECOMMEND_STORE_SUCCESS', response.data)
-      }, err => {
-        commit('storeCms/GET_RECOMMEND_STORE_FAILURE', err)
-      })
-  },
-  loadHotComponents ({ commit }) {
-    commit('storeCms/REQUEST_HOT_COMPONENTS')
-    return axios.get('/api/cms-service/storeCms/inventory')
-      .then(response => {
-        commit('storeCms/GET_HOT_COMPONENTS_SUCCESS', response.data)
-      }, err => {
-        commit('storeCms/GET_HOT_COMPONENTS_FAILURE', err)
-      })
-  },
-  findStoreList ({ commit }, params = {}) {
-    params.op = 'pageByType'
-    commit('stores/REQUEST_STORE_LIST')
-    return axios.get('/api/store-service/stores', { params })
-      .then(response => {
-        commit('stores/GET_STORE_LIST_SUCCESS', response.data)
-      }, err => {
-        commit('stores/GET_STORE_LIST_FAILURE', err)
-      })
   }
+  // 获取优秀商家信息
+  // loadRecommendStores ({ commit }) {
+  //   commit('storeCms/REQUEST_RECOMMEND_STORE')
+  //   return axios.get('/api/cms-service/storeIn/5')
+  //     .then(response => {
+  //       commit('storeCms/GET_RECOMMEND_STORE_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('storeCms/GET_RECOMMEND_STORE_FAILURE', err)
+  //     })
+  // },
+  // loadHotComponents ({ commit }) {
+  //   commit('storeCms/REQUEST_HOT_COMPONENTS')
+  //   return axios.get('/api/cms-service/storeCms/inventory')
+  //     .then(response => {
+  //       commit('storeCms/GET_HOT_COMPONENTS_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('storeCms/GET_HOT_COMPONENTS_FAILURE', err)
+  //     })
+  // },
+  // findStoreList ({ commit }, params = {}) {
+  //   params.op = 'pageByType'
+  //   commit('stores/REQUEST_STORE_LIST')
+  //   return axios.get('/api/store-service/stores', { params })
+  //     .then(response => {
+  //       commit('stores/GET_STORE_LIST_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('stores/GET_STORE_LIST_FAILURE', err)
+  //     })
+  // }
 }