Browse Source

Merge branch 'hotfix-0625-yc'

yangc 7 years ago
parent
commit
cbc0cb929a

+ 2 - 1
components/main/Nav.vue

@@ -78,7 +78,8 @@
     },
     methods: {
       open (url) {
-        window.open(url)
+//        window.open(url)
+        this.$router.push(url)
       }
     }
   }

+ 26 - 21
components/store/home/CommodityList.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="goods-list-fragment">
     <div class="container">
-      <div style="margin-bottom: 15px;width: 100%;">
+      <div style="margin: 15px 0;width: 100%;padding-right: 10px;">
         <div class="input-group">
           <input type="search" class="form-control" id="search_input" title="code" placeholder="型号/品牌"
                  v-model="searchCode" @search="goodsSearch(searchCode)"/>
@@ -13,24 +13,24 @@
           </span>
         </div>
       </div>
-      <div class="title-area">
+      <!--<div class="title-area">
         <div class="category-title">
           <span style="line-height: 34px;">产品分类</span>
         </div>
         <div class="category-content">
           <el-tree :data="data1" :props="defaultProps" accordion :highlight-current="true" @current-change="handlerCurrentNode" :default-expanded-keys="[0]" node-key="id" @node-collapse="onNodeCollapse">
-           <!--<span class="custom-tree-node" slot-scope="{ node, data }">-->
-             <!--<span>{{ node.nameCn }}</span>-->
-             <!--<span>{{ node.count }}</span>-->
-           <!--</span>-->
+           &lt;!&ndash;<span class="custom-tree-node" slot-scope="{ node, data }">&ndash;&gt;
+             &lt;!&ndash;<span>{{ node.nameCn }}</span>&ndash;&gt;
+             &lt;!&ndash;<span>{{ node.count }}</span>&ndash;&gt;
+           &lt;!&ndash;</span>&ndash;&gt;
           </el-tree>
-          <!--<span class="empty" v-if="!kinds[0].children || !kinds[0].children.length">暂无数据</span>-->
+          &lt;!&ndash;<span class="empty" v-if="!kinds[0].children || !kinds[0].children.length">暂无数据</span>&ndash;&gt;
         </div>
-      </div>
+      </div>-->
       <!-- 产品列表 -->
       <div class="goods-area">
         <!-- 列表展示 -->
-        <table class="goodslist" style="width: 936px;background:#fff;" >
+        <table class="goodslist" style="width: 965px;background:#fff;" >
           <thead>
           <tr>
             <th width="189"><div>品牌/物料名称(类目)</div></th>
@@ -140,7 +140,7 @@
           所有报价、库存信息的真实性及准确性均由店铺负责,如有疑问请点击
           <a @click="goLink" class="link-seller">联系卖家</a>
         </div>
-        <div style="float: right;">
+        <div style="float: right;margin-right: 12px;">
           <page :total="commodities.totalElements" :page-size="pageParams.count"
                 :current="pageParams.page" @childEvent="handleCurrentChange"></page>
         </div>
@@ -183,7 +183,6 @@
       LinkSalerBox
     },
     data () {
-      const data = this.kinds
       return {
         defaultProps: {
           children: 'children',
@@ -197,8 +196,7 @@
         parentKindId: 0,
         ids: null,
         showLinkBox: false,
-        tel: '',
-        data1: JSON.parse(JSON.stringify(data))
+        tel: ''
       }
     },
     filters: {
@@ -271,9 +269,11 @@
     watch: {
        kinds: {
          handler: function (val) {
-           val.forEach((item) => {
-             this.KindsNameChange(item)
-           })
+           if (val) {
+             val.forEach((item) => {
+               this.KindsNameChange(item)
+             })
+           }
          },
          immediate: true
        }
@@ -394,11 +394,13 @@
   #goods-list-fragment{
     width: 100%;
     background: #ece9ec;
-    padding-top: 20px;
+    /*padding-top: 20px;*/
   }
   #goods-list-fragment .container{
-    width: 1190px;
+    width: 965px;
     padding: 0;
+    /*height: 738px;*/
+    background: #fff;
   }
 
   /*  产品分类调整*/
@@ -539,9 +541,11 @@
   }
   /* goods-area */
   #goods-list-fragment .goods-area {
-    margin-left: 3px;
+    /*margin-left: 3px;*/
     float: left;
-    margin-bottom: 30px;
+    /*margin-bottom: 30px;*/
+    background: #fff;
+    margin: 0 auto 24px;
   }
 
   #goods-list-fragment .goods-area .btn-line {
@@ -779,11 +783,12 @@
     margin-left: -235px;
   }
   .goodslist{
-    margin-bottom: 20px;
+    margin-bottom: 24px;
   }
   .remind-area {
     font-size: 12px;
     color: #666;
+    padding-left: 12px;
   }
   .remind-area img {
     margin-right: 12px;

+ 22 - 25
components/store/home/EnterpriseInfo.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="recommend-fragment-self">
     <div class="recommend-product">
-      <ul>
+      <ul class="main-list clearfix">
         <li>
           <div>
             <div class="information-list">
@@ -37,26 +37,34 @@
               <p v-if="storeInfo.enterprise.description">{{storeInfo.enterprise.description}}</p>
               <p v-else class="empty-introduce">暂无简介</p>
             </div>
+            <div class="introduce">
+              <h4>资质证明</h4>
+              <qualification-certificate></qualification-certificate>
+            </div>
           </div>
         </li>
         <li>
-          <div style="width: 966px; height: 356px; margin-left: 3px;">
-            <recommend-list></recommend-list>
+          <div style="width: 966px; margin-left: 3px;">
+            <!--<recommend-list></recommend-list>-->
+            <commodity-list></commodity-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'
+//  import RecommendList from './RecommendList.vue'
+  import CommodityList from './CommodityList.vue'
+  import QualificationCertificate from './QualificationCertificate.vue'
   export default {
     name: 'product-recommend-self',
     components: {
-      RecommendList,
-      Buy
+//      RecommendList,
+      Buy,
+      CommodityList,
+      QualificationCertificate
     },
     computed: {
       commodities () {
@@ -245,22 +253,19 @@
   #recommend-fragment-self {
     min-width: 1190px;
     background: #ece9ec;
-    margin: 0 auto;
-    margin:-18px 0px -40px 0px;
+    margin:-18px 0px 0 0px;
     .recommend-product {
       width: 1190px;
-      height: 356px;
       margin: 0 auto;
-      ul {
+      .main-list {
         width: 100%;
-        height: 356px;
         /*overflow: hidden;*/
-        li {
+        > li {
           position: relative;
           float: left;
           &:first-child {
-            width: 220px;
-            height: 356px;
+            width: 218px;
+            /*height: 356px;*/
             background: #fff;
             padding-top: 20px;
             border-radius: 5px;
@@ -282,8 +287,8 @@
               display: table-cell;
             }
             .introduce {
-              width: 250px;
-              height: 188px;
+              width: 100%;
+              min-height: 188px;
               font-size: 12px;
               line-height: 15px;
               color: #333;
@@ -314,14 +319,6 @@
         }
       }
     }
-    .shadow {
-      width: 1190px;
-      margin: 0 auto;
-      img {
-        position: relative;
-        top: -10px;
-      }
-    }
   }
 
 </style>

+ 19 - 14
components/store/home/QualificationCertificate.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="brand" style="padding-top: 25px; margin-bottom: -20px;">
+  <div>
     <div class="brand-content-list">
       <ul class="list-unstyled list-inline">
         <li class="store-box"  v-if="storeInfo.qualifications || storeInfo.qualifications.length !== 0" v-for="(store, index) in storeInfo.qualifications.slice(0,5)">
@@ -8,10 +8,10 @@
         </li>
         <li class="active-empty" v-if="!storeInfo.qualifications || storeInfo.qualifications.length == 0">
           <div class="text-center">
-            <div class="col-xs-offset-3 col-xs-2">
+            <div>
               <img src="/images/brandList/empty-cart.jpg">
             </div>
-            <div class="col-xs-4 txt-info">
+            <div class="txt-info">
               <p class="grey f16"> 暂无资质证明</p>
                <i class="iconfont" v-if="emptyShow === false">&#xe610;</i>&nbsp;<a href="/" v-if="emptyShow === false">返回首页</a>
                <img v-if="emptyShow === true" src="/images/brandList/upload.png">&nbsp;<a v-if="emptyShow === true" href="/vendor#/store/maintain" target="_blank">马上去上传</a>
@@ -20,7 +20,7 @@
         </li>
       </ul>
     </div>
-    <div class="shadow"><img src="/images/store/common/shadow.png"></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>
@@ -196,30 +196,35 @@
   }
   /*查看大图结束*/
   .brand-content-list{
-    width: 1190px;
+    /*width: 1190px;*/
     background: #fff;
-    margin: 0 auto;
+ /*   margin: 0 auto;
     margin-top: -50px;
-    padding-left: 18px;
+    padding-left: 18px;*/
+    width: 100%;
     .list-inline {
       width: 100%;
-      height: 264px;
-      margin: 0 auto;
+      max-height: 388px;
+      margin: 0;
+      /*margin: 0 auto;*/
+      overflow-y: auto;
+      padding-bottom: 16px;
       .store-box {
         width: 158px;
         height: 200px;
         text-align: center;
         vertical-align: middle;
-        margin: 32px 0px 0px 40px;
+        margin: 16px auto 0;
+        display: block;
         position: relative;
         &:hover{
           div:last-child {
             display: block;
           }
         }
-        &:first-child {
+        /*&:first-child {
           margin-left:112px;
-        }
+        }*/
         div:first-child {
           img {
             margin-left: -3px;
@@ -251,7 +256,7 @@
         width: 100%;
         .text-center{
           text-align: center;
-          margin-top: 30px;
+          margin-top: 12px;
         }
         .text-center  .col-xs-2  img{
           margin: 65px 0 85px 205px;
@@ -259,7 +264,7 @@
         }
         .text-center .txt-info{
           font-size: 14px;
-          margin: 60px 0px 0px -50px;
+          margin: 30px 0 0 0;
         }
         .text-center  .col-xs-4  p{
           color: #999;

+ 55 - 18
components/store/home/RecommendList.vue

@@ -1,6 +1,10 @@
 <template>
-  <div class="recommend-fragment">
-     <ul class="recommend-list">
+  <div class="wrap">
+    <div class="reco-title container">
+      <span>产品展示</span>
+    </div>
+    <div class="recommend-fragment container clearfix">
+      <ul class="recommend-list clearfix">
         <li v-for="commodity in commodities" class="big">
           <a :href="commodity.batchCode ? '/store/productDetail/'+ commodity.batchCode : '#'" class="href">
             <div class="img">
@@ -8,9 +12,9 @@
             </div>
             <div class="content">
               <p>{{commodity.comCode | comCodeFilter}}</p>
-             <!-- <p class="color666" v-text="commodity.brandNameCn">PANFAEFQ</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>-->
+              <!-- <p class="price" v-if="!commodity.minPriceRMB">$ {{commodity.minPriceUSD || 0}}</p>-->
             </div>
           </a>
           <div class="enter-store">
@@ -19,18 +23,20 @@
           </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>
-             <i class="iconfont" v-if="emptyShow === false">&#xe610;</i>&nbsp;<a v-if="emptyShow === false" href="/">返回首页</a>
-             <img v-if="emptyShow === true" src="/images/brandList/upload.png">&nbsp;<a v-if="emptyShow === true" href="/vendor#/store/maintain" target="_blank">马上去上传</a>
-           </div>
-         </div>
-       </li>
+          <div class="empty">
+            <div class="empty-img">
+              <img src="/images/brandList/empty-cart.jpg">
+            </div>
+            <div class="empty-info">
+              <p class="grey f16"> 暂无展示产品</p>
+              <i class="iconfont" v-if="emptyShow === false">&#xe610;</i>&nbsp;<a v-if="emptyShow === false" href="/">返回首页</a>
+              <img v-if="emptyShow === true" src="/images/brandList/upload.png">&nbsp;<a v-if="emptyShow === true" href="/vendor#/store/maintain" target="_blank">马上去上传</a>
+            </div>
+          </div>
+        </li>
       </ul>
+      <div class="shadow"><img src="/images/store/common/shadow.png"></div>
+    </div>
   </div>
 </template>
 <script>
@@ -274,17 +280,39 @@
   }
 </script>
 <style lang="scss" scoped>
+  .wrap {
+    background: #ece9ec;
+    padding-top: 15px;
+    padding-bottom: 30px;
+    .reco-title {
+      border-bottom: 1px solid #3975f4;
+      span {
+        display: inline-block;
+        width: 156px;
+        height: 33px;
+        line-height: 33px;
+        color: #fff;
+        background: #3975f4;
+        font-size: 18px;
+        text-align: center;
+        border-top-left-radius: 3px;
+        border-top-right-radius: 3px;
+        margin: 0;
+      }
+    }
+  }
   .recommend-fragment {
-    width: 100%;
+    background: #fff;
   }
   .recommend-fragment ul{
     width: 100%;
-    height: 356px;
     background: #fff;
    /* display: inline-block;*/
     -webkit-padding-start: 0;
     border-radius: 5px;
-    padding-left: 2px;
+    /*padding-left: 2px;*/
+    margin: 10px 0;
+    padding: 0 15px;
   }
   .recommend-fragment ul li
     .img{
@@ -449,4 +477,13 @@
       }
     }
   }
+  .shadow {
+    width: 1190px;
+    margin: 0 auto;
+    position: relative;
+    img {
+      position: absolute;
+      top: -12px;
+    }
+  }
 </style>

+ 2 - 1
components/store/index.js

@@ -8,5 +8,6 @@ import RecommendProduct from './RecommendProduct.vue'
 import Certificate from './home/Certificate.vue'
 import EnterpriseInfo from './home/EnterpriseInfo.vue'
 import StoreBanner from './home/StoreBanner.vue'
+import RecommendList from './home/RecommendList.vue'
 
-export {StoreHeader, StoreTitle, BaseInfo, ComponentInfo, CommodityInfo, CommodityList, RecommendProduct, Certificate, EnterpriseInfo, StoreBanner}
+export {StoreHeader, StoreTitle, BaseInfo, ComponentInfo, CommodityInfo, CommodityList, RecommendProduct, Certificate, EnterpriseInfo, StoreBanner, RecommendList}

+ 11 - 15
pages/store/_uuid/index.vue

@@ -69,13 +69,13 @@ export default {
         <store-banner></store-banner>
       </div>
       <enterprise-info></enterprise-info>
-      <certificate></certificate>
-      <commodity-list :kinds="kinds"/>
+      <recommend-list></recommend-list>
+      <!--<certificate></certificate>-->
   </div>
 </template>
 <script>
-  import axios from '~plugins/axios'
-  import { CommodityList, Certificate, EnterpriseInfo, StoreBanner } from '~components/store'
+//  import axios from '~plugins/axios'
+  import { EnterpriseInfo, StoreBanner, RecommendList } from '~components/store'
   export default {
     layout: 'main',
     data () {
@@ -103,19 +103,15 @@ export default {
 
       ])
     },
-    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 }
-//      })
-    },
+//    async asyncData ({ params }) {
+//      let { data } = await axios.get('/api/commodity/components/kinds', { params: { StoreUuid: params.uuid } })
+//      return { kinds: data }
+//    },
     components: {
-      Certificate,
-      CommodityList,
+//      Certificate,
       EnterpriseInfo,
-      StoreBanner
+      StoreBanner,
+      RecommendList
     }
   }
 </script>