Browse Source

店铺首页修改

gaoxm 6 years ago
parent
commit
c617059f60

+ 6 - 2
components/brandCenter/RecommendBrand.vue

@@ -7,7 +7,8 @@
             <img :src="banner.pictureLink"/>
           </a>
           <span v-if="!banner.hrefUrl">
-            <img src="/images/brandCenter/recommend-bg1.png"/>
+            <img :src="banner.pictureLink"/>
+            <!--<img src="/images/brandCenter/recommend-bg1.png"/>-->
           </span>
         </div>
         <div class="swiper-button-prev"><i class="iconfont icon-swiper-left"></i></div>
@@ -23,7 +24,9 @@
             <div>
               <p>{{item.title}}</p>
               <span class="brand-application" v-if="item.metadatas.contExp_abstract" :title="item.metadatas.contExp_abstract">应用领域:{{item.metadatas.contExp_abstract | applicationFilter}}</span>
-              <span class="brand-introduce" v-if="item.metadatas.contExp_select">品牌介绍:{{item.metadatas.contExp_select | introduceFilter}}</span>
+              <span class="brand-application" v-if="!item.metadatas.contExp_abstract">应用领域:-</span>
+              <span class="brand-introduce" v-if="item.metadatas.contExp_select" :title="item.metadatas.contExp_select">品牌介绍:{{item.metadatas.contExp_select | introduceFilter}}</span>
+              <span class="brand-introduce" v-if="!item.metadatas.contExp_select">品牌介绍:-</span>
             </div>
           </a>
         </li>
@@ -105,6 +108,7 @@
   .recommend-brand {
     width: 1190px;
     margin: 0 auto;
+    margin-top: 10px;
     .swiper-container {
       z-index: 2;
       .swiper-wrapper {

+ 1 - 0
components/store/RecommendProduct.vue

@@ -346,3 +346,4 @@
     bottom: 0;
   }
 </style>
+

+ 0 - 0
components/store/common/StoreTitle.vue → components/store/common/StoreTitle1.vue


+ 100 - 0
components/store/home/Certificate.vue

@@ -0,0 +1,100 @@
+<template>
+  <div class="brand" style="padding-top: 25px;">
+    <div class="brand-content">
+      <div class="title"><span>资质证明</span></div>
+     <!-- <div class="info">
+        <div><span>注册地址&nbsp;:&nbsp;</span><span>深圳市南山区高新技术园英唐大厦一楼</span></div>
+        <div><span>注册号&nbsp;:&nbsp;</span><span>834631</span></div>
+        <div><span>企业类型&nbsp;:&nbsp;</span><span>民营企业</span></div>
+        <div><span>官网地址&nbsp;:&nbsp;</span><span>http://www.worldshine.net/profile.html</span></div>
+      </div>-->
+    </div>
+    <qualification-certificate></qualification-certificate>
+  </div>
+</template>
+<script>
+  import QualificationCertificate from './QualificationCertificate.vue'
+  export default {
+    name: 'certificate-self',
+    data () {
+      return {
+        type: 0
+      }
+    },
+    filters: {
+      introduceFilter: function (title) {
+        if (title === '') {
+          return title
+        }
+        let len = 0
+        let index = 0
+        for (let i = 0; i < title.length; i++) {
+          if (index === 0 && title.charAt(i).charCodeAt(0) > 255) {
+            len = len + 2
+          } else {
+            len++
+          }
+          if (len > 240) {
+            index = i
+            break
+          }
+        }
+        if (index > 0) {
+          return title.substring(0, index) + '...'
+        } else {
+          return title
+        }
+      }
+    },
+    components: {
+      QualificationCertificate
+    }
+  }
+</script>
+<style  lang="scss" scoped>
+  .brand{
+    min-width: 1190px;
+    background: #ece9ec;
+    .brand-content{
+      width: 1190px;
+      padding: 0px;
+      margin: 0 auto;
+      background: #fff;
+      .title {
+        width: 100%;
+        padding: 13px 0px;
+        margin-top: 9px;
+        margin-bottom: 25px;
+        border-bottom: 1px solid #edf0f4;
+        span{
+          display: inline-block;
+          height: 23px;
+          line-height: 23px;
+          color: #666;
+          padding-left: 10px;
+          border-left: 3px solid #366ad0;
+        }
+      }
+      .info{
+        margin: 0 auto;
+        padding: 32px 0px;
+        >div{
+          display: table-cell;
+          width: 200px;
+          text-align: center;
+          &:first-child,&:last-child{
+            width: 395px;
+          }
+          span:first-child{
+            font-size: 12px;
+            color: #666;
+          }
+          span:last-child{
+            font-size: 12px;
+            color: #333;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 703 - 22
components/store/CommodityList.vue → components/store/home/CommodityList.vue

@@ -1,4 +1,4 @@
-<template>
+<!--<template>
   <div id="goods-list-fragment">
     <div class="container" style="width: 1190px; padding: 0;">
       <div class="title-area">
@@ -9,7 +9,7 @@
           <el-tree :data="kinds" :props="defaultProps" :default-expanded-keys="[0]" node-key="id" accordion :highlight-current="true" @current-change="handlerCurrentNode" @node-collapse="onNodeCollapse"></el-tree>
         </div>
       </div>
-      <!-- 产品列表 -->
+      &lt;!&ndash; 产品列表 &ndash;&gt;
       <div class="goods-area">
         <div class="row" style="margin: 0;width: 970px;">
           <div class="col-md-3 btn-group btn-group-sm" style="padding: 0;">
@@ -30,17 +30,17 @@
 
         </div>
 
-        <!-- 列表展示 -->
+        &lt;!&ndash; 列表展示 &ndash;&gt;
         <table class="goodslist" style="width: 970px">
           <thead>
           <tr style="height: 40px;">
-            <!--<th width="90"></th>-->
+            &lt;!&ndash;<th width="90"></th>&ndash;&gt;
             <th width="140">品牌/类目/型号/规格</th>
             <th width="100">包装/生产日期</th>
             <th width="110">库存</th>
             <th width="90">梯度/pcs</th>
-            <!--<th width="90">香港交货<span style="font-size: 12px;">($)</span></th>-->
-            <!--<th width="100">大陆交货<span style="font-size: 12px;">(¥)</span></th>-->
+            &lt;!&ndash;<th width="90">香港交货<span style="font-size: 12px;">($)</span></th>&ndash;&gt;
+            &lt;!&ndash;<th width="100">大陆交货<span style="font-size: 12px;">(¥)</span></th>&ndash;&gt;
             <th width="100">单价</th>
             <th width="100">交期(天)</th>
             <th width="90">规格书</th>
@@ -77,33 +77,33 @@
               <div class="from" v-if="commodity.reserve && commodity.reserve>0 || commodity.status === 602">
                 最小起订量:<span v-if="commodity.minBuyQty" v-text="commodity.minBuyQty">300</span>
               </div>
-              <!--<div class="multiple">
+              &lt;!&ndash;<div class="multiple">
                 倍数:<span>1</span>
-              </div>-->
+              </div>&ndash;&gt;
               <div class="can-div-sell" v-if="(commodity.reserve || commodity.status === 602) && commodity.breakUp">可拆卖</div>
             </td>
             <td>
               <div v-for="price in commodity.prices" v-text="price.start + '+'"></div>
             </td>
-            <!--<td>-->
-              <!--<div v-show="commodity.currencyName.indexOf('USD')==-1 || !commodity.prices">-->
-                <!--<span>—</span>-->
-              <!--</div>-->
-              <!--<div v-for="price in commodity.prices">{{price.uSDPrice | currency}}</div>-->
-            <!--</td>-->
-            <!--<td>-->
-              <!--<div v-show="commodity.currencyName.indexOf('RMB')==-1 || !commodity.prices">-->
-                <!--<span>—</span>-->
-              <!--</div>-->
-              <!--<div v-for="price in commodity.prices" >{{price.rMBPrice | currency}}</div>-->
-            <!--</td>-->
+            &lt;!&ndash;<td>&ndash;&gt;
+              &lt;!&ndash;<div v-show="commodity.currencyName.indexOf('USD')==-1 || !commodity.prices">&ndash;&gt;
+                &lt;!&ndash;<span>—</span>&ndash;&gt;
+              &lt;!&ndash;</div>&ndash;&gt;
+              &lt;!&ndash;<div v-for="price in commodity.prices">{{price.uSDPrice | currency}}</div>&ndash;&gt;
+            &lt;!&ndash;</td>&ndash;&gt;
+            &lt;!&ndash;<td>&ndash;&gt;
+              &lt;!&ndash;<div v-show="commodity.currencyName.indexOf('RMB')==-1 || !commodity.prices">&ndash;&gt;
+                &lt;!&ndash;<span>—</span>&ndash;&gt;
+              &lt;!&ndash;</div>&ndash;&gt;
+              &lt;!&ndash;<div v-for="price in commodity.prices" >{{price.rMBPrice | currency}}</div>&ndash;&gt;
+            &lt;!&ndash;</td>&ndash;&gt;
             <td>
               <div v-for="price in commodity.prices">{{commodity.currencyName.indexOf('USD')!=-1?'$':'¥'}}{{commodity.currencyName.indexOf('USD')!=-1?price.uSDPrice:price.rMBPrice | currency}}</div>
               <div v-if="commodity.currencyName.indexOf('RMB')==-1 || !commodity.prices && commodity.currencyName.indexOf('USD')==-1 || !commodity.prices"></div>
             </td>
             <td>
               <div v-if="commodity.b2cMinDelivery">
-                <!--{{commodity.b2cMinDelivery || 0}}-{{commodity.b2cMaxDelivery || 0}}天-->
+                &lt;!&ndash;{{commodity.b2cMinDelivery || 0}}-{{commodity.b2cMaxDelivery || 0}}天&ndash;&gt;
                 <span v-if="commodity.b2cMinDelivery != commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery + '-' + commodity.b2cMaxDelivery"></span>
                 <span v-if="commodity.b2cMinDelivery == commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery"></span>
               </div>
@@ -405,7 +405,7 @@ export default {
   .category-content .el-tree{
     border: none;
   }
-  .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content,.el-tree-node:hover{
+  .el-tree&#45;&#45;highlight-current .el-tree-node.is-current>.el-tree-node__content,.el-tree-node:hover{
     background: none !important;
   }
   .el-tree-node__content:hover{
@@ -748,4 +748,685 @@ export default {
   #goods-list-fragment .goods-area .page-wrap {
     margin-top: 18px;
   }
+</style>-->
+<template>
+  <div id="goods-list-fragment">
+    <div class="container">
+      <div style="margin-bottom: 15px;width: 100%;">
+        <div class="input-group">
+          <input type="search" class="form-control" id="search_input" title="code" placeholder="型号/品牌"
+                 v-model="searchCode" @search="goodsSearch(searchCode)"/>
+          <span class="input-group-btn">
+							<button type="button" class="btn" id="search_btn" @click="goodsSearch(searchCode)">&nbsp;搜&nbsp;索&nbsp;</button>
+						</span>
+        </div>
+      </div>
+      <div class="title-area">
+        <div class="category-title">
+          <span style="line-height: 34px;">产品分类</span>
+        </div>
+        <div class="category-content">
+          <el-tree v-if="kinds[0].children && kinds[0].children.length" :data="kinds" :props="defaultProps" accordion :highlight-current="true" @current-change="handlerCurrentNode" :default-expanded-keys="[0]" node-key="level">
+          </el-tree>
+          <span class="empty" v-if="!kinds[0].children || !kinds[0].children.length">暂无数据</span>
+        </div>
+      </div>
+      <!-- 产品列表 -->
+      <div class="goods-area">
+        <!-- 列表展示 -->
+        <table class="goodslist" style="width: 936px;background:#fff;" >
+          <thead>
+          <tr>
+            <th width="172"><div>品牌/型号</div></th>
+            <th width="140"><div>包装/生产日期</div></th>
+            <th width="100"><div>库存</div></th>
+            <!-- <th width="90">数量</th>
+             <th width="90">香港交货<span style="font-size: 12px;">($)</span></th>
+             <th width="100">大陆交货<span style="font-size: 12px;">(¥)</span></th>-->
+            <th width="216"><div>价格梯度(PCS)</div></th>
+            <th width="109"><div>交期(天)</div></th>
+            <th width="90"><div>规格书</div></th>
+            <th width="95"><div>操作</div></th>
+          </tr>
+          </thead>
+          <tbody id="goodslist-content">
+          <tr v-for="commodity in commodities.content" @click="goBatchDetail(commodity.batchCode)">
+            <td class="brand-code">
+              <img class="sellout-store-commodity" v-if="commodity.status === 602" src="/images/search/sellout-search.png" alt="">
+              <img class="specific-price-tag" v-if="isSpecificPriceTag(commodity.tag) && isConsignment" src="/images/floor/specificPrice-store.png" alt="">
+              <div class="brand" v-if="commodity.brandNameEn || commodity.brandEn">
+                <a v-if="commodity.brandNameEn && commodity.branduuid" @click="goBrandDetail('/product/brand/' + commodity.branduuid, $event)" v-text="commodity.brandNameEn"></a>
+                <span v-if="commodity.brandNameEn && !commodity.branduuid" v-text="commodity.brandNameEn"></span>
+                <span v-if="commodity.brandEn">{{commodity.brandEn}}</span>
+              </div>
+              <div class="brand" v-if="!commodity.brandNameEn && !commodity.brandEn && commodity.code">—</div>
+              <div class="code" v-if="commodity.code" v-text="commodity.code"></div>
+              <div class="code" v-if="!commodity.code && commodity.brandNameEn ">—</div>
+              <div class="brand" v-if="!commodity.brandNameEn && !commodity.brandEn && !commodity.code">—</div>
+            </td>
+            <td>
+              <div class="package" v-if="commodity.packaging" v-text="commodity.packaging"></div>
+              <div class="package" v-if="!commodity.packaging && !commodity.produceDate">—</div>
+              <div class="date" v-if='commodity.produceDate' v-text="commodity.produceDate">2016-12-01</div>
+            </td>
+            <td style="text-align: left;vertical-align: middle;">
+              <div class="goods" v-if="commodity.reserve">
+                库存:<span v-text="commodity.reserve">31500</span>
+              </div>
+              <div v-if="!commodity.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+              <div class="from" v-if="commodity.reserve && commodity.reserve>0">
+                起拍:<span v-if="commodity.minBuyQty" v-text="commodity.minBuyQty">300</span>
+              </div>
+              <!--<div class="multiple">
+                倍数:<span>1</span>
+              </div>-->
+              <div class="can-div-sell" v-if="commodity.reserve" v-text="commodity.breakUp?'可拆卖':'不可拆卖'"></div>
+            </td>
+            <td>
+              <div class="amount">
+                <div  v-for="price in commodity.prices" v-text="price.start + '+'"></div>
+              </div>
+              <!--<div v-show="commodity.currencyName.indexOf('USD')==-1 || !commodity.prices">
+                <span>—</span>
+              </div>
+              <div v-for="price in commodity.prices">{{price.uSDPrice | currency}}</div>-->
+              <div class="price">
+                <div v-show="commodity.currencyName.indexOf('RMB')==-1 || !commodity.prices">
+                  <span>—</span>
+                </div>
+                <div v-for="price in commodity.prices">¥{{price.rMBPrice | currency}}</div>
+              </div>
+            </td>
+            <td>
+              <div v-if="commodity.b2cMinDelivery">
+                <!--{{commodity.b2cMinDelivery || 0}}-{{commodity.b2cMaxDelivery || 0}}天-->
+                <span v-if="commodity.b2cMinDelivery != commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery + '-' + commodity.b2cMaxDelivery"></span>
+                <span v-if="commodity.b2cMinDelivery == commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery"></span>
+              </div>
+              <div v-if="!commodity.b2cMinDelivery"><span>—</span></div>
+            </td>
+            <td>
+              <div v-if="commodity.attach">
+                <a @click="goAttach(commodity.attach, $event)" target="_blank"><img src="/images/store/common/pdf.png" alt=""/></a>
+              </div>
+              <div v-if="!commodity.attach">—</div>
+            </td>
+            <td>
+              <buy :item="commodity"></buy>
+            </td>
+          </tr>
+          <tr v-if="!commodities.content || commodities.content.length == 0">
+            <td colspan="10">
+              <div class="text-center">
+                <div class="col-xs-offset-3 col-xs-2">
+                  <img src="/images/brandList/empty-cart.jpg">
+                </div>
+                <div class="col-xs-4 txt-info">
+                  <p class="grey f16">暂无器件信息</p>
+                  <i class="iconfont">&#xe610;</i>&nbsp;<a href="/">返回首页</a>
+                </div>
+              </div>
+            </td>
+          </tr>
+          </tbody>
+        </table>
+        <div style="float: right;">
+          <page :total="commodities.totalElements" :page-size="pageParams.count"
+                :current="pageParams.page" @childEvent="handleCurrentChange"></page>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  function getAllLeafIds (kind) {
+    if (!kind) {
+      return null
+    }
+    if (kind.isLeaf === 1) {
+      return kind.id
+    } else {
+      if (!kind.children || kind.children.length === 0) {
+        return null
+      }
+      let ids = []
+      for (let i = 0; i < kind.children.length; i++) {
+        ids.push(getAllLeafIds(kind.children[i]))
+      }
+      return ids.join(',')
+    }
+  }
+  import Buy from '~components/common/buyOrCar/buyComponent.vue'
+  import Page from '~components/common/page/pageComponent.vue'
+  export default {
+    name: 'commodity-list',
+    props: ['kinds'],
+    components: {
+      Buy,
+      Page
+    },
+    data () {
+      return {
+        defaultProps: {
+          children: 'children',
+          label: 'nameCn'
+        },
+        pageParams: {
+          page: 1,
+          count: 6
+        },
+        searchCode: '',
+        parentKindId: 0,
+        ids: null
+      }
+    },
+    filters: {
+      currency: function (num) {
+        if (typeof num === 'number') {
+          if (num <= 0.000001) {
+            num = 0.000001
+          } else {
+            if (num.toString().indexOf('.') === -1) {
+              num += '.00'
+            } else {
+              let inputStr = num.toString()
+              let arr = inputStr.split('.')
+              let floatNum = arr[1]
+              if (floatNum.length > 6) {
+                num = inputStr.substring(0, arr[0].length + 7)
+                if (Number(floatNum.charAt(6)) > 4) {
+                  num = (Number(num) * 1000000 + 1) / 1000000
+                }
+              } else if (floatNum.length === 1) {
+                num = num + '0'
+              }
+            }
+          }
+        }
+        return num
+      }
+    },
+    computed: {
+      commodities () {
+        return this.$store.state.shop.storeInfo.storeCommodity.data
+      }
+    },
+    mounted () {
+      this.kinds.forEach((item) => {
+        this.KindsNameChange(item)
+      })
+//    alert(JSON.stringify(this.kinds))
+    },
+    methods: {
+      KindsNameChange: function (obj) {
+//      obj.nameCn += obj.level
+        document.getElementsByClassName('el-tree-node__content').innerHTML = ('<span>1</span>')
+//      console.log(obj.nameCn)
+        if (obj.children && obj.children.length) {
+          console.log(obj.children)
+          obj.children.forEach((item) => {
+            this.KindsNameChange(item)
+          })
+        }
+      },
+      goAttach: function (url, event) {
+        event.stopPropagation()
+        if (this.user.logged) {
+          if (url && url !== '1') {
+            window.open(url)
+          } else {
+            this.$message.error('规格书地址错误')
+          }
+        } else {
+          this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+            if (response.data) {
+              window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
+            }
+          })
+        }
+      },
+      handlerCurrentNode (data, node) {
+        this.searchCode = ''
+        if (this.parentKindId === data.id) {
+          this.parentKindId = 0
+          this.ids = null
+        } else {
+          if (data.level === 1) {
+            this.parentKindId = data.id
+          }
+          this.ids = getAllLeafIds(data)
+        }
+        this.pageParams.page = 1
+
+        this.pageCommodity(this.pageParams, this.ids)
+      },
+      goodsSearch (keyword) {
+        this.pageParams.page = 1
+        this.pageCommodity(this.pageParams, this.ids, keyword)
+      },
+      async pageCommodity (pageParams, kindId, keyword) {
+//    pageCommodity (pageParams, kindId, keyword) {
+        let params = { storeid: this.$route.params.uuid, origin: 'store', kindUuid: kindId, code: keyword }
+        params.page = pageParams.page
+        params.count = pageParams.count
+
+        try {
+          let { data } = await this.$http.get('/api/commodity/commodities', { params })
+          this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', data)
+        } catch (err) {
+          this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
+        }
+//      this.$http.get('/api/commodity/commodities', { params }).then(response => {
+//        this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', response)
+//      }, 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)
+//    }
+      isSpecificPriceTag: function (tag) {
+        return tag && tag.indexOf('特价') !== -1
+      },
+      goBatchDetail (batchCode) {
+        window.open('/store/productDetail/' + batchCode)
+      },
+      goBrandDetail (url, event) {
+        event.stopPropagation()
+        window.open(url)
+      }
+    }
+  }
+</script>
+<style>
+  #goods-list-fragment{
+    width: 100%;
+    background: #ece9ec;
+    padding-top: 20px;
+  }
+  #goods-list-fragment .container{
+    width: 1190px;
+    padding: 0;
+  }
+
+  /*  产品分类调整*/
+  #goods-list-fragment .category-content{
+    max-height: 496px;
+    min-height: 53px;
+    overflow-y: scroll;
+    overflow-x: hidden;
+    position: relative;
+  }
+  #goods-list-fragment .category-content .empty{
+    display: block;
+    width: 56px;
+    height: 16px;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-28px, -8px);
+    color: #5e7382;
+  }
+
+  .category-content el-tree{
+    /*border: none;*/
+  }
+  .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content,.el-tree-node:hover{
+    background: none !important;
+  }
+  .el-tree-node__content:hover{
+    background: none !important;
+  }
+  .el-tree-node__content:hover span{
+    color: #3c7df3;
+  }
+  .el-tree-node__content:hover span:last-child {
+    text-decoration: underline;
+  }
+  .el-pagination .el-pager li.active{
+    background-color: #5078cb;
+    border-color: #337ab7;
+  }
+  .el-tree-node__expand-icon{
+    margin-left: 3px;
+    font-family: "iconfont" !important;
+    font-size: 14px;
+    font-style: normal;
+    -webkit-font-smoothing: antialiased;
+    width: inherit;
+    height: inherit;
+    border: inherit;
+    font-weight: bold;
+    text-shadow: -1px 0px 0 #333;
+    margin-right: 3px !important;
+  }
+  .el-tree-node__content{
+    line-height: 30px;
+    height: 30px;
+  }
+  .el-tree-node__expand-icon.is-leaf{
+    visibility: hidden;
+  }
+  .el-tree-node__expand-icon:before{
+    content: "\E621";
+  }
+  #goods-list-fragment .category-title {
+    height: 34px;
+    background-color: #3c7df5;
+    font-size: 16px;
+    color: rgb(255,255,255);
+    text-align: center;
+    border-radius: 5px;
+  }
+
+  #goods-list-fragment .category-content li {
+    line-height: 33px;
+    font-size: 14px;
+    color: #333;
+    float: left;
+    width: 100%;
+    padding-left: 10px;
+  }
+
+  #goods-list-fragment .category-content li a {
+    display: block;
+    padding-left: 15px;
+    text-decoration: none;
+    color: #333;
+    /* background:url("static/img/store/default/openblackR.png") no-repeat left; */
+  }
+
+  #goods-list-fragment .category-content li a:hover{
+    color: #5078cb;
+    cursor: pointer;
+  }
+
+  #goods-list-fragment .category-content ul.list-body {
+    display: none;
+    color: #666;
+  }
+
+  #goods-list-fragment .category-content ul.list-body.active {
+    display: block;
+  }
+
+  #goods-list-fragment .category-content ul.list-body li {
+    float: none;
+    background-image: none;
+    min-height: 26px;
+    line-height: 26px;
+    font-size: 12px;
+  }
+
+  #goods-list-fragment .category-content ul.list-body li a {
+    padding-left: 15px;
+    display: block;
+    color: rgb(50,50,50);
+    background: none;
+  }
+
+  #goods-list-fragment .category-content ul.list-body li a:hover {
+    color: #5078cb;
+    cursor: pointer;
+  }
+
+  #goods-list-fragment .category-content ul.list-body li a.cur {
+    text-decoration: none;
+    font-size: 14px;
+    /* background:url("static/img/store/default/openblackR.png") no-repeat left; */
+  }
+
+  #goods-list-fragment .title-area {
+    margin-bottom: 30px;
+    width: 250px;
+    float: left;
+    background: #fff;
+  }
+  #goods-list-fragment .category-content{
+    border: 1px solid #e8e8e8;
+  }
+  /* goods-area */
+  #goods-list-fragment .goods-area {
+    margin-left: 3px;
+    float: left;
+    margin-bottom: 30px;
+  }
+
+  #goods-list-fragment .goods-area .btn-line {
+    border-radius: 0;
+  }
+
+
+  #goods-list-fragment .btn-info.btn-line {
+    background-color: #5078CB;
+    color: #fff;
+    font-weight: 600;
+  }
+
+  #goods-list-fragment .btn-line {
+    height: 34px;
+    width: 150px;
+    border: 1px solid #5078cb;
+    background-color: #fff;
+    color: rgb(80,120,203);
+    font-weight: 600;
+  }
+
+  #goods-list-fragment .btn-line:hover {
+    background-color: #5078CB;
+    color: #fff;
+  }
+
+  /* 物品列表 */
+  #goods-list-fragment .goodslist .brand-code {
+    font-size: 14px;
+    text-align: center;
+  }
+
+  #goods-list-fragment #search_btn {
+    background: #3b7cf4;
+    color: #FFFFFF;
+    border-bottom-right-radius: 25px;
+    border-top-right-radius: 25px;
+    height: 28px;
+    width: 58px;
+    padding-right: 50px;
+  }
+
+  .btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus {
+    outline: none;
+    border-color: transparent;
+  }
+
+  #goods-list-fragment #search_input {
+    font-size: 14px;
+    height: 28px;
+    line-height: 28px;
+    width: 200px;
+    float: right;
+    border-bottom-left-radius: 25px;
+    border-top-left-radius: 25px;
+    border: 1px solid #3b7cf4;
+  }
+
+  #goods-list-fragment .brand-code .code {
+    font-weight: 600;
+  }
+  #goods-list-fragment .brand-code .brand a {
+    color: #3c7df5;
+  }
+  #goods-list-fragment .goodslist thead tr{
+    background-color: #3b7cf4;
+    height: 34px;
+  }
+  #goods-list-fragment .goodslist tr th {
+    color: #fefefe;
+    font-size: 13px;
+  }
+  #goods-list-fragment .goodslist tr th:first-child{
+    border-top-left-radius: 5px;
+    border-bottom-left-radius: 5px;
+  }
+  #goods-list-fragment .goodslist tr th:last-child{
+    border-top-right-radius: 5px;
+    border-bottom-right-radius: 5px;
+  }
+  #goods-list-fragment .goodslist tr th div{
+    text-align: center;
+    border-right: 1px solid #fff;
+  }
+  #goods-list-fragment .goodslist tr th:last-child div{
+    border-right: none;
+  }
+  #goodslist-content .goods,#goodslist-content .from, #goodslist-content .can-div-sell {
+    padding-left: 20px;
+  }
+  #goodslist-content .goods span{
+    color: #f01010;
+  }
+  #goodslist-content .amount {
+    width: 50%;
+    float: left;
+    padding-left: 50px;
+    text-align:left;
+  }
+  #goodslist-content .amount div:last-child, #goodslist-content .price div:last-child{
+    color: #f01010;
+  }
+  #goodslist-content .price {
+    width: 50%;
+    float:right;
+    text-align:left;
+  }
+  #goods-list-fragment .category-content a.selected-node,
+  #goods-list-fragment .category-content ul.list-body li a.selected-node {
+    color: #5078cb;
+  }
+
+  #goods-list-fragment .category-content a.selected-parent-node,
+  #goods-list-fragment .category-content ul.list-body li a.selected-parent-node {
+    /* background:url("static/img/store/default/openblack.png") no-repeat left; */
+  }
+  #goods-list-fragment .goodslist tbody>tr:hover{
+    background: #ecf2fd;
+  }
+  #goods-list-fragment .goodslist tbody>tr {
+    border: 1px solid #e8e8e8;
+  }
+  #goods-list-fragment .goodslist tbody>tr td.commodity-icon .img{
+    border: 1px solid #e8e8e8;
+    margin: 10px;
+    width: 80px;
+    height: 80px;
+    overflow: hidden;
+    line-height: 75px;
+  }
+  #goods-list-fragment .goodslist tbody>tr td.commodity-icon .img>img {
+    width: 80px;
+    height: 80px;
+  }
+  #goods-list-fragment .goodslist tbody>tr td.brand-code .sellout-store-commodity {
+    position: absolute;
+    right: 0;
+    bottom: 0;
+  }
+  #goods-list-fragment .goodslist tbody>tr td.brand-code .specific-price-tag {
+    position: absolute;
+    top: 0;
+    left: 0;
+  }
+  #goods-list-fragment .goodslist td {
+    font-size: 12px;
+    color: #333;
+    text-align: center;
+    line-height: 20px;
+    height: 88px;
+  }
+  #goods-list-fragment .goodslist tbody>tr td .can-div-sell {
+    color: #333;
+  }
+
+  /* 物品列表按钮 */
+  #goods-list-fragment .btn-buy-now {
+    background-color: #ffa422;
+    color: #fff;
+    width: 80px;
+    height: 30px;
+    font-size: 12px;
+    border: 1px solid #ffa422;
+  }
+
+  #goods-list-fragment .btn-add-cart {
+    margin-top: 10px;
+    color: #3b7cf4;
+    width: 80px;
+    height: 30px;
+    font-size: 12px;
+    background-color: #fff;
+    border: 1px solid #3b7cf4;
+  }
+  #goods-list-fragment .btn-buy-now:hover{
+    background: #214797;
+    border: 1px solid #214797;
+  }
+  #goods-list-fragment .btn-add-cart:hover{
+    background-color: #5078CB;
+    color: #fff;
+  }
+  .no-record{
+    font-size: 14px;
+    color: #999;
+    text-align: center;
+    line-height: 200px;
+  }
+  .no-record i{
+    margin-right: 5px;
+  }
+  .text-center{
+    text-align: center;
+    margin-top: 30px;
+  }
+  .text-center  .col-xs-2  img{
+    margin: 50px 0 50px 135px;
+    vertical-align: middle;
+  }
+  .text-center .txt-info{
+    font-size: 14px;
+    margin: 50px 0px 0px -50px;
+  }
+  .text-center  .col-xs-4  p{
+    color: #999;
+    margin-top: 3px;
+    margin-bottom: 2px;
+  }
+  .text-center  .txt-info a{
+    font-size: 14px;
+  }
+  .text-center  .col-xs-4 i{
+    color: #5078cb;
+    font-size: 14px;
+  }
+  .goodslist{
+    margin-bottom: 20px;
+  }
+
+  @font-face {
+    font-family: 'iconfont';  /* project id 357960 */
+    src: url('//at.alicdn.com/t/font_27kjyd082ezpk3xr.eot');
+    src: url('//at.alicdn.com/t/font_27kjyd082ezpk3xr.eot?#iefix') format('embedded-opentype'),
+    url('//at.alicdn.com/t/font_27kjyd082ezpk3xr.woff') format('woff'),
+    url('//at.alicdn.com/t/font_27kjyd082ezpk3xr.ttf') format('truetype'),
+    url('//at.alicdn.com/t/font_27kjyd082ezpk3xr.svg#iconfont') format('svg');
+  }
+
+  <!-- 分页 -->
+  #goods-list-fragment .el-pagination .el-pager li.active {
+    border-color: #5078cb !important;
+    background-color: #5078cb !important;
+  }
 </style>
+

+ 328 - 0
components/store/home/EnterpriseInfo.vue

@@ -0,0 +1,328 @@
+<template>
+  <div id="recommend-fragment-self">
+    <div class="recommend-product">
+      <ul>
+        <li>
+          <div>
+            <div class="information-list" v-if="storeInfo.enterprise.address" :title="storeInfo.enterprise.address">
+              <div>官网地址&nbsp;:</div><div>{{storeInfo.enterprise.address | addressFilter}}</div>
+            </div>
+            <div class="information-list" v-if="storeInfo.enterprise.enAddress" :title="storeInfo.enterprise.enAddress">
+              <div>地址&nbsp;:</div><div>{{storeInfo.enterprise.enAddress | enAddressFilter}}</div>
+            </div>
+            <div class="information-list" v-if="storeInfo.enterprise.enTel">
+              <div>电话&nbsp;:</div><div>{{storeInfo.enterprise.enTel}}</div>
+            </div>
+            <div class="information-list" v-if="storeInfo.enterprise.enFax">
+              <div>传真&nbsp;:</div><div>{{storeInfo.enterprise.enFax}}</div>
+            </div>
+            <div class="information-list">
+              <div>资质审核&nbsp;:</div><div>营业执照&nbsp;&nbsp;<img src="/images/store/home/logo-qualification.jpg"></div>
+            </div>
+            <div class="introduce">
+              <h4>企业简介</h4>
+              <p>{{storeInfo.description}}</p>
+            </div>
+          </div>
+        </li>
+        <li>
+          <div style="width: 966px; height: 356px; margin-left: 3px;">
+            <recommend-list></recommend-list>
+          </div>
+        </li>
+      </ul>
+    </div>
+    <div class="shadow"><img src="/images/store/common/shadow.png"></div>
+  </div>
+</template>
+<script>
+  import Buy from '~components/common/buyOrCar/buyComponent.vue'
+  import RecommendList from './RecommendList.vue'
+  export default {
+    name: 'product-recommend-self',
+    components: {
+      RecommendList,
+      Buy
+    },
+    computed: {
+      commodities () {
+        return this.$store.state.shop.recommend.products.data
+      },
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      }
+    },
+    filters: {
+      addressFilter: function (title) {
+        if (title === '') {
+          return title
+        }
+        let len = 0
+        let index = 0
+        for (let i = 0; i < title.length; i++) {
+          if (index === 0 && title.charAt(i).charCodeAt(0) > 255) {
+            len = len + 2
+          } else {
+            len++
+          }
+          if (len > 20) {
+            index = i
+            break
+          }
+        }
+        if (index > 0) {
+          return title.substring(0, index) + '...'
+        } else {
+          return title
+        }
+      },
+      enaddressFilter: function (title) {
+        if (title === '') {
+          return title
+        }
+        let len = 0
+        let index = 0
+        for (let i = 0; i < title.length; i++) {
+          if (index === 0 && title.charAt(i).charCodeAt(0) > 255) {
+            len = len + 2
+          } else {
+            len++
+          }
+          if (len > 50) {
+            index = i
+            break
+          }
+        }
+        if (index > 0) {
+          return title.substring(0, index) + '...'
+        } else {
+          return title
+        }
+      }
+    },
+    methods: {
+      buyNow: function (isBuy, item) {
+        if (!this.$store.state.option.user.logged) {
+          this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+            if (response.data) {
+              this.$router.push('/auth/login')
+            }
+          })
+        } else {
+          if (item) {
+            if (isBuy) {
+              this.$http.post('trade/order/buyNow', [{
+                uuid: item.comUuid,
+                batchCode: item.batchCode,
+                number: item.minBuyQty,
+                storeid: item.storeId,
+                storeUuid: item.storeUuid,
+                currencyName: item.currency,
+                minPackQty: item.minPackQty ? item.minPackQty : item.minBuyQty
+              }])
+                .then(response => {
+                  //        window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
+                  if (response.data.success) {
+                    if (response.data.message) {
+                      this.$message({
+                        message: response.data.message,
+                        type: 'success'
+                      })
+                      let _self = this
+                      window.setTimeout(function () {
+                        window.location.href = '/user#/order/pay/' + _self.enidfilter(response.data.data.orderid)
+                      }, 1000)
+                    } else {
+                      window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.data.orderid)
+                    }
+                  } else {
+                    if (response.data.data && response.data.data.unvailable === 1) {
+                      this.$message.error('产品信息已失效,请刷新界面')
+                    } else {
+                      this.$message.error(response.data.message)
+                    }
+                  }
+                }, err => {
+                  console.log(err)
+                  if (item.minBuyQty > item.reserve) {
+                    this.$message.error('商品' + item.code + '的库存已经不满足起订量')
+                  }
+                })
+            } else {
+              // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
+              this.$http.post('trade/cart/add', {
+                uuid: item.comUuid,
+                batchCode: item.batchCode,
+                number: item.minBuyQty,
+                storeid: item.storeId,
+                storeUuid: item.storeUuid,
+                currencyName: item.currency,
+                minPackQty: item.minPackQty ? item.minPackQty : item.minBuyQty
+              })
+                .then(response => {
+                  if (response.data.success) {
+                    if (response.data.message) {
+                      this.$message({
+                        message: '添加购物车成功,但商品信息有更新',
+                        type: 'success'
+                      })
+                    } else {
+                      this.$message({
+                        message: '添加购物车成功',
+                        type: 'success'
+                      })
+                    }
+                  } else {
+                    this.$message.error(response.data.message)
+                  }
+                })
+            }
+          }
+        }
+      },
+      enidfilter: function (str) {
+        if (str) {
+          let encryptStr = '' // 最终返回的加密后的字符串
+          // 产生三位随机数
+          let num = ''
+          for (let i = 0; i < 3; i++) {
+            num += Math.floor(Math.random() * 10)
+          }
+          encryptStr += num // 产生3位随机数
+
+          // 16位加密
+          let tempspit = ''
+          let strspit = str.toString().toLowerCase()
+          if (strspit.match(/^[-+]?\d*$/) === null) { // 非整数字符,对每一个字符都转换成16进制,然后拼接
+            /**
+             * Unicode汉字、英文字母、数字的unicode范围
+             *汉字:[0x4e00,0x9fa5](或十进制[19968,40869])
+             *数字:[0x30,0x39](或十进制[48, 57])
+             *小写字母:[0x61,0x7a](或十进制[97, 122])
+             *大写字母:[0x41,0x5a](或十进制[65, 90]
+             * 'a'的Unicode编码:'&#97;',charCodeAt()的值是97
+             * '码'的Unicode编码:'\u7801', new String('码').charCodeAt()的值是30721,30721的16进制表示是7801
+             */
+            let s = strspit.split('')
+            for (let i = 0; i < s.length; i++) {
+              s[i] = s[i].charCodeAt() // 先转换成Unicode编码
+              s[i] = s[i].toString(16)
+              // 因为在服务器是每两位当做一个字符进行解析的,所以这里每个字符的Unicode编码范围必须在0——255之间。数字和大小写满足该要求,特殊字符则不一定,如果后续有特殊字符的要求,需要重写编码器和解码器
+              if (s[i].length === 1) {
+                s[i] = '0' + s[i]
+              }
+              tempspit = tempspit + s[i]
+            }
+            tempspit = tempspit + '{' + 1 // 1代表字符
+          } else { // 数字直接转换成16进制
+            strspit = parseInt(strspit)
+              .toString(16)
+            tempspit = strspit + '{' + 0 // 0代表纯数字
+          }
+
+          let temp = tempspit.split('{') // 对要加密的字符转换成16进制
+          let numLength = temp[0].length // 转换后的字符长度
+          numLength = numLength.toString(16) // 字符长度换算成16进制
+          if (numLength.length === 1) { // 如果是1,补一个0
+            numLength = '0' + numLength
+          } else if (numLength.length > 3) { // 转换后的16进制字符长度如果大于2位数,则返回,不支持
+            return ''
+          }
+          encryptStr += numLength
+          if (temp[1] === '0') {
+            encryptStr += 0
+          } else if (temp[1] === '1') {
+            encryptStr += 1
+          }
+          encryptStr += temp[0]
+          if (encryptStr.length < 20) { // 如果小于20位,补上随机数
+            // 产生三位随机数
+            let numtwo = ''
+            for (let i = 0; i < 20 - encryptStr.length; i++) {
+              numtwo += Math.floor(Math.random() * 10)
+            }
+            let ran = numtwo // 产生3位随机数
+            encryptStr += ran
+          }
+          return encryptStr
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  #recommend-fragment-self {
+    min-width: 1190px;
+    background: #ece9ec;
+    margin: 0 auto;
+    margin:-18px 0px -40px 0px;
+    .recommend-product {
+      width: 1190px;
+      height: 356px;
+      margin: 0 auto;
+      ul {
+        width: 100%;
+        height: 356px;
+        /*overflow: hidden;*/
+        li {
+          position: relative;
+          float: left;
+          &:first-child {
+            width: 220px;
+            height: 356px;
+            background: #fff;
+            padding-top: 20px;
+            border-radius: 5px;
+            .information-list {
+              font-size: 12px;
+              color: #333;
+              div:first-child {
+                width: 72px;
+                text-align: right;
+                line-height: 20px;
+              }
+              div:last-child {
+                width: 158px;
+                line-height: 20px;
+                padding: 0px 10px 0px 6px;
+              }
+            }
+            .information-list > div {
+              display: table-cell;
+            }
+            .introduce {
+              width: 250px;
+              height: 188px;
+              font-size: 12px;
+              line-height: 15px;
+              color: #333;
+              h4 {
+                background: url("/images/store/home/detail1.png") no-repeat 6% 10%;
+                font-size: 14px;
+                padding: 0px 0px 5px 30px;
+              }
+              p {
+                margin: -15px 0px 0px 15px;
+                text-indent: 2em;
+                overflow-y: auto;
+                overflow-x: hidden;
+                width: 200px;
+                line-height: 19px;
+                max-height: 153px;
+              }
+            }
+          }
+        }
+      }
+    }
+    .shadow {
+      width: 1190px;
+      margin: 0 auto;
+      img {
+        position: relative;
+        top: -10px;
+      }
+    }
+  }
+
+</style>

+ 228 - 0
components/store/home/QualificationCertificate.vue

@@ -0,0 +1,228 @@
+<template>
+  <div class="brand" style="padding-top: 25px; margin-bottom: -20px;">
+    <div class="brand-content-list">
+      <ul class="list-unstyled list-inline">
+        <li class="store-box" v-for="(store, index) in storeInfo.qualifications.slice(0,5)">
+          <div><img :src="store.resourceUrl.indexOf('.pdf')>0?'/images/store/common/pdf.png':store.resourceUrl"/></div>
+          <a @click="showImg(store.resourceUrl)"><div class="Open"><i class="fa fa-search"></i>&nbsp;&nbsp;查看</div></a>
+        </li>
+      </ul>
+    </div>
+    <div class="shadow"><img src="/images/store/common/shadow.png"></div>
+    <!--查看大图 begin-->
+    <div id="image-box" v-if="isShow">
+      <div class="x-floating-wrap"></div>
+      <div class="x-floating">
+        <div id="item-content">
+          <div class="x-close-wrap" @click="isShow = false"><a href="javascript:void(0);">&times;</a></div>
+          <div class="img"><img :src="qualifications.url"/></div>
+        </div>
+      </div>
+    </div>
+    <!--查看大图 end-->
+  </div>
+</template>
+<script>
+  export default {
+    name: 'qualification-certificate',
+    data () {
+      return {
+        qualifications: {
+          url: '',
+          type: ''
+        },
+        type: 0,
+        isShow: false
+      }
+    },
+    computed: {
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      }
+    },
+    methods: {
+      showImg (imgUrl) {
+        if (imgUrl.indexOf('.pdf') === -1) {
+          this.qualifications.url = imgUrl
+          this.isShow = true
+        } else {
+          window.open(imgUrl)
+        }
+      }
+    },
+    filters: {
+      introduceFilter: function (title) {
+        if (title === '') {
+          return title
+        }
+        let len = 0
+        let index = 0
+        for (let i = 0; i < title.length; i++) {
+          if (index === 0 && title.charAt(i).charCodeAt(0) > 255) {
+            len = len + 2
+          } else {
+            len++
+          }
+          if (len > 240) {
+            index = i
+            break
+          }
+        }
+        if (index > 0) {
+          return title.substring(0, index) + '...'
+        } else {
+          return title
+        }
+      }
+    }
+  }
+</script>
+<style  lang="scss" scoped>
+  /*查看大图*/
+  #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: -350px;
+    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;
+  }
+  /*查看大图结束*/
+  .brand-content-list{
+    width: 1190px;
+    background: #fff;
+    margin: 0 auto;
+    margin-top: -50px;
+    padding-left: 18px;
+    .list-inline {
+      width: 100%;
+      height: 264px;
+      margin: 0 auto;
+      .store-box {
+        width: 158px;
+        height: 200px;
+        text-align: center;
+        vertical-align: middle;
+        margin: 32px 0px 0px 40px;
+        position: relative;
+        &:hover{
+          div:last-child {
+            display: block;
+          }
+        }
+        &:first-child {
+          margin-left:112px;
+        }
+        div:first-child {
+          img {
+            margin-left: -3px;
+            width: 156px;
+            height: 200px;
+            border: 1px solid #edf0f4;
+          }
+        }
+        div:last-child {
+          width: 176px;
+          height: 218px;
+          line-height: 218px;
+          background: #6b6b6b;
+          opacity: 0.5;
+          position: absolute;
+          top: -9px;
+          left: -9px;
+          display: none;
+          color: #fff;
+          span{
+            color: #fff;
+            &:first-child{
+              margin-top: 30px;
+            }
+          }
+        }
+      }
+    }
+  }
+  .shadow{
+    width: 1190px;
+    margin: 0 auto;
+    img{
+      position: relative;
+      top: -10px;
+    }
+  }
+</style>

+ 429 - 0
components/store/home/RecommendList.vue

@@ -0,0 +1,429 @@
+<template>
+  <div class="recommend-fragment">
+     <ul class="recommend-list">
+        <li v-for="commodity in commodities" :class="[ isConsignment ? 'small' : 'big']">
+          <a :href="commodity.batchCode ? '/store/productDetail/'+ commodity.batchCode : '#'" class="href">
+            <div class="img">
+              <img :src="commodity.comImg.startsWith('static')?'/'+commodity.comImg:commodity.comImg"/>
+            </div>
+            <div class="content">
+              <p>{{commodity.comCode | comCodeFilter}}</p>
+             <!-- <p class="color666" v-text="commodity.brandNameCn">PANFAEFQ</p>-->
+              <p class="price" v-if="commodity.minPriceRMB">¥ {{commodity.minPriceRMB | currency}}</p>
+             <!-- <p class="price" v-if="!commodity.minPriceRMB">$ {{commodity.minPriceUSD || 0}}</p>-->
+            </div>
+          </a>
+          <div class="enter-store">
+            <a @click="buyNow(false, commodity)">加入购物车</a>
+            <a @click="buyNow(true, commodity)">立即购买</a>
+          </div>
+          <!--<div class="hover-show" :href="commodity.batchCode ? '/store/' + storeInfo.uuid + '/' + commodity.batchCode : '#'">
+            <a :href="commodity.batchCode ? '/store/' + storeInfo.uuid + '/' + commodity.batchCode : '#'" class="href">
+              <div class="title" v-text="commodity.comCode">MRFE6S9045NF001</div>
+              <div class="type" v-text="commodity.brandNameCn">PANFAEFQ</div>
+              <div class="hr"><span>抢购价</span></div>
+              <div class="price" v-if="commodity.minPriceRMB">¥ {{commodity.minPriceRMB}}</div>
+              <div class="price" v-if="!commodity.minPriceRMB">$ {{commodity.minPriceUSD || 0}}</div>
+            </a>
+            <div class="by-cart"><button title="加入购物车" @click="buyNow(false, commodity)"><img src="/images/store/icon/cart-blue.png"/></button></div>
+            <div class="buy-now"><button title="立即购买" @click="buyNow(true, commodity)">立即购买</button></div>
+          </div>-->
+        </li>
+        <li v-if="!commodities || commodities.length === 0" class="empty-show">
+         <div class="empty">
+           <div class="empty-img">
+             <img src="/images/brandList/empty-cart.jpg">
+           </div>
+           <div class="empty-info">
+             <p class="grey f16"> 暂无产品信息,赶快上传让更多人看到你的产品吧 </p>
+             <img src="/images/brandList/upload.png">&nbsp;<a href="/vendor#/vendor_upload?type=company">马上去上传</a>
+           </div>
+         </div>
+       </li>
+      </ul>
+  </div>
+</template>
+<script>
+  import Buy from '~components/common/buyOrCar/buyComponent.vue'
+  import NuxtLink from '../../../.nuxt/components/nuxt-link'
+  export default {
+    name: 'recommend-product',
+    components: {
+      NuxtLink,
+      Buy
+    },
+    computed: {
+      commodities () {
+        return this.$store.state.shop.recommend.products.data
+      },
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      },
+      isConsignment () {
+        return this.storeInfo.type === 'CONSIGNMENT'
+      }
+    },
+    filters: {
+      comCodeFilter: function (title) {
+        if (title === '') {
+          return title
+        }
+        let len = 0
+        let index = 0
+        for (let i = 0; i < title.length; i++) {
+          if (index === 0 && title.charAt(i).charCodeAt(0) > 255) {
+            len = len + 2
+          } else {
+            len++
+          }
+          if (len > 18) {
+            index = i
+            break
+          }
+        }
+        if (index > 0) {
+          return title.substring(0, index) + '...'
+        } else {
+          return title
+        }
+      },
+      currency: function (num) {
+        if (typeof num === 'number') {
+          if (num <= 0.000001) {
+            num = 0.000001
+          } else {
+            if (num.toString().indexOf('.') === -1) {
+              num += '.00'
+            } else {
+              let inputStr = num.toString()
+              let arr = inputStr.split('.')
+              let floatNum = arr[1]
+              if (floatNum.length > 6) {
+                num = inputStr.substring(0, arr[0].length + 7)
+                if (Number(floatNum.charAt(6)) > 4) {
+                  num = (Number(num) * 1000000 + 1) / 1000000
+                }
+              } else if (floatNum.length === 1) {
+                num = num + '0'
+              }
+            }
+          }
+        }
+        return num
+      }
+    },
+    methods: {
+      buyNow: function (isBuy, item) {
+        if (!this.$store.state.option.user.logged) {
+          this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+            if (response.data) {
+              this.$router.push('/auth/login')
+            }
+          })
+        } else {
+          if (item) {
+            if (isBuy) {
+              this.$http.post('trade/order/buyNow', [{
+                uuid: item.comUuid,
+                batchCode: item.batchCode,
+                number: item.minBuyQty,
+                storeid: item.storeId,
+                storeUuid: item.storeUuid,
+                currencyName: item.currency,
+                minPackQty: item.minPackQty ? item.minPackQty : item.minBuyQty
+              }])
+                .then(response => {
+                  //        window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
+                  if (response.data.success) {
+                    if (response.data.message) {
+                      this.$message({
+                        message: response.data.message,
+                        type: 'success'
+                      })
+                      let _self = this
+                      window.setTimeout(function () {
+                        window.location.href = '/user#/order/pay/' + _self.enidfilter(response.data.data.orderid)
+                      }, 1000)
+                    } else {
+                      window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.data.orderid)
+                    }
+                  } else {
+                    if (response.data.data && response.data.data.unvailable === 1) {
+                      this.$message.error('产品信息已失效,请刷新界面')
+                    } else {
+                      this.$message.error(response.data.message)
+                    }
+                  }
+                }, err => {
+                  console.log(err)
+                  if (item.minBuyQty > item.reserve) {
+                    this.$message.error('商品' + item.code + '的库存已经不满足起订量')
+                  }
+                })
+            } else {
+              // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
+              this.$http.post('trade/cart/add', {
+                uuid: item.comUuid,
+                batchCode: item.batchCode,
+                number: item.minBuyQty,
+                storeid: item.storeId,
+                storeUuid: item.storeUuid,
+                currencyName: item.currency,
+                minPackQty: item.minPackQty ? item.minPackQty : item.minBuyQty
+              })
+                .then(response => {
+                  if (response.data.success) {
+                    if (response.data.message) {
+                      this.$message({
+                        message: '添加购物车成功,但商品信息有更新',
+                        type: 'success'
+                      })
+                    } else {
+                      this.$message({
+                        message: '添加购物车成功',
+                        type: 'success'
+                      })
+                    }
+                  } else {
+                    this.$message.error(response.data.message)
+                  }
+                })
+            }
+          }
+        }
+      },
+      enidfilter: function (str) {
+        if (str) {
+          let encryptStr = '' // 最终返回的加密后的字符串
+          // 产生三位随机数
+          let num = ''
+          for (let i = 0; i < 3; i++) {
+            num += Math.floor(Math.random() * 10)
+          }
+          encryptStr += num // 产生3位随机数
+
+          // 16位加密
+          let tempspit = ''
+          let strspit = str.toString().toLowerCase()
+          if (strspit.match(/^[-+]?\d*$/) === null) { // 非整数字符,对每一个字符都转换成16进制,然后拼接
+            /**
+             * Unicode汉字、英文字母、数字的unicode范围
+             *汉字:[0x4e00,0x9fa5](或十进制[19968,40869])
+             *数字:[0x30,0x39](或十进制[48, 57])
+             *小写字母:[0x61,0x7a](或十进制[97, 122])
+             *大写字母:[0x41,0x5a](或十进制[65, 90]
+             * 'a'的Unicode编码:'&#97;',charCodeAt()的值是97
+             * '码'的Unicode编码:'\u7801', new String('码').charCodeAt()的值是30721,30721的16进制表示是7801
+             */
+            let s = strspit.split('')
+            for (let i = 0; i < s.length; i++) {
+              s[i] = s[i].charCodeAt() // 先转换成Unicode编码
+              s[i] = s[i].toString(16)
+              // 因为在服务器是每两位当做一个字符进行解析的,所以这里每个字符的Unicode编码范围必须在0——255之间。数字和大小写满足该要求,特殊字符则不一定,如果后续有特殊字符的要求,需要重写编码器和解码器
+              if (s[i].length === 1) {
+                s[i] = '0' + s[i]
+              }
+              tempspit = tempspit + s[i]
+            }
+            tempspit = tempspit + '{' + 1 // 1代表字符
+          } else { // 数字直接转换成16进制
+            strspit = parseInt(strspit)
+              .toString(16)
+            tempspit = strspit + '{' + 0 // 0代表纯数字
+          }
+
+          let temp = tempspit.split('{') // 对要加密的字符转换成16进制
+          let numLength = temp[0].length // 转换后的字符长度
+          numLength = numLength.toString(16) // 字符长度换算成16进制
+          if (numLength.length === 1) { // 如果是1,补一个0
+            numLength = '0' + numLength
+          } else if (numLength.length > 3) { // 转换后的16进制字符长度如果大于2位数,则返回,不支持
+            return ''
+          }
+          encryptStr += numLength
+          if (temp[1] === '0') {
+            encryptStr += 0
+          } else if (temp[1] === '1') {
+            encryptStr += 1
+          }
+          encryptStr += temp[0]
+          if (encryptStr.length < 20) { // 如果小于20位,补上随机数
+            // 产生三位随机数
+            let numtwo = ''
+            for (let i = 0; i < 20 - encryptStr.length; i++) {
+              numtwo += Math.floor(Math.random() * 10)
+            }
+            let ran = numtwo // 产生3位随机数
+            encryptStr += ran
+          }
+          return encryptStr
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .recommend-fragment {
+    width: 100%;
+  }
+  .recommend-fragment ul{
+    width: 100%;
+    height: 356px;
+    background: #fff;
+   /* display: inline-block;*/
+    -webkit-padding-start: 0;
+    border-radius: 5px;
+    padding-left: 2px;
+  }
+  .recommend-fragment ul li
+    .img{
+      height: 90px;
+      text-align: center;
+      line-height: 90px;
+      img{
+        max-width: 80px;
+        max-height: 80px;
+      }
+  }
+  .recommend-fragment ul li .content{
+    width: 100%;
+    margin: 0 auto;
+    font-size: 12px;
+    p{
+      width: 100%;
+      text-align: center;
+      display: inline-block;
+      line-height: 22px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      margin-bottom: 0;
+      padding-left: 10px;
+      color: #666;
+      &.price{
+        color: #ff002e;
+      }
+    }
+  }
+ .recommend-fragment ul li .enter-store {
+    position: absolute;
+    top: 178px;
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    text-align: left;
+  }
+  .recommend-fragment ul li.small .enter-store a {
+    width: 74px;
+    height: 24px;
+    display: inline-block;
+    line-height: 24px;
+    text-align: center;
+    font-size: 13px;
+    margin-left: 11px;
+    border-radius: 3px;
+    &:first-child {
+      background-color: #ff9000;
+      border: 1px solid #ff9000;
+      color: #fff;
+    }
+    &:last-child {
+      background-color: #be0606;
+      border: 1px solid #be0606;
+      color: #fff;
+    }
+  }
+  .recommend-fragment ul li.big .enter-store a {
+    width: 74px;
+    height: 24px;
+    display: inline-block;
+    line-height: 24px;
+    text-align: center;
+    font-size: 13px;
+    margin-left: 14px;
+    border-radius: 3px;
+    &:first-child {
+      background-color: #ff9000;
+      border: 1px solid #ff9000;
+      color: #fff;
+    }
+    &:last-child {
+      background-color: #be0606;
+      border: 1px solid #be0606;
+      color: #fff;
+    }
+  }
+  .recommend-fragment ul li.small {
+    float: left;
+    width: 180px;
+    height: 174px;
+    position: relative;
+    overflow: hidden;
+    margin: 2px 8px 0px 0px;
+    &:nth-child(5n){
+      margin: 2px 0px 0px 0px;
+    }
+    &:hover {
+      box-shadow: 2px 0px 1px #d9d9d9, -2px 0px 1px #d9d9d9, 0px 2px 1px #d9d9d9, 0px -2px 1px #d9d9d9;
+      .enter-store {
+        top: 140px;
+        left: 0px;
+        transition: all .5s;
+      }
+      .img, .content{
+        transform:translate(0px,-10px);
+        -ms-transform:translate(0px,-10px); /* IE 9 */
+        -webkit-transform:translate(0px,-10px); /* Safari and Chrome */
+      }
+    }
+  }
+  .recommend-fragment ul li.big {
+    float: left;
+    width: 190px;
+    height: 174px;
+    position: relative;
+    overflow: hidden;
+    margin: 2px 1px 0px 0px;
+    &:hover {
+      box-shadow: 2px 0px 1px #d9d9d9, -2px 0px 1px #d9d9d9, 0px 2px 1px #d9d9d9, 0px -2px 1px #d9d9d9;
+      .enter-store {
+        top: 140px;
+        left: 0px;
+        transition: all .5s;
+      }
+      .img, .content{
+        transform:translate(0px,-10px);
+        -ms-transform:translate(0px,-10px); /* IE 9 */
+        -webkit-transform:translate(0px,-10px); /* Safari and Chrome */
+      }
+    }
+  }
+  .recommend-fragment ul li.empty-show {
+    width: 100%;
+    height: 356px;
+    padding-top: 150px;
+    &:hover{
+      box-shadow: 0px 0px 0px transparent;
+    }
+    .empty{
+      margin: 0 auto;
+      width: 380px;
+      .empty-img{
+        float: left;
+      }
+      .empty-info{
+        float: left;
+        margin: 5px 0px 0px 20px;
+        .grey{
+          color: #999;
+          font-size: 14px;
+        }
+        a{
+          font-size: 14px;
+          color: #5078cb;
+        }
+
+      }
+    }
+  }
+</style>

+ 304 - 0
components/store/home/StoreTitle.vue

@@ -0,0 +1,304 @@
+<template>
+  <div class="container" id="title-fragment">
+    <div class="container">
+      <div class="row" style="margin-bottom: 20px;">
+        <!-- 商标展示 -->
+        <div class="logo" v-if="storeInfo.type == 'AGENCY'">代理商</div>
+        <div class="logo" v-if="storeInfo.type == 'DISTRIBUTION'">经销商</div>
+        <div class="logo">代理商</div>
+        <div class="shop-logo">
+          <img :src="storeInfo.logoUrl || '/images/store/common/default.png'" />
+         <!-- <p id="shop-title" v-if="storeInfo.storeShortName" v-text="storeInfo.storeShortName">店铺名称</p>-->
+          <p id="shop-name" v-if="storeInfo.storeShortName">{{storeInfo.storeShortName | nameFilter}}</p>
+          <div class="enter-store">
+            <a @click="focus(storeInfo.id, storeInfo.storeName)">关注店铺</a>
+            <a @click="goWebChat()">联系卖家</a>
+          </div>
+        </div>
+        <!-- 店名展示 -->
+        <div class="shop-banner">
+          <img :src="storeInfo.bannerUrl || '/images/store/default/shop_banner.png'">
+         <!-- <div id="shop-title" v-if="storeInfo.storeShortName" v-text="storeInfo.storeShortName">店铺名称</div>-->
+        </div>
+      </div>
+      <el-dialog
+        :visible.sync="dialogVisible"
+        size="tiny"
+      >
+        <h3 class="header-text">关注成功!</h3>
+        <div class="focus modal-body">
+          <button type="button" @click="dialogVisible = false" class="btn" style="margin-left:25px;">关&nbsp;&nbsp;闭</button>
+          <button type="button" @click="dialogVisible = false" class="focus-btn btn btn btn-info" style="margin-left:35px;">
+            <a href="/user#/storeFocus" target="_blank">查看我的店铺关注</a>
+          </button>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  name: 'store-title',
+  data () {
+    return {
+      dialogVisible: false
+    }
+  },
+  methods: {
+    focus (id, name) {
+      if (!this.user.logged) {
+        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+          if (response.data) {
+            this.$router.push('/auth/login')
+          }
+        })
+      } else {
+        this.dialogVisible = true
+        this.$store.dispatch('shop/StoreFocus', {storeName: name, storeid: id})
+      }
+    },
+    goWebChat: function () {
+      if (!this.user.logged) {
+        this.$http.get('/login/page').then(response => {
+          if (response.data) {
+            this.$router.push('/auth/login')
+          }
+        })
+      } else {
+        // 获得窗口的垂直位置
+        let iTop = (window.screen.availHeight - 30 - 780) / 2
+        // 获得窗口的水平位置
+        let iLeft = (window.screen.availWidth - 10 - 1030) / 2
+        if (this.tab.close) {
+          this.tab.close()
+        }
+        let newTab = window.open('', '即时对话框', 'height=750, width=1000, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
+        newTab.close()
+        newTab = window.open('', '即时对话框', 'height=750, width=1000, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
+        this.$store.dispatch('chat/setChatTab', {tab: newTab})
+        this.$http.get('/basic/enterprise/' + this.storeInfo.enUU + '/info')
+          .then(response => {
+            let obj = {}
+            obj.userPhone = this.user.data.userTel
+            obj.userType = 'ENTERPRISE'
+            this.user.data.enterprises.forEach(function (item, index) {
+              if (item.current) {
+                obj.enUU = item.uu
+                obj.enterprise = {enUU: item.uu, name: item.enName}
+              }
+            })
+            obj.otherEnUU = response.data.uu
+            obj.otherUserType = 'STORE'
+            obj.otherEnterprise = {enUU: response.data.uu, name: response.data.enName}
+            obj.type = 'CHAT'
+            if (!(/^1\d{10}$/).test(response.data.enTel)) {
+              this.$http.get('/basic/enterprise/' + response.data.uu + '/admin').then(response => {
+                console.log(response)
+                obj.toPhone = response.data.userTel
+                console.log(obj)
+                this.openWebChat(newTab, obj)
+              }, err => {
+                console.log(err)
+                this.$message.error('暂无卖家管理员手机号!')
+              })
+            } else {
+              obj.toPhone = response.data.enTel
+              console.log(obj)
+              this.openWebChat(newTab, obj)
+            }
+          }, err => {
+            console.log(err)
+          })
+      }
+    },
+    openWebChat: function (newTab, obj) {
+      this.$http.post('https://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
+        .then(response => {
+          if (response.data.success) {
+            newTab.location.href = 'https://im.ubtob.com/chat/visit?gid=' + response.data.content
+          }
+        })
+    }
+  },
+  filters: {
+    nameFilter: function (title) {
+      if (title === '') {
+        return title
+      }
+      let len = 0
+      let index = 0
+      for (let i = 0; i < title.length; i++) {
+        if (index === 0 && title.charAt(i).charCodeAt(0) > 255) {
+          len = len + 2
+        } else {
+          len++
+        }
+        if (len > 24) {
+          index = i
+          break
+        }
+      }
+      if (index > 0) {
+        return title.substring(0, index) + '...'
+      } else {
+        return title
+      }
+    },
+    date: function (input) {
+      const d = new Date(input)
+      const year = d.getFullYear()
+      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
+    }
+  },
+  computed: {
+    storeInfo () {
+      return this.$store.state.shop.storeInfo.store.data
+    },
+    isConsignment () {
+      return this.storeInfo.type === 'CONSIGNMENT'
+    },
+    tab () {
+      return this.$store.state.chat.tab.tab.data
+    },
+    user () {
+      return this.$store.state.option.user
+    }
+  }
+}
+</script>
+<style lang="scss">
+  .header-text {
+    text-align: center;
+    font-size: 20px;
+    color: #008B00;
+    margin-top: 0;
+  }
+  .el-dialog__wrapper .el-dialog--tiny {
+    width: 320px !important;
+  }
+  .el-dialog__body {
+    padding: 14px !important;
+  }
+  .focus button.focus-btn a{
+    color: #fff;
+    width: 100%;
+    height: 100%;
+    display: inline-block;
+  }
+  .focus button.focus-btn{
+    width: 138px;
+    height: 36px;
+    line-height: 36px;
+    padding: 0;
+  }
+  #title-fragment {
+		padding: 0;
+	}
+	#title-fragment .container {
+		width: 1190px;
+		padding-left: 0px;
+		padding-right: 0px;
+	}
+	#title-fragment .container >.row {
+		margin-left: 0px;
+		margin-right: 0px;
+    position: relative;
+    background: #fff;
+	}
+  .logo{
+    width: 28px;
+    padding-right: 3px;
+    height: 60px;
+    text-align: center;
+    line-height: 15px;
+    position: absolute;
+    top: 13px;
+    left: 10px;
+    color: #fff;
+    margin-top: -20px;
+    background: url('/images/store/home/logo-type.png') no-repeat;
+    z-index: 100;
+    padding-top: 3px;
+  }
+	#title-fragment .shop-logo {
+		width: 220px;
+		height: 220px;
+		border: 1px solid #e8e8e8;
+		float: left;
+		text-align: center;
+		line-height: 210px;
+		overflow: hidden;
+    position: relative;
+    #shop-name{
+      height: 40px;
+      line-height: 40px;
+      margin-top: -90px;
+      width: 100%;
+    }
+    .enter-store {
+      width: 100%;
+      height: 30px;
+      line-height: 30px;
+      text-align: left;
+      margin-top: -10px;
+      padding-left: 20px;
+      a {
+        width: 70px;
+        height: 24px;
+        display: inline-block;
+        line-height: 22px;
+        text-align: center;
+        font-size: 13px;
+        margin-left: 12px;
+        border-radius: 3px;
+        &:first-child {
+          background: #bd0505;
+          border: 1px solid #bd0505;
+          color: #fff;
+        }
+        &:last-child {
+          background: #3c7cf7;
+          border: 1px solid #3c7cf7;
+          color: #fff;
+        }
+      }
+    }
+	}
+	#title-fragment .shop-logo img {
+		width: 80%;
+		height: 60px;
+    margin-top: -30px;
+	}
+
+	#title-fragment .shop-banner {
+		float: left;
+		position: relative;
+		width: 970px;
+		height: 220px;
+		border: 1px solid #e8e8e8;
+		border-left: none;
+		overflow: hidden;
+	}
+
+	#title-fragment .shop-banner img {
+		width: 970px;
+		height: 220px;
+	}
+
+	#title-fragment .shop-banner #shop-title {
+		position: absolute;
+		top: 50px;
+		left: 60px;
+		font-size: 30px;
+		color: rgb(255,255,255);
+	}
+	.container{
+		width: 1190px;
+		padding: 0;
+	}
+</style>

+ 6 - 3
components/store/index.js

@@ -1,9 +1,12 @@
 import StoreHeader from './common/StoreHeader.vue'
-import StoreTitle from './common/StoreTitle.vue'
+import StoreTitle1 from './common/StoreTitle1.vue'
 import BaseInfo from './BaseInfo.vue'
 import ComponentInfo from './ComponentInfo.vue'
 import CommodityInfo from './CommodityInfo.vue'
-import CommodityList from './CommodityList.vue'
+import CommodityList from './home/CommodityList.vue'
 import RecommendProduct from './RecommendProduct.vue'
+import Certificate from './home/Certificate.vue'
+import EnterpriseInfo from './home/EnterpriseInfo.vue'
+import StoreTitle from './home/StoreTitle.vue'
 
-export { StoreHeader, StoreTitle, BaseInfo, ComponentInfo, CommodityInfo, CommodityList, RecommendProduct }
+export {StoreHeader, StoreTitle1, BaseInfo, ComponentInfo, CommodityInfo, CommodityList, RecommendProduct, Certificate, EnterpriseInfo, StoreTitle}

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

@@ -1,6 +1,6 @@
-<template>
+<!--<template>
   <div class="container">
-    <div v-if="storeInfoStore.id">
+    <div v-if="!storeInfoStore.id">
       <recommend-product/>
       <commodity-list :kinds="kinds"/>
     </div>
@@ -55,6 +55,65 @@ export default {
   }
 }
 </script>
+<style>
+  #nav_fragment .el-dialog__wrapper .el-dialog&#45;&#45;tiny{
+    width: 320px !important;
+  }
+  #nav_fragment .el-dialog__wrapper .el-dialog__body{
+    padding: 14px !important;
+  }
+</style>-->
+<template>
+  <div>
+      <div class="store-title">
+        <store-title class="store-title"></store-title>
+      </div>
+      <enterprise-info></enterprise-info>
+      <certificate></certificate>
+      <commodity-list :kinds="kinds"/>
+  </div>
+</template>
+<script>
+  import axios from '~plugins/axios'
+  import { CommodityList, Certificate, EnterpriseInfo, StoreTitle } from '~components/store'
+  export default {
+    layout: 'main',
+    data () {
+      return {
+        uuid: this.$route.params.uuid
+      }
+    },
+    computed: {
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      },
+      isConsignment () {
+        return this.storeInfo.type === 'CONSIGNMENT'
+      }
+    },
+    fetch ({ store, params }) {
+      return Promise.all([
+        store.dispatch('shop/findStoreInfoFromUuid', params),
+        store.dispatch('shop/findRecommendProducts', params),
+        store.dispatch('shop/pageCommoditiesOfStore', params.uuid, { page: 1, count: 6 })
+      ])
+    },
+    async asyncData ({ params }) {
+//  asyncData ({ params }) {
+      let { data } = await axios.get('/api/commodity/components/kinds', { params: { StoreUuid: params.uuid } })
+//    axios.get('/api/commodity/components/kinds', { params: { StoreUuid: params.uuid } })
+//      .then(response => {
+      return { kinds: data }
+//      })
+    },
+    components: {
+      Certificate,
+      CommodityList,
+      EnterpriseInfo,
+      StoreTitle
+    }
+  }
+</script>
 <style>
   #nav_fragment .el-dialog__wrapper .el-dialog--tiny{
     width: 320px !important;
@@ -62,4 +121,9 @@ export default {
   #nav_fragment .el-dialog__wrapper .el-dialog__body{
     padding: 14px !important;
   }
+  .store-title{
+    min-width: 1190px;
+    background: #ece9ec;
+    padding-top: 20px;
+  }
 </style>

BIN
static/images/store/common/shadow.png


BIN
static/images/store/home/logo-qualification.jpg


BIN
static/images/store/home/logo-type.png