ソースを参照

原厂专区,品牌推荐,代理经销,库存寄售 数据请求调整

hangb 8 年 前
コミット
550758aaa8

+ 109 - 0
assets/scss/common.scss

@@ -343,4 +343,113 @@ div.el-tree-node__content{
 .dialog .el-dialog__body{
   padding: 0 !important;
 }
+/*查看*/
+.messageBoard .img-item .preview {
+  display: none;
+  position: absolute;
+  top: 27px;
+  right: 16px;
+  z-index: 1000;
+  color: #fff;
+}
+//.messageBoard .img-item .previewImg  i{
+//  display: none;
+//  position: absolute;
+//  top: 27px;
+//  right: 16px;
+//  z-index: 1000;
+//  color: #fff;
+//  margin-right: 34px;
+//}
+.messageBoard .img-item:hover .preview {
+  display: block;
+}
+//.messageBoard .img-item:hover  i {
+//  display: block;
+//
+//}
 
+/*查看大图*/
+//#image-box .x-floating-wrap,.image-box .x-floating-wrap {
+//  position: fixed;
+//  z-index: 99998;
+//  background: #000;
+//  top: 0;
+//  left: 0;
+//  width: 100%;
+//  height: 100%;
+//  opacity: 0.5;
+//}
+//#image-box,.image-box{
+//  display:table; overflow:hidden; margin-left:50px; _position:relative;  width: 1200px;height: 700px;
+//  position: fixed;
+//  top: 50%;
+//  margin-top: -300px;
+//  left: 50%;
+//  margin-left: -600px;
+//  z-index: 2000;
+//}
+//#image-box .x-floating,.image-box .x-floating {
+//  vertical-align:middle !important;
+//  display:table-cell;
+//  text-align:center;
+//  _position:absolute;
+//  _top:50%; _left:50%;
+//  top: inherit !important;
+//  left: inherit !important;
+//}
+//#image-box .x-floating img ,.image-box .x-floating img {
+//  margin: auto auto;
+//  max-width: 970px !important;
+//  max-height: 600px !important;
+//  -webkit-user-select: none;
+//  -moz-user-select: none;
+//  -ms-user-select: none;
+//  user-select: none;
+//}
+//#image-box .x-floating-wrap,.image-box .x-floating-wrap{
+//  z-index: 1000000 !important;
+//}
+//#item-content{
+//  color:#fff; display:inline-block; _position:relative; _top:-50%; _left:-50%;
+//  position: relative;
+//  z-index: 10000000;
+//}
+//#item-content div.x-close-wrap{
+//  position: absolute;
+//  right: -15px;
+//  line-height: 30px;
+//  top: -13px;
+//  color: #fff;
+//  width: 35px;
+//  height: 35px;
+//  background: rgba(0, 0, 0, 0.5);
+//  border-radius: 100%;
+//  opacity: 1;
+//  margin: 0;
+//  z-index: 100000;
+//  min-height: initial;
+//  text-align: center;
+//}
+//#item-content div.x-close-wrap a{
+//  position: relative;
+//  left: 0;
+//  bottom: 0;
+//  font-size: 34px;
+//  color: #fff;
+//}
+//#item-content div.x-close-wrap a:hover{
+//  color: #fff !important;
+//}
+//#item-content div.x-close-wrap:hover{
+//  cursor: pointer;
+//  opacity: .9;
+//}
+//#item-content div.x-close-wrap img{
+//  width: 30px !important;
+//  height: 30px !important;
+//}
+//#item-content .img{
+//  position: relative;
+//  z-index: 10;
+//}

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

@@ -8,9 +8,12 @@
       :on-success="uploadSuccess">
       <img src="/images/messageBoard/msg_uploadPic.png" alt="">
     </el-upload>
-    <el-dialog v-model="dialogVisible" size="tiny">
+    <el-dialog v-model="dialogVisible" size="tiny" id="preview">
       <img :src="dialogImageUrl" width="100%" alt="">
     </el-dialog>
+    <!--<div v-model="dialogVisible" size="tiny" id="preview">-->
+      <!--<img :src="dialogImageUrl" width="100%" alt="">-->
+    <!--</div>-->
   </div>
 </template>
 <script>
@@ -28,6 +31,9 @@
       handlePictureCardPreview (file) {
         this.dialogImageUrl = file.url
         this.dialogVisible = true
+        let preview = document.querySelector('.el-upload-list__item-preview')
+        preview.setAttribute('date-toggle', 'modal')
+        preview.setAttribute('date-target', '#preview')
       },
       uploadSuccess (response, file, fileList) {
         this.$emit('fileAction', file.url)
@@ -82,7 +88,15 @@
     position: absolute;
     top: 3px;
     right: 3px;
+    /*top: 3px;*/
+    /*right: -30px;*/
   }
+  /*.el-icon-view{*/
+    /*display: none;*/
+  /*}*/
+  /*.el-upload-list__item-preview{*/
+    /*display: none;*/
+  /*}*/
   .el-upload-list__item-preview .el-icon-view {
     margin-right: 7px;
   }

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="page-wrap">
+  <div class="page-wrap" v-if="total/pageSize>1">
     <el-pagination
       :current-page.sync="current"
       :page-size="pageSize"
@@ -8,7 +8,7 @@
       @current-change="handleCurrentChange"
       v-if="total/pageSize>=1">
     </el-pagination>
-    <ul v-if="total/pageSize>=1" class="pagination" style="float:right;margin-left:20px;">
+    <ul class="pagination" style="float:right;margin-left:20px;">
         <li>
           <input type="text" class="page-number" v-model="nowPage">
         </li>

+ 29 - 3
components/product/BrandList.vue

@@ -28,10 +28,36 @@
 <script>
   export default {
     name: 'brandList',
-    computed: {
-      brandList () {
-        return this.$store.state.product.brand.brandList.data
+    props: ['key'],
+    data () {
+      return {
+        brandList: {},
+        keyword: this.$route.params.initial,
+        flag: true
+      }
+    },
+    mounted () {
+      let keyword = this.keyword
+      this.$http.get(`/api/product/brand/initial/${keyword}`)
+        .then(response => {
+          this.brandList = response.data
+        })
+      this.flag = false
+    },
+    updated () {
+      if (this.flag) {
+        let keyword = this.keyword
+        this.$http.get(`/api/product/brand/initial/${keyword}`)
+          .then(response => {
+            this.brandList = response.data
+          })
+        this.flag = false
       }
+    },
+    computed: {
+//      brandList () {
+//        return this.$store.state.product.brand.brandList.data
+//      }
     }
   }
 </script>

+ 14 - 4
components/product/Recommends.vue

@@ -26,11 +26,21 @@
 <script>
   export default {
     name: 'recommends',
-
-    computed: {
-      hotBrands () {
-        return this.$store.state.product.brand.recommends.data
+    data () {
+      return {
+        hotBrands: {}
       }
+    },
+    mounted () {
+      this.$http.get(`/api/product/brand/hot/5`)
+        .then(response => {
+          this.hotBrands = response.data
+        })
+    },
+    computed: {
+//      hotBrands () {
+//        return this.$store.state.product.brand.recommends.data
+//      }
     }
   }
 </script>

+ 12 - 5
components/provider/Carousel.vue

@@ -29,14 +29,21 @@
           paginationElement: 'li',
           prevButton: '.swiper-button-prev',
           nextButton: '.swiper-button-next'
-        }
+        },
+        banners: []
       }
     },
-    computed: {
-      banners () {
-        return this.$store.state.carousel.banners.data
-      }
+    mounted () {
+      this.$http.get('/api/carousel/home%20page%20banner')
+      .then(response => {
+        this.banners = response.data
+      })
     }
+//    computed: {
+//      banners () {
+//        return this.$store.state.carousel.banners.data
+//      }
+//    }
   }
 </script>
 <style lang="scss" scoped>

+ 14 - 4
components/provider/ExcellentSuppliers.vue

@@ -22,14 +22,24 @@
   </div>
 </template>
 <script>
-
 export default {
+  data () {
+    return {
+      stores: {}
+    }
+  },
   name: 'excellent-suppliers',
   props: ['isShowMore'],
+  mounted () {
+    this.$http.get('/api/cms-service/storeIn/5')
+      .then(response => {
+        this.stores = response.data
+      })
+  },
   computed: {
-    stores () {
-      return this.$store.state.provider.storeCms.recommendStore.data
-    }
+//    stores () {
+//      return this.$store.state.provider.storeCms.recommendStore.data
+//    }
   }
 }
 </script>

+ 14 - 3
components/provider/HotCommodity.vue

@@ -14,11 +14,22 @@
 <script>
 
 export default {
+  data () {
+    return {
+      hotComponents: {}
+    }
+  },
   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
-    }
+//    hotComponents () {
+//      return this.$store.state.provider.storeCms.hotComponents.data
+//    }
   }
 }
 </script>

+ 33 - 7
components/provider/NewStore.vue

@@ -38,16 +38,42 @@
   </div>
 </template>
 <script>
-
 export default {
+  props: ['types'],
+  data () {
+    return {
+      stores: {},
+      storeCount: {},
+      params: {
+        filter: 'newStore'
+      }
+    }
+  },
   name: 'new-store',
+  mounted () {
+    console.log(this.types)
+    this.$http.get('/api/store-service/stores', {
+      params: {filter: this.params.filter, types: this.types}
+    }).then(response => {
+      this.stores = response.data.content || response.data
+      this.$http.get('/api/store-service/stores/type/count', {
+        params: {
+          types: this.types
+        }
+      }).then(response => {
+        if (response.data.data) {
+          this.storeCount = response.data.data
+        }
+      })
+    })
+  },
   computed: {
-    stores () {
-      return this.$store.state.provider.storeCms.newStores.data ? this.$store.state.provider.storeCms.newStores.data.content : []
-    },
-    storeCount () {
-      return this.$store.state.provider.storeCms.storeCount.data
-    }
+//    stores () {
+//      return this.$store.state.provider.storeCms.newStores.data ? this.$store.state.provider.storeCms.newStores.data.content : []
+//    },
+//    storeCount () {
+//      return this.$store.state.provider.storeCms.storeCount.data
+//    }
   }
 }
 </script>

+ 18 - 4
components/provider/RecommendOriginal.vue

@@ -23,13 +23,27 @@
   </div>
 </template>
 <script>
-
 export default {
   name: 'recommend-original',
-  computed: {
-    stores () {
-      return this.$store.state.provider.storeCms.recommendStore.data
+  data () {
+    return {
+      stores: {},
+      params: {
+        type: 'ORIGINAL_FACTORY'
+      }
     }
+  },
+  mounted () {
+    this.$http.get('/api/store-cms/contents/store/5', {
+      params: this.params
+    }).then(response => {
+      this.stores = response.data
+    })
+  },
+  computed: {
+//    stores () {
+//      return this.$store.state.provider.storeCms.recommendStore.data
+//    }
   }
 }
 </script>

+ 4 - 3
components/provider/RecommendStore.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="container marketing">
     <div class="sales-rank">
-      <sales-rank />
+      <sales-rank :isOriginal="isOriginal"/>
     </div>
     <div class="carousel">
       <carousel />
     </div>
     <div class="new-store">
-      <new-store />
+      <new-store :types="types"/>
     </div>
   </div>
 </template>
@@ -22,7 +22,8 @@ export default {
     SalesRank,
     NewStore,
     Carousel
-  }
+  },
+  props: ['isOriginal', 'types']
 }
 </script>
 <style lang="scss" scoped>

+ 48 - 5
components/provider/SalesRank.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="sale-module">
+  <div class="sale-module" v-if="x >0">
     <div class="title">
       <img src="/images/store/home/hot.png" />
       <span>销售排行榜</span>
@@ -20,13 +20,56 @@
   </div>
 </template>
 <script>
-
 export default {
   name: 'sales-rank',
-  computed: {
-    stores () {
-      return this.$store.state.provider.storeCms.salesStores.data
+  data () {
+    return {
+      stores: {},
+      params: {
+        filter: 'topBySales'
+      },
+      x: 1
+    }
+  },
+  props: ['isOriginal'],
+  methods: {
+    countStoreOrderCount (store) {
+      return this.$http.get('/api/provider/order/storeid/' + store.uuid + '/count')
+        .then(response => {
+          store.orderCount = response.data.orderCount
+        })
     }
+  },
+  mounted () {
+    let _self = this
+    this.$http.get('/api/store-service/stores', {
+      params: {filter: this.params.filter, isOriginal: this.isOriginal}
+    }).then(response => {
+      this.stores = response.data || []
+//      let orderCounts = []
+      for (let i = 0; i < this.stores.length; i++) {
+      //  orderCounts.push(_self.countStoreOrderCount(this.stores[i]))
+        this.$http.get('/api/provider/order/storeid/' + _self.stores[i].uuid + '/count')
+          .then(response => {
+            _self.stores[i].orderCount = response.data.orderCount
+            _self.x++
+          })
+      }
+//    // 合并请求,获取店铺的交易量数据
+//      return Promise.all(orderCounts)
+//        .then(result => {
+//          if (result) {
+//            for (let i = 0; i < result.length; i++) {
+//              this.stores[i].orderCount = result[i].data ? result[i].data.orderCount : 0
+//            }
+//          }
+//        })
+    })
+  },
+  computed: {
+//    stores () {
+//      return this.$store.state.provider.storeCms.salesStores.data
+//    }
   }
 }
 </script>

+ 44 - 16
components/provider/Suppliers.vue

@@ -46,21 +46,19 @@
       </tbody>
     </table>
     <div style="float: right;">
-      <el-pagination
-        :current-page.sync="pageParams.page"
-        :page-size="pageParams.count"
-        layout="prev, pager, next, jumper"
-        :total="stores.totalElements"
-        @current-change="handleCurrentChange">
-      </el-pagination>
+      <page :total="stores.totalElements" :page-size="pageParams.count"
+            :current="pageParams.page" v-on:childEvent="handleCurrentChange"></page>
     </div>
   </div>
 </template>
 <script>
-
+import Page from '~components/common/page/pageComponent.vue'
 export default {
   name: 'suppliers',
   props: ['types'],
+  components: {
+    Page
+  },
   data () {
     return {
       keyword: '',
@@ -68,20 +66,50 @@ export default {
         page: 1,
         count: 10,
         keyword: '',
+        op: 'pageByType',
+        types: this.types,
+        sorting: {'createTime': 'DESC'}
+      },
+      stores: {},
+      params: {
+        op: 'pageByType',
+        page: 1,
+        count: 10,
         types: this.types
-      }
+      },
+      flag: true
     }
   },
-  computed: {
-    stores () {
-      return this.$store.state.provider.stores.storeList.data
+  mounted () {
+    this.$http.get('/api/store-service/stores', {params: this.params})
+      .then(response => {
+        this.stores = response.data
+      })
+    this.flag = false
+  },
+  updated () {
+    if (this.flag) {
+      this.$http.get('/api/store-service/stores', {params: this.params})
+        .then(response => {
+          this.stores = response.data
+        })
+      this.flag = false
     }
   },
+  computed: {
+//    stores () {
+//      return this.$store.state.provider.stores.storeList.data
+//    }
+  },
   methods: {
     search () {
       this.pageParams.page = 1
       this.pageParams.keyword = this.keyword === '' ? null : this.keyword
-      this.$store.dispatch('provider/findStoreList', this.pageParams)
+//      this.$store.dispatch('provider/findStoreList', this.pageParams)
+      this.$http.get('/api/store-service/stores', {params: this.pageParams})
+        .then(response => {
+          this.stores = response.data
+        })
     },
     showLittleDescription (description) {
       if (!description || description === '') {
@@ -93,10 +121,10 @@ export default {
       pageParams.op = 'pageByType'
 
       try {
-        let { data } = await this.$http.get('/api/store-service/stores', { params: pageParams })
-        this.$store.commit('provider/stores/GET_STORE_LIST_SUCCESS', data)
+        let { data } = await this.$http.get('/api/store-service/stores', { params: this.pageParams })
+        this.stores = data
       } catch (err) {
-        this.$store.commit('provider/stores/GET_STORE_LIST_FAILURE', err)
+//        this.$store.commit('provider/stores/GET_STORE_LIST_FAILURE', err)
       }
     },
     handleCurrentChange (page) {

+ 14 - 16
components/store/CommodityInfo.vue

@@ -61,7 +61,7 @@
               <span class="name">数&nbsp;量</span>:
               <div class="input-group" style="width: 120px">
                 <div class="input-group-addon operate" @click="subNum()" :disabled="!fragment.canAdd">-</div>
-                <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()"/>
+                <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()"style="padding: 0;min-width: 100px;text-align: center;"/>
                 <div class="input-group-addon operate" @click="addNum()" :disabled="!fragment.canSub">+</div>
               </div>
               ×
@@ -136,7 +136,6 @@ function initFragment (commodity) {
   }
   return fragment
 }
-import axios from '~/plugins/axios'
 import {Message} from 'element-ui'
 function getFragment (commodity, fragment) {
   // 判断是否小于第一分段的起订量
@@ -238,7 +237,7 @@ export default {
           // this.$emit('buyAction', [{uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty}])
           if (isBuy) {
             // this.$store.dispatch('user/getBuyInfo', [{uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty}])
-            axios.post('trade/order/buyNow', [{uuid: item.uuid, batchCode: item.batchCode, number: this.fragment.num}])
+            this.$http.post('trade/order/buyNow', [{uuid: item.uuid, batchCode: item.batchCode, number: this.fragment.num}])
               .then(response => {
                 window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
               }, err => {
@@ -251,7 +250,7 @@ export default {
               })
           } else {
             // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
-            axios.post('trade/cart/add', {uuid: item.uuid, batchCode: item.batchCode, number: this.fragment.num})
+            this.$http.post('trade/cart/add', {uuid: item.uuid, batchCode: item.batchCode, number: this.fragment.num})
               .then(response => {
                 console.log(response.data)
                 if (response.data.success) {
@@ -342,14 +341,14 @@ export default {
 <style scoped>
   .container.commodity {
 		width: 1190px;
-		padding-left: 0px;
-		padding-right: 0px;
+		padding-left: 0;
+		padding-right: 0;
 		font-family: "Microsoft Yahei", "微软雅黑";
 	}
 	.commodity .commodity-detail {
 		width: 100%;
 		display: inline-block;
-		font-size: 0px;
+		font-size: 0;
 	}
 
 	.commodity-detail .img{
@@ -386,7 +385,6 @@ export default {
 
 	.commodity-detail .content .com-info {
 		font-size: 14px;
-		font-family: "Microsoft Yahei", "微软雅黑";
 		line-height: 26px;
 	}
 
@@ -403,13 +401,13 @@ export default {
 	}
 
 	.input-group .input-group-operate:last-child {
-		border-bottom-left-radius: 0px;
-		border-top-left-radius: 0px;
+		border-bottom-left-radius: 0;
+		border-top-left-radius: 0;
 	}
 
 	.input-group .input-group-operate:first-child {
-		border-bottom-right-radius: 0px;
-		border-top-right-radius: 0px;
+		border-bottom-right-radius: 0;
+		border-top-right-radius: 0;
 	}
 
 	.content .com-info .name {
@@ -478,17 +476,17 @@ export default {
 	}
 
 	ul.list-inline {
-		margin: 0px;
+		margin: 0;
 	}
 
 	.commodity-price ul.list-inline li {
-		padding-left: 0px;
-		padding-right: 0px;
+		padding-left: 0;
+		padding-right: 0;
 		border-bottom: 1px dashed #D6D3CE;
 	}
 
 	.commodity-price .table {
-		margin-bottom: 0px;
+		margin-bottom: 0;
 	}
 
 	.commodity-price ul>li:last-child {

+ 20 - 9
components/store/CommodityList.vue

@@ -154,13 +154,27 @@ export default {
       },
       searchCode: '',
       parentKindId: 0,
-      ids: null
+      ids: null,
+      commodities: {},
+      params: {
+        storeid: this.$route.params.uuid,
+        origin: 'store',
+        code: '',
+        page: 1,
+        count: 6
+      }
     }
   },
+  mounted () {
+    this.$http.get('/api/commodity/commodities', { params: this.params })
+      .then(response => {
+        this.commodities = response.data
+      })
+  },
   computed: {
-    commodities () {
-      return this.$store.state.shop.storeInfo.storeCommodity.data
-    }
+//    commodities () {
+//      return this.$store.state.shop.storeInfo.storeCommodity.data
+//    }
   },
   methods: {
     handlerCurrentNode (data, node) {
@@ -189,18 +203,15 @@ export default {
 
       try {
         let { data } = await this.$http.get('/api/commodity/commodities', { params })
-        this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', data)
+        this.commodities = data
       } catch (err) {
-        this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
+//        this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
       }
     },
     handleCurrentChange (page) {
       this.pageParams.page = page
       this.pageCommodity(this.pageParams, this.ids, this.searchCode)
     }
-//    goBack () {
-//      this.$router.back(-1)
-//    }
   }
 }
 </script>

+ 16 - 4
components/store/common/StoreTitle.vue

@@ -16,13 +16,25 @@
   </div>
 </template>
 <script>
-
+import axios from '~plugins/axios'
 export default {
   name: 'store-title',
-  computed: {
-    storeInfo () {
-      return this.$store.state.shop.storeInfo.store.data
+  data () {
+    return {
+      storeInfo: {},
+      params: this.$route.params
     }
+  },
+  mounted () {
+    axios.get('/api/store-service/stores', { params: this.params })
+      .then(response => {
+        this.storeInfo = response.data
+      })
+  },
+  computed: {
+//    storeInfo () {
+//      return this.$store.state.shop.storeInfo.store.data
+//    }
   }
 }
 </script>

+ 1 - 0
package.json

@@ -44,6 +44,7 @@
     "eslint-plugin-html": "^2.0.0",
     "eslint-plugin-promise": "^3.4.1",
     "eslint-plugin-standard": "^2.0.1",
+    "extract-text-webpack-plugin": "^3.0.0",
     "node-sass": "^4.5.3",
     "sass-loader": "^6.0.6"
   }

+ 1 - 1
pages/product/brand/brandList.vue

@@ -48,7 +48,7 @@
     layout: 'main',
     fetch ({store}) {
       return Promise.all([
-        store.dispatch('product/loadRecommends')
+//        store.dispatch('product/loadRecommends')
       ])
     },
     components: {

+ 2 - 2
pages/product/brand/brandList/_initial.vue

@@ -1,5 +1,5 @@
 <template>
-  <brand-list></brand-list>
+  <brand-list :key="this.$route.params.initial"></brand-list>
 </template>
 
 <script>
@@ -9,7 +9,7 @@
     name: 'brandListDetail',
     fetch ({store, route}) {
       return Promise.all([
-        store.dispatch('product/loadBrands', {'keyword': route.params.initial})
+//        store.dispatch('product/loadBrands', {'keyword': route.params.initial})
       ])
     },
     components: {

+ 8 - 7
pages/provider/factories.vue

@@ -2,7 +2,7 @@
   <!-- 组件模板只能包含一个根元素,除非使用v-if 和 v-if-else -->
   <div>
     <!-- 轮播及店铺推荐 -->
-    <recommend-store/>
+    <recommend-store :isOriginal="true" :types="types"/>
 
     <recommend-original/>
 
@@ -16,11 +16,11 @@ 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', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' })
+//      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: {
@@ -30,7 +30,8 @@ export default {
   },
   data () {
     return {
-      msg: 'hello vue'
+      msg: 'hello vue',
+      types: 'ORIGINAL_FACTORY'
     }
   }
 }

+ 11 - 6
pages/provider/home.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!-- 轮播及店铺推荐 -->
-    <recommend-store/>
+    <recommend-store :isOriginal="false" :types="types"/>
 
     <excellent-suppliers :isShowMore="true"/>
 
@@ -13,13 +13,18 @@ import { RecommendStore, ExcellentSuppliers, HotCommodity } from '~components/pr
 
 export default{
   layout: 'main',
+  data () {
+    return {
+      types: 'AGENCY-DISTRIBUTION'
+    }
+  },
   fetch ({ store }) {
     return Promise.all([
-      store.dispatch('loadBanners'),
-      store.dispatch('provider/loadSalesStore', { isOriginal: false }),
-      store.dispatch('provider/loadNewStores', { types: 'AGENCY-DISTRIBUTION' }),
-      store.dispatch('provider/loadRecommendStores'),
-      store.dispatch('provider/loadHotComponents')
+//      store.dispatch('loadBanners'),
+//      store.dispatch('provider/loadSalesStore', { isOriginal: false })
+//      store.dispatch('provider/loadNewStores', { types: 'AGENCY-DISTRIBUTION' }),
+//      store.dispatch('provider/loadRecommendStores')
+//      store.dispatch('provider/loadHotComponents')
     ])
   },
   components: {

+ 2 - 2
pages/provider/list.vue

@@ -12,8 +12,8 @@ export default {
   layout: 'main',
   fetch ({ store }) {
     return Promise.all([
-      store.dispatch('provider/loadRecommendStores'),
-      store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'AGENCY-DISTRIBUTION' })
+//      store.dispatch('provider/loadRecommendStores'),
+//      store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'AGENCY-DISTRIBUTION' })
     ])
   },
   components: {

+ 1 - 1
pages/store/_uuid/_batchCode.vue

@@ -11,7 +11,7 @@ export default {
   layout: 'shop',
   fetch ({ store, route }) {
     return Promise.all([
-      store.dispatch('shop/findStoreInfoFromUuid', route.params),
+//      store.dispatch('shop/findStoreInfoFromUuid', route.params),
       store.dispatch('shop/findCommodityOnBatchInfo', route.params)
     ])
   },

+ 1 - 1
pages/store/_uuid/description.vue

@@ -10,7 +10,7 @@ export default {
   layout: 'shop',
   fetch ({ store, route }) {
     return Promise.all([
-      store.dispatch('shop/findStoreInfoFromUuid', route.params)
+//      store.dispatch('shop/findStoreInfoFromUuid', route.params)
     ])
   },
   components: {

+ 1 - 1
pages/store/_uuid/index.vue

@@ -17,7 +17,7 @@ export default {
   },
   fetch ({ store, params }) {
     return Promise.all([
-      store.dispatch('shop/findStoreInfoFromUuid', params),
+//      store.dispatch('shop/findStoreInfoFromUuid', params),
       store.dispatch('shop/findRecommendProducts', params),
       store.dispatch('shop/pageCommoditiesOfStore', params.uuid, { page: 1, count: 6 })
     ])

+ 28 - 28
store/product/brand.js

@@ -1,33 +1,33 @@
 export const state = () => ({
-  recommends: {
-    fetching: false,
-    data: []
-  },
-  brandList: {
-    fetching: false,
-    data: []
-  }
+  // recommends: {
+  //   fetching: false,
+  //   data: []
+  // },
+  // brandList: {
+  //   fetching: false,
+  //   data: []
+  // }
 })
 
 export const mutations = {
-  REQUEST_RECOMMENDS (state) {
-    state.recommends.fetching = true
-  },
-  GET_RECOMMENDS_SUCCESS (state, result) {
-    state.recommends.fetching = false
-    state.recommends.data = result
-  },
-  GET_RECOMMENDS_FAILURE (state) {
-    state.recommends.fetching = false
-  },
-  REQUEST_BRANDS (state) {
-    state.brandList.fetching = true
-  },
-  GET_BRANDS_SUCCESS (state, result) {
-    state.brandList.fetching = false
-    state.brandList.data = result
-  },
-  GET_BRANDS_FAILURE (state) {
-    state.brandList.fetching = false
-  }
+  // REQUEST_RECOMMENDS (state) {
+  //   state.recommends.fetching = true
+  // },
+  // GET_RECOMMENDS_SUCCESS (state, result) {
+  //   state.recommends.fetching = false
+  //   state.recommends.data = result
+  // },
+  // GET_RECOMMENDS_FAILURE (state) {
+  //   state.recommends.fetching = false
+  // },
+  // REQUEST_BRANDS (state) {
+  //   state.brandList.fetching = true
+  // },
+  // GET_BRANDS_SUCCESS (state, result) {
+  //   state.brandList.fetching = false
+  //   state.brandList.data = result
+  // },
+  // GET_BRANDS_FAILURE (state) {
+  //   state.brandList.fetching = false
+  // }
 }

+ 70 - 70
store/provider/storeCms.js

@@ -1,75 +1,75 @@
 export const state = () => ({
-  salesStores: {
-    fetching: false,
-    data: []
-  },
-  newStores: {
-    fetching: false,
-    data: []
-  },
-  storeCount: {
-    fetching: false,
-    data: 0
-  },
-  recommendStore: {
-    fetching: false,
-    data: []
-  },
-  hotComponents: {
-    fetching: false,
-    data: []
-  }
+  // salesStores: {
+  //   fetching: false,
+  //   data: []
+  // }
+  // newStores: {
+  //   fetching: false,
+  //   data: []
+  // },
+  // storeCount: {
+  //   fetching: false,
+  //   data: 0
+  // }
+  // recommendStore: {
+  //   fetching: false,
+  //   data: []
+  // },
+  // hotComponents: {
+  //   fetching: false,
+  //   data: []
+  // }
 })
 
 export const mutations = {
-  REQUEST_SALES (state) {
-    state.salesStores.fetching = true
-  },
-  GET_SALES_FAILURE (state) {
-    state.salesStores.fetching = false
-  },
-  GET_SALES_SUCCESS (state, result) {
-    state.salesStores.fetching = false
-    state.salesStores.data = result
-  },
-  REQUEST_NEW_STORES (state) {
-    state.newStores.fetching = true
-  },
-  GET_NEW_STORES_FAILURE (state) {
-    state.newStores.fetching = false
-  },
-  GET_NEW_STORES_SUCCESS (state, result) {
-    state.newStores.fetching = false
-    state.newStores.data = result
-  },
-  REQUEST_STORE_COUNT (state) {
-    state.storeCount.fetching = true
-  },
-  GET_STORE_COUNT_FAILURE (state) {
-    state.storeCount.fetching = false
-  },
-  GET_STORE_COUNT_SUCCESS (state, result) {
-    state.storeCount.fetching = false
-    state.storeCount.data = result
-  },
-  REQUEST_RECOMMEND_STORE (state) {
-    state.recommendStore.fetching = true
-  },
-  GET_RECOMMEND_STORE_FAILURE (state) {
-    state.recommendStore.fetching = false
-  },
-  GET_RECOMMEND_STORE_SUCCESS (state, result) {
-    state.recommendStore.fetching = false
-    state.recommendStore.data = result
-  },
-  REQUEST_HOT_COMPONENTS (state) {
-    state.hotComponents.fetching = true
-  },
-  GET_HOT_COMPONENTS_FAILURE (state) {
-    state.hotComponents.fetching = false
-  },
-  GET_HOT_COMPONENTS_SUCCESS (state, result) {
-    state.hotComponents.fetching = false
-    state.hotComponents.data = result
-  }
+//   REQUEST_SALES (state) {
+//     state.salesStores.fetching = true
+//   },
+//   GET_SALES_FAILURE (state) {
+//     state.salesStores.fetching = false
+//   },
+//   GET_SALES_SUCCESS (state, result) {
+//     state.salesStores.fetching = false
+//     state.salesStores.data = result
+//   }
+  // REQUEST_NEW_STORES (state) {
+  //   state.newStores.fetching = true
+  // },
+  // GET_NEW_STORES_FAILURE (state) {
+  //   state.newStores.fetching = false
+  // },
+  // GET_NEW_STORES_SUCCESS (state, result) {
+  //   state.newStores.fetching = false
+  //   state.newStores.data = result
+  // },
+  // REQUEST_STORE_COUNT (state) {
+  //   state.storeCount.fetching = true
+  // },
+  // GET_STORE_COUNT_FAILURE (state) {
+  //   state.storeCount.fetching = false
+  // },
+  // GET_STORE_COUNT_SUCCESS (state, result) {
+  //   state.storeCount.fetching = false
+  //   state.storeCount.data = result
+  // }
+  // REQUEST_RECOMMEND_STORE (state) {
+  //   state.recommendStore.fetching = true
+  // },
+  // GET_RECOMMEND_STORE_FAILURE (state) {
+  //   state.recommendStore.fetching = false
+  // },
+  // GET_RECOMMEND_STORE_SUCCESS (state, result) {
+  //   state.recommendStore.fetching = false
+  //   state.recommendStore.data = result
+  // },
+  // REQUEST_HOT_COMPONENTS (state) {
+  //   state.hotComponents.fetching = true
+  // },
+  // GET_HOT_COMPONENTS_FAILURE (state) {
+  //   state.hotComponents.fetching = false
+  // },
+  // GET_HOT_COMPONENTS_SUCCESS (state, result) {
+  //   state.hotComponents.fetching = false
+  //   state.hotComponents.data = result
+  // }
 }

+ 18 - 18
store/provider/stores.js

@@ -1,19 +1,19 @@
-export const state = () => ({
-  storeList: {
-    fetching: false,
-    data: {}
-  }
-})
+// export const state = () => ({
+//   storeList: {
+//     fetching: false,
+//     data: {}
+//   }
+// })
 
-export const mutations = {
-  REQUEST_STORE_LIST (state) {
-    state.storeList.fetching = true
-  },
-  GET_STORE_LIST_FAILURE (state) {
-    state.storeList.fetching = false
-  },
-  GET_STORE_LIST_SUCCESS (state, result = {}) {
-    state.storeList.fetching = false
-    state.storeList.data = result
-  }
-}
+// export const mutations = {
+//   REQUEST_STORE_LIST (state) {
+//     state.storeList.fetching = true
+//   },
+//   GET_STORE_LIST_FAILURE (state) {
+//     state.storeList.fetching = false
+//   },
+//   GET_STORE_LIST_SUCCESS (state, result = {}) {
+//     state.storeList.fetching = false
+//     state.storeList.data = result
+//   }
+// }

+ 14 - 14
store/shop/storeInfo.js

@@ -14,10 +14,10 @@ export const state = () => ({
     fetching: false,
     data: {}
   },
-  storeCommodity: {
-    fetching: false,
-    data: {}
-  },
+  // storeCommodity: {
+  //   fetching: false,
+  //   data: {}
+  // },
   saveHistory: {
     fetching: false,
     data: {}
@@ -63,16 +63,16 @@ export const mutations = {
     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_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
   },