Procházet zdrojové kódy

店铺首页修改

gaoxm před 7 roky
rodič
revize
65d5b2d015

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


+ 129 - 41
components/store/home/CommodityList.vue

@@ -757,8 +757,11 @@ export default {
           <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>
+            <button type="button" class="btn" id="search_btn" @click="goodsSearch(searchCode)">&nbsp;搜&nbsp;索&nbsp;</button>
+          </span>
+          <span class="input-group-btn">
+            <button type="button" class="btn sendprove" @click="sendprove()">我要发布产品</button>
+          </span>
         </div>
       </div>
       <div class="title-area">
@@ -766,9 +769,9 @@ export default {
           <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 :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>
+          <!--<span class="empty" v-if="!kinds[0].children || !kinds[0].children.length">暂无数据</span>-->
         </div>
       </div>
       <!-- 产品列表 -->
@@ -777,15 +780,16 @@ export default {
         <table class="goodslist" style="width: 936px;background:#fff;" >
           <thead>
           <tr>
-            <th width="172"><div>品牌/型号</div></th>
-            <th width="140"><div>包装/生产日期</div></th>
+            <th width="189"><div>品牌/类目(产品名称)</div></th>
+            <th width="148"><div>型号/规格</div></th>
+            <th width="114"><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="149"><div>价格梯度(PCS)</div></th>
+            <th width="67"><div>交期(天)</div></th>
+            <th width="66"><div>规格书</div></th>
             <th width="95"><div>操作</div></th>
           </tr>
           </thead>
@@ -799,10 +803,14 @@ export default {
                 <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="brand" v-if="!commodity.brandNameEn && !commodity.brandEn">—</div>
+              <a v-if="commodity.kindNameCn" @click="goBrandDetail('/product/kind/' + commodity.kindUuid, $event)" v-text="commodity.kindNameCn"></a>
+              <div class="brand" v-if="!commodity.kindNameCn">—</div>
+            </td>
+            <td class="brand-code">
               <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>
+              <div class="code" v-if="!commodity.code">—</div>
+              <div class="brand spec" v-text="commodity.spec || '—'"></div>
             </td>
             <td>
               <div class="package" v-if="commodity.packaging" v-text="commodity.packaging"></div>
@@ -855,25 +863,37 @@ export default {
               <buy :item="commodity"></buy>
             </td>
           </tr>
-          <tr v-if="!commodities.content || commodities.content.length == 0">
+          <tr class="active-empty" 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>
+                  <!--<p class="grey f16">暂无器件信息</p>-->
+                  <p class="grey f16"> 暂无产品信息</p>
+                 <!-- <i class="iconfont">&#xe610;</i>&nbsp;<a href="/">返回首页</a>-->
+                  <img src="/images/brandList/upload.png">&nbsp;<a href="/vendor#/vendor_upload?type=company">马上去上传</a>
                 </div>
               </div>
             </td>
           </tr>
           </tbody>
         </table>
+        <div class="remind-area">
+          <img src="/images/store/store-remind.png" alt="">
+          所有报价、库存信息的真实性及准确性均由店铺负责,如有疑问请点击
+          <a @click="goLink" class="link-seller">联系卖家</a>
+        </div>
         <div style="float: right;">
           <page :total="commodities.totalElements" :page-size="pageParams.count"
                 :current="pageParams.page" @childEvent="handleCurrentChange"></page>
         </div>
+        <link-saler-box
+          :tel="tel"
+          v-if="showLinkBox"
+          @cancelAction="showLinkBox = false">
+        </link-saler-box>
       </div>
     </div>
   </div>
@@ -898,12 +918,14 @@ export default {
   }
   import Buy from '~components/common/buyOrCar/buyComponent.vue'
   import Page from '~components/common/page/pageComponent.vue'
+  import LinkSalerBox from '~components/common/LinkSalerBox.vue'
   export default {
     name: 'commodity-list',
     props: ['kinds'],
     components: {
       Buy,
-      Page
+      Page,
+      LinkSalerBox
     },
     data () {
       return {
@@ -917,7 +939,9 @@ export default {
         },
         searchCode: '',
         parentKindId: 0,
-        ids: null
+        ids: null,
+        showLinkBox: false,
+        tel: ''
       }
     },
     filters: {
@@ -949,6 +973,26 @@ export default {
     computed: {
       commodities () {
         return this.$store.state.shop.storeInfo.storeCommodity.data
+      },
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      },
+      user () {
+        return this.$store.state.option.user
+      },
+      tab () {
+        return this.$store.state.chat.tab.tab.data
+      },
+      isConsignment () {
+        return this.storeInfo.type === 'CONSIGNMENT'
+      },
+      enterprise () {
+        let ens = this.user.data.enterprises
+        if (ens && ens.length) {
+          return ens.find(item => item.current) || {enName: '个人账户'}
+        } else {
+          return {enName: '个人账户'}
+        }
       }
     },
     mounted () {
@@ -958,6 +1002,20 @@ export default {
 //    alert(JSON.stringify(this.kinds))
     },
     methods: {
+      sendprove: function () {
+        if (this.user.logged) {
+          if (this.enterprise && this.enterprise.isVendor === 313) {
+            window.open('/vendor#/vendor_upload')
+          } else {
+            this.$router.push('/register-saler')
+          }
+        } else {
+          this.$router.push('/auth/login?returnUrl=' + window.location.href)
+        }
+      },
+      goLink: function () {
+        this.baseUtils.goLinkUser(this, this.storeInfo.enUU)
+      },
       KindsNameChange: function (obj) {
 //      obj.nameCn += obj.level
         document.getElementsByClassName('el-tree-node__content').innerHTML = ('<span>1</span>')
@@ -1056,7 +1114,7 @@ export default {
   /*  产品分类调整*/
   #goods-list-fragment .category-content{
     max-height: 496px;
-    min-height: 53px;
+    min-height: 224px;
     overflow-y: scroll;
     overflow-x: hidden;
     position: relative;
@@ -1223,20 +1281,30 @@ export default {
 
   /* 物品列表 */
   #goods-list-fragment .goodslist .brand-code {
-    font-size: 14px;
+    font-size: 12px;
     text-align: center;
+    position: relative;
   }
-
   #goods-list-fragment #search_btn {
-    background: #3b7cf4;
-    color: #FFFFFF;
-    border-bottom-right-radius: 25px;
-    border-top-right-radius: 25px;
+    background: #3c7cf5;
+    color: #FFF;
+    border-bottom-right-radius: 3px;
+    border-top-right-radius: 3px;
+    border-bottom-left-radius: 0px;
+    border-top-left-radius: 0px;
     height: 28px;
-    width: 58px;
+    width: 69px;
     padding-right: 50px;
   }
-
+  #goods-list-fragment .sendprove {
+    width: 110px;
+    height: 28px;
+    color: #fff;
+    background-color: #ff9000;
+    border-radius: 3px;
+    float: right;
+    margin-left: 10px
+  }
   .btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus {
     outline: none;
     border-color: transparent;
@@ -1246,15 +1314,15 @@ export default {
     font-size: 14px;
     height: 28px;
     line-height: 28px;
-    width: 200px;
+    width: 189px;
     float: right;
-    border-bottom-left-radius: 25px;
-    border-top-left-radius: 25px;
+    border-bottom-left-radius: 3px;
+    border-top-left-radius: 3px;
     border: 1px solid #3b7cf4;
   }
 
   #goods-list-fragment .brand-code .code {
-    font-weight: 600;
+    /*font-weight: 600;*/
   }
   #goods-list-fragment .brand-code .brand a {
     color: #3c7df5;
@@ -1289,16 +1357,16 @@ export default {
     color: #f01010;
   }
   #goodslist-content .amount {
-    width: 50%;
+    width: 60%;
     float: left;
-    padding-left: 50px;
+    padding-left: 30px;
     text-align:left;
   }
-  #goodslist-content .amount div:last-child, #goodslist-content .price div:last-child{
+  #goodslist-content .amount div:last-child{
     color: #f01010;
   }
   #goodslist-content .price {
-    width: 50%;
+    width: 40%;
     float:right;
     text-align:left;
   }
@@ -1386,12 +1454,15 @@ export default {
   .no-record i{
     margin-right: 5px;
   }
+  .active-empty:hover{
+    background-color: #fff!important;
+  }
   .text-center{
     text-align: center;
     margin-top: 30px;
   }
   .text-center  .col-xs-2  img{
-    margin: 50px 0 50px 135px;
+    margin: 55px 0 85px 135px;
     vertical-align: middle;
   }
   .text-center .txt-info{
@@ -1400,20 +1471,37 @@ export default {
   }
   .text-center  .col-xs-4  p{
     color: #999;
-    margin-top: 3px;
-    margin-bottom: 2px;
+    margin: 11px 0px 4px -6px;
+  }
+  .text-center  .txt-info i{
+    color: #5078cb;
   }
   .text-center  .txt-info a{
     font-size: 14px;
-  }
-  .text-center  .col-xs-4 i{
     color: #5078cb;
-    font-size: 14px;
+  }
+  .text-center  .col-xs-5 img{
+    margin-left: -235px;
   }
   .goodslist{
     margin-bottom: 20px;
   }
-
+  .remind-area {
+    font-size: 12px;
+    color: #666;
+  }
+  .remind-area img {
+    margin-right: 12px;
+  }
+  .remind-area .link-seller {
+    font-size: 12px;
+    color: #fff;
+    line-height: 20px;
+    height: 20px;
+    padding: 0 7px;
+    background: #ef7f03;
+    border-radius: 2px;
+  }
   @font-face {
     font-family: 'iconfont';  /* project id 357960 */
     src: url('//at.alicdn.com/t/font_27kjyd082ezpk3xr.eot');

+ 31 - 34
components/store/home/EnterpriseInfo.vue

@@ -4,24 +4,38 @@
       <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 class="information-list">
+              <div>主营产品&nbsp;:</div>
+              <div v-if="storeInfo.description" :title="storeInfo.description">{{storeInfo.description | introduceFilter}}</div>
+              <div v-else>—</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 class="information-list" :title="storeInfo.enterprise.enAddress">
+              <div>应用领域&nbsp;:</div>
+              <div v-if="storeInfo.storeApplication" :title="storeInfo.storeApplication">{{storeInfo.storeApplication | introduceFilter}}</div>
+              <div v-else>—</div>
             </div>
-            <div class="information-list" v-if="storeInfo.enterprise.enTel">
-              <div>电话&nbsp;:</div><div>{{storeInfo.enterprise.enTel}}</div>
+            <div class="information-list">
+              <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 class="information-list">
+              <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>手机&nbsp;:</div><div>{{storeInfo.enterprise.enPhone || '—'}}</div>
+            </div>
+            <div class="information-list">
+              <div>微信&nbsp;:</div><div>{{storeInfo.enterprise.enWeixin || '—'}}</div>
+            </div>
+            <div class="information-list">
+              <div>Q Q&nbsp;:</div><div>{{storeInfo.enterprise.enQQ || '—'}}</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>
+              <p v-if="storeInfo.description">{{storeInfo.description}}</p>
+              <p v-else class="empty-introduce">暂无简介</p>
             </div>
           </div>
         </li>
@@ -53,7 +67,7 @@
       }
     },
     filters: {
-      addressFilter: function (title) {
+      introduceFilter: function (title) {
         if (title === '') {
           return title
         }
@@ -75,29 +89,6 @@
         } 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: {
@@ -300,6 +291,7 @@
                 background: url("/images/store/home/detail1.png") no-repeat 6% 10%;
                 font-size: 14px;
                 padding: 0px 0px 5px 30px;
+                margin:10px 0px;
               }
               p {
                 margin: -15px 0px 0px 15px;
@@ -310,6 +302,11 @@
                 line-height: 19px;
                 max-height: 153px;
               }
+              .empty-introduce{
+                text-align: center;
+                line-height: 153px;
+                color: #666;
+              }
             }
           }
         }

+ 42 - 1
components/store/home/QualificationCertificate.vue

@@ -2,10 +2,22 @@
   <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)">
+        <li class="store-box" v-for="(store, index) in storeInfo.qualifications.slice(0,5)" v-if="!storeInfo.qualifications || storeInfo.qualifications.length == 0">
           <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>
+        <li class="active-empty">
+          <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>-->
+               <img src="/images/brandList/upload.png">&nbsp;<a href="/vendor#/store/maintain">马上去上传</a>
+            </div>
+          </div>
+        </li>
       </ul>
     </div>
     <div class="shadow"><img src="/images/store/common/shadow.png"></div>
@@ -215,6 +227,35 @@
           }
         }
       }
+      .active-empty{
+        width: 100%;
+        .text-center{
+          text-align: center;
+          margin-top: 30px;
+        }
+        .text-center  .col-xs-2  img{
+          margin: 65px 0 85px 210px;
+          vertical-align: middle;
+        }
+        .text-center .txt-info{
+          font-size: 14px;
+          margin: 60px 0px 0px -50px;
+        }
+        .text-center  .col-xs-4  p{
+          color: #999;
+          margin: 15px 0px 7px -6px;
+        }
+        .text-center  .txt-info i{
+          color: #5078cb;
+        }
+        .text-center  .txt-info a{
+          font-size: 14px;
+          color: #5078cb;
+        }
+        .text-center  .col-xs-5 img{
+          margin-left: -235px;
+        }
+      }
     }
   }
   .shadow{

+ 25 - 30
components/store/home/RecommendList.vue

@@ -17,17 +17,6 @@
             <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">
@@ -35,8 +24,9 @@
              <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>
+             <p class="grey f16"> 暂无展示产品</p>
+             <i class="iconfont">&#xe610;</i>&nbsp;<a href="/">返回首页</a>
+             <!--<img src="/images/brandList/upload.png">&nbsp;<a href="/vendor#/store/maintain">马上去上传</a>-->
            </div>
          </div>
        </li>
@@ -117,13 +107,13 @@
         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')
+              window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
             }
           })
         } else {
           if (item) {
             if (isBuy) {
-              this.$http.post('trade/order/buyNow', [{
+              this.$http.post('/trade/order/buyNow', [{
                 uuid: item.comUuid,
                 batchCode: item.batchCode,
                 number: item.minBuyQty,
@@ -133,19 +123,17 @@
                 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)
+                        window.location.href = '/user#/order/pay/' + this.baseUtils.enidfilter(response.data.data.orderid)
                       }, 1000)
                     } else {
-                      window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.data.orderid)
+                      window.location.href = '/user#/order/pay/' + this.baseUtils.enidfilter(response.data.data.orderid)
                     }
                   } else {
                     if (response.data.data && response.data.data.unvailable === 1) {
@@ -157,12 +145,12 @@
                 }, err => {
                   console.log(err)
                   if (item.minBuyQty > item.reserve) {
-                    this.$message.error('商品' + item.code + '的库存已经不满足起订量')
+                    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', {
+              this.$http.post('/trade/cart/add', {
                 uuid: item.comUuid,
                 batchCode: item.batchCode,
                 number: item.minBuyQty,
@@ -185,7 +173,11 @@
                       })
                     }
                   } else {
-                    this.$message.error(response.data.message)
+                    if (response.data.code === 2) {
+                      this.$message.error(response.data.message + ',请刷新页面')
+                    } else {
+                      this.$message.error(response.data.message)
+                    }
                   }
                 })
             }
@@ -317,19 +309,19 @@
     width: 74px;
     height: 24px;
     display: inline-block;
-    line-height: 24px;
+    line-height: 22px;
     text-align: center;
-    font-size: 13px;
+    font-size: 12px;
     margin-left: 11px;
     border-radius: 3px;
     &:first-child {
-      background-color: #ff9000;
-      border: 1px solid #ff9000;
-      color: #fff;
+      background-color: #fff;
+      border: solid 1px #3b7cf4;
+      color: #3c7df5;
     }
     &:last-child {
-      background-color: #be0606;
-      border: 1px solid #be0606;
+      background-color: #ffa422;
+      border: 1px solid #ffa422;
       color: #fff;
     }
   }
@@ -407,7 +399,7 @@
     }
     .empty{
       margin: 0 auto;
-      width: 380px;
+      width: 181px;
       .empty-img{
         float: left;
       }
@@ -418,6 +410,9 @@
           color: #999;
           font-size: 14px;
         }
+        i{
+          color: #5078cb;
+        }
         a{
           font-size: 14px;
           color: #5078cb;

+ 452 - 0
components/store/home/StoreBanner.vue

@@ -0,0 +1,452 @@
+<template>
+  <div class="container" id="title-fragment">
+    <div class="container">
+      <div class="row" style="margin-bottom: 20px;">
+        <!-- 商标展示 -->
+        <div class="logo two-word" v-if="storeInfo.type == 'ORIGINAL_FACTORY'">原厂</div>
+        <div class="logo two-word" v-else-if="storeInfo.type == 'CONSIGNMENT'">寄售</div>
+        <div class="logo" v-else-if="storeInfo.type == 'AGENCY'">代理商</div>
+        <div class="logo" v-else-if="storeInfo.type == 'DISTRIBUTION'">经销商</div>
+        <div class="shop-logo">
+          <img class="logo-img" :src="storeInfo.logoUrl || '/images/store/common/default.png'" />
+         <!-- <p id="shop-title" v-if="storeInfo.storeShortName" v-text="storeInfo.storeShortName">店铺名称</p>-->
+          <p class="shop-name" v-if="storeInfo.storeShortName">{{storeInfo.storeShortName | nameFilter}}</p>
+          <p class="shop-name" v-else></p>
+          <div class="enter-store">
+            <a v-if="isFocus == 'false' || typeof isFocus == 'object'" @click="focus(storeInfo.id, storeInfo.storeName)">关注店铺</a>
+            <a v-if="isFocus == 'true'" class="focus">已关注</a>
+            <a @click="goLink()">联系卖家</a>
+          </div>
+          <div class="share">
+            <span @click="setShowShare(!showShare, $event)">手机版链接&nbsp;<img src="/images/store/home/qrccode-small.png">&nbsp;&nbsp;<img :class="{'active': showCate}" src="/images/store/home/arrow-down.png" alt=""></span>
+            <div v-show="showShare">
+              <i class="icon-guanbi1 iconfont" @click="setShowShare(false, $event)"></i>
+              <h1>分享链接</h1>
+              <p>随时随地使用手机查看店铺现货</p>
+              <canvas id="qrccode-canvas"></canvas>
+              <!--<input v-show="showShare" :value="url" readonly>-->
+              <span v-if="showShare" id="copyLink"  :data-clipboard-text="url">复制链接</span>
+            </div>
+          </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>
+      <link-saler-box
+        :tel="tel"
+        v-if="showLinkBox"
+        @cancelAction="showLinkBox = false">
+      </link-saler-box>
+    </div>
+  </div>
+</template>
+<script>
+import Clipboard from 'clipboard'
+import LinkSalerBox from '~components/common/LinkSalerBox.vue'
+let QRCode = require('qrcode')
+
+export default {
+  name: 'store-banner',
+  data () {
+    return {
+      dialogVisible: false,
+      showShare: false,
+      clipboard: {},
+      showLinkBox: false,
+      showCate: false,
+      tel: ''
+    }
+  },
+  mounted () {
+    let _this = this
+    _this.url = window.location.href
+    _this.clipboard = new Clipboard('#copyLink')
+    _this.clipboard.on('success', e => {
+      _this.clipboard.destroy()
+      _this.$message.success('已复制到剪切板')
+    })
+    _this.clipboard.on('error', e => {
+      _this.$message.error('浏览器不支持自动复制,请手动复制')
+      _this.clipboard.destroy()
+    })
+    document.addEventListener('click', function () {
+      _this.showShare = false
+      _this.showCate = false
+    })
+  },
+  components: {
+    LinkSalerBox
+  },
+  methods: {
+    loadQRcode: function () {
+      let canvas = document.getElementById('qrccode-canvas')
+      QRCode.toCanvas(canvas, this.url, (error) => {
+        console.log(error || 'QRcode success')
+      })
+    },
+    setShowShare: function (flag, event) {
+      event.stopPropagation()
+      this.loadQRcode()
+      this.showShare = flag
+      this.showCate = flag
+    },
+    focus (id, name) {
+      if (!this.user.logged) {
+        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)
+          }
+        })
+      } else {
+        this.dialogVisible = true
+        this.$store.dispatch('shop/StoreFocus', {storeName: name, storeid: id})
+        this.isFocus = true
+      }
+    },
+    goLink: function () {
+      this.baseUtils.goLinkUser(this, this.storeInfo.enUU)
+    }
+//    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
+    },
+    isFocus () {
+      return this.$store.state.shop.storeInfo.focusList.data
+    },
+    url: {
+      get: function () {
+        return window.location.protocol + '//' + window.location.host + '/mobile/share/storeShare/' + this.storeInfo.uuid
+      },
+      set: function () {
+      }
+    }
+  }
+}
+</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: 0px;
+    color: #fff;
+    margin-top: -20px;
+    background: url('/images/store/home/logo-type.png') no-repeat;
+    z-index: 100;
+    padding-top: 3px;
+  }
+  .two-word{
+    padding-top: 10px;
+  }
+	#title-fragment .shop-logo {
+		width: 220px;
+		height: 220px;
+		border: 1px solid #e8e8e8;
+		float: left;
+		text-align: center;
+		line-height: 210px;
+    position: relative;
+    .shop-name{
+      height: 40px;
+      line-height: 40px;
+      margin-top: -105px;
+      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;
+        }
+        &.focus{
+          background-color: #c1c1c1;
+          border: 1px solid #c1c1c1;
+        }
+        &:last-child {
+          background: #3c7cf7;
+          border: 1px solid #3c7cf7;
+          color: #fff;
+        }
+      }
+    }
+    .share {
+      display: inline-block;
+      position: relative;
+      > span {
+        position: relative;
+        top: -81px;
+        color: #4290f7;
+        cursor: pointer;
+        .active {
+          transform:rotate(180deg);
+          -ms-transform:rotate(180deg); /* Internet Explorer */
+          -moz-transform:rotate(180deg); /* Firefox */
+          -webkit-transform:rotate(180deg); /* Safari 和 Chrome */
+          -o-transform:rotate(180deg); /* Opera */
+        }
+      }
+      > div {
+        position: absolute;
+        top: 38px;
+        left: -47px;
+        width: 211px;
+        height: 321px;
+        background: #fff;
+        box-shadow: 1px 1px 4px 0 #ccbebe;
+        z-index: 1300000;
+        text-align: center;
+        h1, p{
+          height: 30px;
+          width: 100%;
+        }
+        h1{
+          margin-top: -80px;
+        }
+        p{
+          margin-top: -10px;
+        }
+        canvas{
+          margin-top: 75px;
+        }
+        /*input {
+          display: inline-block;
+          width: 140px;
+          overflow: hidden;
+          height: 35px;
+          vertical-align: middle;
+        }*/
+        span {
+           display: inline-block;
+           color: #fff;
+           background: #4290f7;
+           height: 36px;
+           line-height: 36px;
+           width: 70px;
+           font-style: normal;
+           vertical-align: middle;
+           cursor: pointer;
+           margin-top: -380px;
+         }
+        i {
+          position: absolute;
+          right: 10px;
+          top: -89px;
+          cursor: pointer;
+          font-size: 14px;
+          font-weight: bold;
+        }
+      }
+    }
+	}
+	#title-fragment .shop-logo .logo-img {
+		width: 173px;
+		height: 86px;
+    margin-top: -102px;
+	}
+
+	#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>

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

@@ -1,304 +0,0 @@
-<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>

+ 3 - 3
components/store/index.js

@@ -1,5 +1,5 @@
 import StoreHeader from './common/StoreHeader.vue'
-import StoreTitle1 from './common/StoreTitle1.vue'
+import StoreTitle from './common/StoreTitle.vue'
 import BaseInfo from './BaseInfo.vue'
 import ComponentInfo from './ComponentInfo.vue'
 import CommodityInfo from './CommodityInfo.vue'
@@ -7,6 +7,6 @@ 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'
+import StoreBanner from './home/StoreBanner.vue'
 
-export {StoreHeader, StoreTitle1, BaseInfo, ComponentInfo, CommodityInfo, CommodityList, RecommendProduct, Certificate, EnterpriseInfo, StoreTitle}
+export {StoreHeader, StoreTitle, BaseInfo, ComponentInfo, CommodityInfo, CommodityList, RecommendProduct, Certificate, EnterpriseInfo, StoreBanner}

+ 12 - 7
pages/store/_uuid/index.vue

@@ -65,8 +65,8 @@ export default {
 </style>-->
 <template>
   <div>
-      <div class="store-title">
-        <store-title class="store-title"></store-title>
+      <div class="store-banner">
+        <store-banner></store-banner>
       </div>
       <enterprise-info></enterprise-info>
       <certificate></certificate>
@@ -75,7 +75,7 @@ export default {
 </template>
 <script>
   import axios from '~plugins/axios'
-  import { CommodityList, Certificate, EnterpriseInfo, StoreTitle } from '~components/store'
+  import { CommodityList, Certificate, EnterpriseInfo, StoreBanner } from '~components/store'
   export default {
     layout: 'main',
     data () {
@@ -91,11 +91,16 @@ export default {
         return this.storeInfo.type === 'CONSIGNMENT'
       }
     },
-    fetch ({ store, params }) {
+    fetch ({ store, params, redirect }) {
+      if (!params.uuid) {
+        return redirect('/error')
+      }
       return Promise.all([
         store.dispatch('shop/findStoreInfoFromUuid', params),
         store.dispatch('shop/findRecommendProducts', params),
-        store.dispatch('shop/pageCommoditiesOfStore', params.uuid, { page: 1, count: 6 })
+        store.dispatch('shop/pageCommoditiesOfStore', params.uuid, { page: 1, count: 6 }),
+        store.dispatch('loadStoreStatus', { op: 'check' })
+
       ])
     },
     async asyncData ({ params }) {
@@ -110,7 +115,7 @@ export default {
       Certificate,
       CommodityList,
       EnterpriseInfo,
-      StoreTitle
+      StoreBanner
     }
   }
 </script>
@@ -121,7 +126,7 @@ export default {
   #nav_fragment .el-dialog__wrapper .el-dialog__body{
     padding: 14px !important;
   }
-  .store-title{
+  .store-banner{
     min-width: 1190px;
     background: #ece9ec;
     padding-top: 20px;

binární
static/images/store/home/arrow-down.png


binární
static/images/store/home/detail1.png


binární
static/images/store/home/qrccode-small.png