Browse Source

Merge remote-tracking branch 'origin/feature-201816-wangcz' into feature-201816-wangcz

shenjj 7 years ago
parent
commit
2fedd7af58
67 changed files with 4031 additions and 757 deletions
  1. 46 0
      assets/scss/common.scss
  2. 52 2
      assets/scss/mobileCommon.scss
  3. 303 207
      components/brandCenter/BrandIndex.vue
  4. 129 33
      components/brandCenter/RecommendBrand.vue
  5. 3 3
      components/common/PcSearchHeader.vue
  6. 4 3
      components/common/page/pageComponent.vue
  7. 2 2
      components/common/upload/upload.vue
  8. 9 9
      components/home/Carousel.vue
  9. 2 2
      components/home/floor/Floor.vue
  10. 3 3
      components/home/floor/FloorBar.vue
  11. 40 4
      components/home/floor/FloorList.vue
  12. 18 19
      components/main/Nav.vue
  13. 9 7
      components/mobile/MobileHeader.vue
  14. 81 0
      components/mobile/base/BottomModalWrapper.vue
  15. 59 0
      components/mobile/base/LinkUser.vue
  16. 54 0
      components/mobile/base/ModalWrapper.vue
  17. 4 1
      components/mobile/base/index.js
  18. 2 2
      components/mobile/common/StatisticsMobile.vue
  19. 11 11
      components/provider/Carousel.vue
  20. 127 67
      components/provider/HotCommodity.vue
  21. 67 106
      components/provider/NewStore.vue
  22. 73 116
      components/provider/RecommendOriginal.vue
  23. 20 25
      components/provider/RecommendStore.vue
  24. 47 0
      components/provider/RecommendStoreShow.vue
  25. 144 86
      components/provider/Suppliers.vue
  26. 220 0
      components/provider/ToggleStore.vue
  27. 3 1
      components/provider/index.js
  28. 1 1
      components/search/GoodList.vue
  29. 0 1
      components/supplier/articleOne.vue
  30. 0 1
      components/supplier/articleTwo.vue
  31. 2 4
      components/supplier/details.vue
  32. 2 3
      components/supplier/resource.vue
  33. 1 0
      pages/applyPurchase/index.vue
  34. 6 2
      pages/index.vue
  35. 502 0
      pages/mobile/center/user/cart.vue
  36. 313 0
      pages/mobile/center/user/doPay/_ids.vue
  37. 10 0
      pages/mobile/center/user/index.vue
  38. 1132 0
      pages/mobile/center/user/pay/_orderId.vue
  39. 5 0
      pages/mobile/center/vendor/index.vue
  40. 43 0
      pages/provider/shop.vue
  41. 1 1
      pages/supplier/index.vue
  42. 66 9
      plugins/mixin.js
  43. BIN
      static/images/brandCenter/11.png
  44. BIN
      static/images/brandCenter/22.png
  45. BIN
      static/images/brandCenter/33.png
  46. BIN
      static/images/brandCenter/brand-recommend.png
  47. BIN
      static/images/brandCenter/search-index.png
  48. BIN
      static/images/mobile/center/user/addr-border.png
  49. BIN
      static/images/mobile/center/user/addr-flag.png
  50. BIN
      static/images/mobile/center/user/bottom-checked.png
  51. BIN
      static/images/mobile/center/user/car-checked.png
  52. BIN
      static/images/mobile/center/user/car-noChecked.png
  53. BIN
      static/images/mobile/center/user/cart.jpg
  54. BIN
      static/images/mobile/center/user/invoice-nor.png
  55. BIN
      static/images/mobile/center/user/invoice-spec.png
  56. BIN
      static/images/mobile/center/user/order.jpg
  57. BIN
      static/images/original/angle-blue.png
  58. BIN
      static/images/original/angle-white.png
  59. BIN
      static/images/original/line.png
  60. 70 0
      store/floor.js
  61. 51 1
      store/index.js
  62. 26 10
      store/provider.js
  63. 0 14
      store/provider/storeCms.js
  64. 34 0
      store/provider/stores.js
  65. 74 0
      store/userCenter.js
  66. 95 0
      store/userCenter/list.js
  67. 65 1
      utils/baseUtils.js

+ 46 - 0
assets/scss/common.scss

@@ -845,3 +845,49 @@ img.new-animate{
     }
   }
 }
+//原厂搜索
+#store-list table .search-content-pc{
+  position: relative;
+  float: left;
+  padding-left: 558px;
+}
+#store-list table .search-content-pc .form-control{
+  width: 190px;
+  height: 28px;
+  background-color: #ffffff;
+  border-radius: 3px;
+  border: solid 1px #2496f1;
+}
+#store-list table .search-content-pc .input-group-btn{
+  position: absolute;
+  top: 0;
+  right: 0px;
+}
+#store-list table .search-content-pc .input-group-btn button{
+  width: 69px;
+  height: 28px;
+  font-size: 14px;
+  color: #fff;
+  background-color: #2496f1;
+  outline: none;
+}
+#store-list a .btn {
+  width: 110px;
+  height: 28px;
+  background-color: #ffffff;
+  border-radius: 3px;
+  border: solid 1px #2496f1;
+  outline: none;
+}
+
+//品牌索引
+.recommend-brand .brand-content .brand-index-tab .index-group:nth-child(5) a{
+  width: 33px!important;
+}
+.recommend-brand .brand-content .brand-index-tab .index-group:nth-child(6){
+  width: 100px!important;
+  margin: 0 0 0 10px!important;
+}
+.recommend-brand .brand-content .brand-index-tab .index-group:nth-child(6) a{
+  width: 100px!important;
+}

+ 52 - 2
assets/scss/mobileCommon.scss

@@ -116,7 +116,8 @@ html {
     color: #01a44e;
   }
 
-  input {
+  input[type="text"],
+  input[type="number"]{
     -webkit-appearance: none;
     -moz-appearance: none;
     appearance: none;
@@ -251,7 +252,7 @@ html {
     }
     &.mobile-link-en {
       top: 50%;
-      margin-top: -1.34rem;
+      margin-top: -2.14rem;
     }
   }
   .mobile-share-box {
@@ -319,6 +320,9 @@ html {
   padding-top: .88rem !important;
   margin-bottom: 1rem;
 }
+.mobile-content-long {
+  padding-top: 1.26rem !important;
+}
 
 /*求购title*/
 .seek-title {
@@ -544,3 +548,49 @@ table.com-price-list {
     }
   }
 }
+
+// 联系卖家
+.com-mobile-link {
+  float: right;
+  font-size: .26rem;
+  color: #3f84f6;
+  margin-right: .12rem;
+  i {
+    margin-right: .08rem;
+    position: relative;
+    top: .04rem;
+    font-size: .34rem;
+  }
+}
+
+.mobile-cart-check {
+  min-width: .36rem;
+  height: .36rem;
+  background: url('/images/mobile/center/user/car-noChecked.png') no-repeat;
+  background-size: contain;
+  &.active {
+    background-image: url('/images/mobile/center/user/car-checked.png');
+  }
+  vertical-align: middle;
+  margin-bottom: .02rem;
+  input {
+    display: none;
+  }
+  span {
+    font-size: .26rem;
+    position: static;
+    line-height: normal;
+    margin-left: .5rem;
+    vertical-align: top;
+    font-weight: normal;
+  }
+}
+
+.bottom-modal-check {
+  &.active {
+    background-image: url('/images/mobile/center/user/bottom-checked.png');
+  }
+  span {
+    font-size: .32rem;
+  }
+}

+ 303 - 207
components/brandCenter/BrandIndex.vue

@@ -1,60 +1,95 @@
 <template>
-  <div class="brand-center-index" id="index" @click="showSimilarWord = false">
-    <img src="/images/brandCenter/brand-index-title1.png" alt="">
-    <div class="brand-index-tab">
-      <div class="brand-index-group" v-for="(indexGroup, index) in indexGroups">
-        <span v-if="index == 5"></span>
-        <a @click="goBrandIndex(group_index)" v-for="group_index in indexGroup" :class="{'active': activeIndex==group_index}">{{group_index}}</a>
-        <span v-if="index == 5"></span>
+  <div class="search-index">
+    <div class="brand-recommend">
+      <div class="recommend-area">
+        <div class="recommend-head">
+          <img src="/images/brandCenter/brand-recommend.png"/>品牌推荐
+        </div>
+        <ul class="recommend-items">
+          <li v-for="item in hotBrands.data">
+            <a :href="item.detailsLink" target="_blank">
+              <img :src="item.pictureLink" alt="">
+              <div class="brand-item">
+                <p>{{item.title}}</p>
+                <span class="brand-application" v-if="item.metadatas.contExp_abstract">应用领域:{{item.metadatas.contExp_abstract | applicationFilter}}</span>
+                <span class="brand-application" v-if="!item.metadatas.contExp_abstract">应用领域:-</span>
+                <span class="brand-introduce" v-if="item.metadatas.contExp_select">品牌介绍:{{item.metadatas.contExp_select | introduceFilter}}</span>
+                <span class="brand-introduce" v-if="!item.metadatas.contExp_select">品牌介绍:-</span>
+              </div>
+            </a>
+          </li>
+        </ul>
+      </div>
+      <div class="recommend-prod">
+        <div class="item">
+          <img src="/images/brandCenter/11.png" style="margin-top: 12px;"><span>秒速搜索全球器件品牌,精准查找品牌授权代理商,最优产品,为采购提供最可靠的资质信息。</span>
+        </div>
+        <div class="item">
+          <img src="/images/brandCenter/22.png" style="margin-top: 5px;"><span>元器件标准参数自由筛选,性能差异横向比较,生产配料一清二楚。</span>
+        </div>
+        <div class="item">
+          <img src="/images/brandCenter/33.png"><span>推荐品牌,让您的品牌处于最亮眼的位置。</span>
+        </div>
       </div>
     </div>
-    <div class="brand-center-index-list">
-      <div class="brand-list-nav">
-        <div class="filter-area">
-          <input type="text" placeholder="请输入您要搜索的品牌" @input="onKeywordInput()" v-model="keyword" @keyup.13="searchBrands()">
-          <img src="/images/brandCenter/search-btn.png" alt="" @click="searchBrands()">
-          <span v-if="brandList.totalElements > 0">{{nowPage}}/{{brandList.totalPages}}
+    <div class="brand-center-index" id="index" @click="showSimilarWord = false">
+      <div class="brand-center-index-list">
+        <div class="brand-list-nav">
+          <span class="search-index-show">品牌索引</span>
+          <div class="search">
+            <span v-show="!isSearch">
+              以{{activeIndex&&activeIndex.length==1?'字母':''}}
+              <span class="active-index">{{activeIndex}}&nbsp;</span>开头共有
+              <span class="active-number">{{brandList.totalElements || 0}}&nbsp;</span>个品牌
+              <span v-if="brandList.totalElements > 0">,当前是第
+              <span class="active-number">{{nowPage}}&nbsp;</span>页
+              </span>
+            </span>
+            <span v-show="isSearch">
+              搜索
+              <span class="active-index">"{{showKeyword}}"&nbsp;</span>,为您找到
+              <span class="active-number">{{brandList.totalElements || 0}}&nbsp;</span>个相关品牌:
+            </span>
+          </div>
+          <div class="filter-area">
+            <input type="text" placeholder="请输入您要搜索的品牌" @input="onKeywordInput()" v-model="keyword" @keyup.13="searchBrands()">
+            <b class="search-btn" @click="searchBrands()">搜 索</b>
+            <span v-if="brandList.totalElements > 0">{{nowPage}}/{{brandList.totalPages}}
             <a href="javascript:void(0)" class="icon-xiangzuo iconfont" @click="changePage('pre')" :class="{'is-border': nowPage==1}"></a>
             <a href="javascript:void(0)" @click="changePage('next')" class="icon-xiangyou iconfont" :class="{'is-border': nowPage>=brandList.totalPages}"></a>
           </span>
-          <ul class="similar-list" v-show="showSimilarWord && keyword && keyword.length">
-            <li class="text-ellipse" v-for="similar in similarList" @click.stop="setSimilar(similar.nameCn)">{{similar.nameCn}}</li>
-          </ul>
+            <ul class="similar-list" v-show="showSimilarWord && keyword && keyword.length">
+              <li class="text-ellipse" v-for="similar in similarList" @click.stop="setSimilar(similar.nameCn)">{{similar.nameCn}}</li>
+            </ul>
+          </div>
         </div>
-      </div>
-      <div class="brand-list-items">
-        <span v-show="!isSearch">
-          以{{activeIndex&&activeIndex.length==1?'字母':''}}
-          <span class="active-index">{{activeIndex}}&nbsp;</span>开头共有
-          <span class="active-number">{{brandList.totalElements || 0}}&nbsp;</span>个品牌
-          <span v-if="brandList.totalElements > 0">,当前是第
-            <span class="active-number">{{nowPage}}&nbsp;</span>页
-          </span>
-        </span>
-        <span v-show="isSearch">
-          搜索
-          <span class="active-index">"{{showKeyword}}"&nbsp;</span>,为您找到
-          <span class="active-number">{{brandList.totalElements || 0}}&nbsp;</span>个相关品牌:
-        </span>
-        <div class="brand-list-item-wrap" v-for="brand in brandList.content">
-          <a :href="'/product/brand/'+brand.uuid" target="_blank">
-            <span v-if="brand.nameEn">{{brand.nameEn}}</span>
-            <span v-if="brand.nameCn != brand.nameEn">{{brand.nameCn}}</span>
-            <div class="brand-intro">
-              <span class="brand-application">应用领域:{{brand.application | applicationFilter}}</span>
-              <span >品牌介绍:{{brand.brief | introduceFilter}}</span>
-            </div>
-          </a>
+        <div class="brand-index-tab">
+          <div class="brand-index-group" v-for="(indexGroup, index) in indexGroups">
+            <span v-if="index == 5"></span>
+            <a @click="goBrandIndex(group_index)" v-for="group_index in indexGroup" :class="{'active': activeIndex==group_index}">{{group_index}}</a>
+            <span v-if="index == 5"></span>
+          </div>
         </div>
-        <div v-if="brandList.totalElements <= 0" class="empty-remind">
-          商城暂未收录您想要查找的品牌,可前往<a @click="goBrandApply">“品牌申请”</a>提醒我们完善该品牌信息
+        <div class="brand-list-items">
+          <div class="brand-list-item-wrap" v-for="brand in brandList.content">
+            <a :href="'/product/brand/'+brand.uuid" target="_blank">
+              <span v-if="brand.nameEn">{{brand.nameEn}}</span>
+              <span v-if="brand.nameCn != brand.nameEn">{{brand.nameCn}}</span>
+              <div class="brand-intro">
+                <span class="brand-application">应用领域:{{brand.application | applicationFilter}}</span>
+                <span >品牌介绍:{{brand.brief | introduceFilter}}</span>
+              </div>
+            </a>
+          </div>
+          <div v-if="brandList.totalElements <= 0" class="empty-remind">
+            商城暂未收录您想要查找的品牌,可前往<a @click="goBrandApply">“品牌申请”</a>提醒我们完善该品牌信息
+          </div>
+          <div class="search-modal-wrap" v-if="showSearchModal"></div>
         </div>
-        <div class="search-modal-wrap" v-if="showSearchModal"></div>
+        <page :total="brandList.totalElements" :page-size="pageSize"
+              :current="nowPage" v-on:childEvent="listenPage"></page>
       </div>
-      <page :total="brandList.totalElements" :page-size="pageSize"
-            :current="nowPage" v-on:childEvent="listenPage"></page>
     </div>
-    <img src="/images/brandCenter/features.png" alt="">
   </div>
 </template>
 <script>
@@ -131,6 +166,9 @@
         },
         user () {
           return this.$store.state.option.user
+        },
+        hotBrands () {
+          return this.$store.state.product.brand.recommends.data
         }
       },
       watch: {
@@ -231,176 +269,210 @@
     }
 </script>
 <style lang="scss" scoped>
-  .brand-center-index {
+  .search-index {
+    margin: 0 auto;
+    margin-top: 20px;
     width: 1190px;
+    overflow: hidden;
+    .brand-recommend {
+      float: left;
+      margin-right: 15px;
+      .recommend-area {
+        width: 220px;
+        height: 862px;
+        background-color: #ffffff;
+        border-radius: 5px;
+        border: solid 1px #d2d2d2;
+      }
+      .recommend-head {
+        padding-left: 10px;
+        width: 220px;
+        height: 34px;
+        line-height: 34px;
+        background-color: #2496f1;
+        font-size: 14px;
+        border-top-left-radius: 5px;
+        border-top-right-radius: 5px;
+        color: #fff;
+          img{
+            margin-right: 6px;
+            margin-top: -2px;
+          }
+      }
+      .recommend-items{
+        li {
+          padding: 0px 0 11px 13px;
+          overflow: hidden;
+          height: 82px;
+          border-bottom: solid 1px #e5e5e5;
+          img{
+            float: left;
+            margin: 10px 10px 0 0;
+            width: 60px;
+            height: 60px;
+            background-color: #ffffff;
+            border-radius: 4px;
+            border: solid 1px #e5e5e5;
+          }
+          div.brand-item{
+            float: left;
+            margin-top: 6px;
+            width: 128px;
+            p{
+              margin-bottom: 6px;
+              font-size: 12px;
+              color: #666666;
+              width: 128px;
+              overflow: hidden;
+              white-space: nowrap;
+              text-overflow: ellipsis;
+            }
+            span {
+              display: inline-block;
+              width: 128px;
+              font-size: 12px;
+              color: #666;
+              overflow: hidden;
+            }
+            span.brand-application{
+              white-space: nowrap;
+              text-overflow: ellipsis;
+            }
+            span.brand-introduce {
+              display: -webkit-box;
+              -webkit-line-clamp: 2;
+              -webkit-box-orient: vertical;
+            }
+            &:hover p{
+              color: #2496f1;
+             }
+            &:hover span{
+              color: #2496f1;
+            }
+          }
+          &:last-child {
+             padding-top: 5px;
+             border-bottom: none;
+          }
+        }
+      }
+      .recommend-prod {
+        padding: 20px 0 0px 10px;
+        margin-top: 20px;
+        width: 220px;
+        height: 229px;
+        border-radius: 4px;
+        border: solid 1px rgba(210, 210, 210, 0.8);
+        .item {
+          overflow: hidden;
+          margin-bottom: 22px;
+          img{
+            margin-right: 10px;
+            float: left;
+            width: 39px;
+            height: 39px;
+          }
+          span {
+            float: left;
+            display: inline-block;
+            width: 155px;
+            word-break: break-all;
+          }
+        }
+      }
+    }
+  }
+  .brand-center-index {
+    float: left;
+    width: 955px;
     margin: 0 auto;
     >img {
-      width: 1190px;
-      height: 50px;
-      margin-top: 20px;
+      /*height: 50px;*/
       &:last-child{
         height: 70px;
         margin-bottom: 40px;
       }
     }
     .brand-index-tab {
-      height: 206px;
+      margin-top: 7px;
       position: relative;
-      background: url(/images/brandCenter/brand-index-tree.png) no-repeat;
-      background-position: 60px 71.7px;
-      background-color: #eef1fd;
+      width: 955px;
+      height: 34px;
+      border-radius: 5px;
+      border: solid 1px #e5e5e5;
       .brand-index-group {
-        height: 40px;
+        float: left;
+        height: 34px;
         text-align: center;
-        position: absolute;
         a {
-          width: 40px;
-          height: 40px;
+          width: 32px;
+          height: 32px;
           text-align: center;
           display: inline-block;
-          color: #fff;
-          line-height: 40px;
-          font-size: 16px;
-          vertical-align: middle;
-        }
-        span {
-          width: 10px;
-          height: 40px;
-          display: inline-block;
-          background: #898ef3;
+          color: #666;
+          line-height: 32px;
+          font-size: 14px;
           vertical-align: middle;
+          &:hover{
+             background-color: #2496f1;
+             border-radius: 2px;
+             color: #fff;
+           }
         }
-        &:nth-child(1) {
-          left: 184px;
-          top: 32px;
-          a {
-            background: #fc524a;
-            &.active {
-              font-weight: bold;
-              background-color: #ec190f;
-              position: relative;
-              bottom: 2px;
-            }
-            &:hover {
-              font-weight: bold;
-              position: relative;
-              bottom: 2px;
-              background-color: #ec190f;
-            }
-          }
-        }
-        &:nth-child(2) {
-          left: 322px;
-          bottom: 22px;
-          a {
-            background: #fdad33;
-            &.active {
-              font-weight: bold;
-              background-color: #ea8f02;
-              position: relative;
-              bottom: 2px;
-            }
-            &:hover {
-              font-weight: bold;
-              position: relative;
-              bottom: 2px;
-              background-color: #ea8f02;
-            }
-          }
-        }
-        &:nth-child(3) {
-          left: 472px;
-          top: 32px;
-          a {
-            background: #12c8b1;
-            &.active {
-              font-weight: bold;
-              background-color: #009b87;
-              position: relative;
-              bottom: 2px;
-            }
-            &:hover {
-              font-weight: bold;
-              position: relative;
-              bottom: 2px;
-              background-color: #009b87;
-            }
-          }
-        }
-        &:nth-child(4) {
-          left: 612px;
-          bottom: 22px;
-          a {
-            background: #24b8fe;
-            &.active {
-              font-weight: bold;
-              background-color: #0095db;
-              position: relative;
-              bottom: 2px;
-            }
-            &:hover {
-              font-weight: bold;
-              position: relative;
-              bottom: 2px;
-              background-color: #0095db;
-            }
-          }
-        }
-        &:nth-child(5) {
-          left: 745px;
-          top: 32px;
-          a {
-            background: #008cff;
-            &.active {
-              font-weight: bold;
-              background-color: #026dc5;
-              position: relative;
-              bottom: 2px;
-            }
-            &:hover {
-              font-weight: bold;
-              position: relative;
-              bottom: 2px;
-              background-color: #026dc5;
-            }
-          }
-        }
-        &:nth-child(6) {
-          left: 958px;
-          bottom: 22px;
-          a {
-            background: #898ef3;
-            &.active {
-              font-weight: bold;
-              background-color: #7479eb;
-              position: relative;
-              bottom: 2px;
-            }
-            &:hover {
-              font-weight: bold;
-              position: relative;
-              bottom: 2px;
-              background-color: #7479eb;
-            }
-          }
+        a.active{
+          background-color: #2496f1;
+          border-radius: 2px;
+          color: #fff;
         }
+        &:last-child{
+           margin-left: 55px;
+         }
+        &:last-child a{
+          letter-spacing: 12px;
+         }
+        &:last-child a:hover{
+           width: 56px;
+           padding-left: 3px;
+         }
       }
     }
     .brand-center-index-list {
       .brand-list-nav {
-        height: 56px;
-        padding-top: 8px;
+        width: 955px;
+        height: 34px;
+        line-height: 34px;
         position: relative;
-        &::after{
-          content: '';
-          height: 25px;
-          width: 1px;
-          position: absolute;
-          display: block;
-          border-left: 1px solid #c6c6c6;
-          top: 21px;
-          right: 192px;
-          z-index: 1000;
+        overflow: hidden;
+        border-bottom: solid 1px #e5e5e5;
+        span.search-index-show {
+          float: left;
+          display: inline-block;
+          width: 98px;
+          height: 34px;
+          line-height: 34px;
+          text-align: center;
+          background-color: #2496f1;
+          font-size: 14px;
+          color: #fdfbfb;
+          border-radius: 3px 3px 0px 0px;
+        }
+         span {
+            font-size: 14px;
+            color: #333;
+            margin-bottom: 20px;
+            .active-index {
+              font-size: 16px;
+              color: #3c7cf5;
+            }
+            .active-number {
+              font-weight: bold;
+              font-size: 16px;
+              color: #fc524a;
+            }
+          }
+        div.search{
+          float: left;
+          margin-left: 10px;
         }
         .filter-area {
           float: right;
@@ -409,23 +481,35 @@
           margin-right: 9px;
           position: relative;
           input {
-            height: 32px;
-            width: 318px;
-            line-height: 32px;
+            height: 28px;
+            width: 258px;
+            line-height: 28px;
             padding-left: 11px;
-            border: 1px solid #c6c6c6;
-            background-color: #fff;
+            background-color: #ffffff;
+            border-radius: 3px;
+            border: solid 1px #2496f1;
             padding-right: 32px;
             position: absolute;
             right: 150px;
-            top: 9px;
+            top: 0px;
           }
-          img {
+          b.search-btn {
             position: absolute;
-            top: 15px;
-            right: 154px;
+            top: 0px;
+            right: 150px;
+            width: 69px;
+            height: 28px;
+            line-height: 28px;
+            text-align: center;
+            font-size: 14px;
+            color: #fff;
+            background-color: #2496f1;
+            border-radius: 5px;
           }
           span {
+            height: 28px;
+            line-height: 28px;
+            float:left;
             margin-left: 47px;
             color: #666;
             a {
@@ -470,10 +554,11 @@
       }
       .brand-list-items {
         padding-top: 20px;
-        background: url('/images/brandCenter/brand-index-bg.png')no-repeat;
         background-size: cover;
         padding-bottom: 20px;
         position: relative;
+        height: 1034px;
+        border-bottom: 1px solid #dcdcdc;
         .search-modal-wrap {
           background: rgba(255, 255, 255, 0.3);
           position: absolute;
@@ -500,7 +585,7 @@
         }
         .brand-list-item-wrap {
           display: inline-block;
-          width: 297.5px;
+          width: 25%;
           margin-bottom: 29px;
           position: relative;
           height: 30px;
@@ -529,16 +614,18 @@
               right: 31px;
               top:0;
               border-radius: 4px;
-              background-color: rgb( 102, 102, 102 );
-              box-shadow: 1.5px 2.598px 7px 0px rgba(0, 0, 0,0.58);
               color: #fff;
               font-size: 11px;
               padding: 13px 15px;
               line-height: 18px;
               text-align: left;
               word-break: break-all;
+              background-color: #ffffff;
+              box-shadow: 0px 3px 7px 0px rgba(0, 0, 0, 0.19);
               span {
                 display: block;
+                font-size: 12px;
+                color: #333;
                 &.brand-application {
                   overflow: hidden;
                   text-overflow: ellipsis;
@@ -572,8 +659,17 @@
       }
       .page-wrap {
         text-align: right;
-        margin: 0 0 20px 0;
+        margin: 30px 0 115px 0;
         float: none;
+        .el-pagination .el-pager li.active{
+          border-color: #20a0ff;
+          background-color: #20a0ff;
+          color: #fff;
+          cursor: default;
+        }
+        .page-a{
+          background-color: #2496f1!important ;
+        }
       }
     }
   }

+ 129 - 33
components/brandCenter/RecommendBrand.vue

@@ -1,32 +1,30 @@
 <template>
   <div class="recommend-brand">
-    <div v-swiper:mySwiper="swiperOption">
-      <div class="swiper-wrapper">
-        <div class="swiper-slide" v-for="banner in sliceBanners">
-          <a :href="banner.detailsLink" target="_blank">
-            <img :src="banner.pictureLink"/>
-          </a>
+    <div class="brand-content">
+      <div class="brand-index-tab">
+        <div class="index-head">
+          <img src="/images/brandCenter/search-index.png"/>品牌索引
         </div>
-        <div v-if="sliceBanners.length === 0" class="swiper-button-prev"><i class="iconfont icon-swiper-left"></i></div>
-        <div v-if="sliceBanners.length === 0"class="swiper-button-next"><i class="iconfont icon-swiper-right"></i></div>
-       </div>
-      <div v-if="sliceBanners.length === 0" class="swiper-pagination swiper-pagination-bullets"></div>
-    </div>
-    <div class="recommend-area">
-      <ul class="recommend-items">
-        <li v-for="item in hotBrands.data">
-          <a :href="item.detailsLink" target="_blank">
-            <img :src="item.pictureLink" alt="">
-            <div>
-              <p>{{item.title}}</p>
-              <span class="brand-application" v-if="item.metadatas.contExp_abstract">应用领域:{{item.metadatas.contExp_abstract | applicationFilter}}</span>
-              <span class="brand-application" v-if="!item.metadatas.contExp_abstract">应用领域:-</span>
-              <span class="brand-introduce" v-if="item.metadatas.contExp_select">品牌介绍:{{item.metadatas.contExp_select | introduceFilter}}</span>
-              <span class="brand-introduce" v-if="!item.metadatas.contExp_select">品牌介绍:-</span>
-            </div>
-          </a>
-        </li>
-      </ul>
+        <div style="padding-top: 8px;">
+          <div class="brand-index-group index-group" v-for="(indexGroup, index) in indexGroups">
+            <span v-if="index == 5"></span>
+            <a @click="goBrandIndex(group_index)" v-for="group_index in indexGroup" :class="{'active': activeIndex==group_index}">{{group_index}}</a>
+            <span v-if="index == 5"></span>
+          </div>
+        </div>
+      </div>
+      <div v-swiper:mySwiper="swiperOption" class="swiper-container">
+        <div class="swiper-wrapper">
+          <div class="swiper-slide" v-for="banner in sliceBanners">
+            <a :href="banner.detailsLink" target="_blank">
+              <img :src="banner.pictureLink"/>
+            </a>
+          </div>
+          <div v-if="sliceBanners.length === 0" class="swiper-button-prev"><i class="iconfont icon-swiper-left"></i></div>
+          <div v-if="sliceBanners.length === 0"class="swiper-button-next"><i class="iconfont icon-swiper-right"></i></div>
+        </div>
+        <div v-if="sliceBanners.length === 0" class="swiper-pagination swiper-pagination-bullets"></div>
+      </div>
     </div>
   </div>
 </template>
@@ -34,6 +32,17 @@
   export default {
     data () {
       return {
+        indexGroups: [
+          ['A', 'B', 'C', 'D', 'E'],
+          ['F', 'G', 'H', 'I', 'J'],
+          ['K', 'L', 'M', 'N', 'O'],
+          ['P', 'Q', 'R', 'S', 'T'],
+          ['U', 'V', 'W', 'X', 'Y', 'Z'],
+          ['0~9']
+        ],
+        nowPage: 1,
+        keyword: '',
+        isSearch: false,
         activeSlide: 0,
         swiperOption: {
           autoplay: 6000,
@@ -88,14 +97,35 @@
       floors () {
         return this.$store.state.floor.list.data
       },
-      hotBrands () {
-        return this.$store.state.product.brand.recommends.data
-      },
       banners () {
         return this.$store.state.carousel.brandCarousel.data
       },
       sliceBanners () {
         return this.banners.data && this.banners.data.length ? this.banners.data.slice(0, 3) : []
+      },
+      activeIndex () {
+        return !this.isSearch ? this.$route.params.initial : ''
+      }
+    },
+    methods: {
+      goBrandIndex: function (index) {
+        if (index === this.$route.params.initial) {
+          this.initParams()
+          this.reloadData()
+        } else {
+          this.$router.push('/product/brand/brandList/' + index)
+//            window.location.href = '/product/brand/brandList/' + index + '#index'
+//            window.open('/product/brand/brandList/' + index + '#index', '_self')
+        }
+      },
+      initParams: function () {
+        this.nowPage = 1
+        this.isSearch = false
+        this.keyword = ''
+        this.reloadData()
+      },
+      reloadData: function () {
+        !this.isSearch ? this.$store.dispatch('product/loadBrandsPager', {'initial': this.$route.params.initial, 'page': this.nowPage, 'count': this.pageSize, 'keyword': this.keyword}) : this.searchData()
       }
     }
   }
@@ -105,18 +135,79 @@
     width: 1190px;
     margin: 0 auto;
     margin-top: 10px;
+    .brand-content{
+      overflow: hidden;
+      .brand-index-tab {
+        margin-right: 15px;
+        float: left;
+        width: 220px;
+        height: 400px;
+        background-color: #ffffff;
+        border-radius: 5px;
+        border: solid 1px #d2d2d2;
+        .index-head {
+          padding-left: 10px;
+          width: 220px;
+          height: 34px;
+          line-height: 34px;
+          background-color: #2496f1;
+          font-size: 14px;
+          border-top-left-radius: 5px;
+          border-top-right-radius: 5px;
+          color: #fff;
+          img{
+            margin-right: 6px;
+            margin-top: -2px;
+          }
+        }
+        .brand-index-group {
+          margin: 0 auto 22px;
+          width: 200px;
+          height: 40px;
+          background-color: rgba(36, 150, 241, 0.1);
+          border-radius: 4px;
+          /*opacity: 0.1;*/
+          a{
+            display: inline-block;
+            width: 40px;
+            height: 40px;
+            line-height: 40px;
+            text-align: center;
+            font-size: 16px;
+            color: #666;
+            border-radius: 5px;
+            /*background-color: #2496f1;*/
+            &:hover{
+               background-color: #2496f1;
+               color: #fff;
+             }
+          }
+          &:last-child{
+             margin-bottom: 0;
+           }
+           &:last-child a{
+              letter-spacing: 15px;
+              padding-left: 12px;
+            }
+        }
+      }
+    }
     .swiper-container {
       z-index: 2;
+      float: left;
+      width: 955px;
+      height: 400px;
       .swiper-wrapper {
-        width: 1190px;
+        width: 955px;
+        height: 400px;
         margin: 0 auto;
         .swiper-slide {
-          height: 163px;
+          height: 400px;
           margin: 0 auto;
           display: flex;
           img {
-            width: 1190px;
-            height: 163px;
+            width: 955px;
+            height: 400px;
             border: 1px solid #ccc;
           }
         }
@@ -222,4 +313,9 @@
       }
     }
   }
+  .recommend-brand .brand-content .brand-index-tab .brand-index-group a.active{
+    background-color: #2496f1;
+    border-radius: 2px;
+    color: #fff;
+  }
 </style>

+ 3 - 3
components/common/PcSearchHeader.vue

@@ -204,11 +204,11 @@
       line-height: normal;
     }
     ul {
-      width: 100%;
+      width: 258px;
       background: #fff;
       position: absolute;
-      left: 0;
-      top: 36px;
+      left: 558px;
+      top: 28px;
       border: 1px solid #ccc;
       border-radius: 5px;
       max-height: 400px;

+ 4 - 3
components/common/page/pageComponent.vue

@@ -95,7 +95,8 @@
     border-color: #ddd;
   }
   .el-pager li.active {
-    background: #5078cb!important;
+    background: #20a0ff!important;
+    border: none;
   }
   .el-icon-arrow-left:before {
     content: "\f100";
@@ -138,13 +139,13 @@
     transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
   }
   .page-a {
-    background: #5078cb !important;
+    background: #2496f1 !important;
     color: #fff !important;
     float: right!important;
   }
   .page-a {
     color: #fff;
-    border-color: #4574e8;
+    border-color: #2496f1;
     padding: 6px 6px!important;
     font-size: 14px!important;
     border-top-right-radius: 4px!important;

+ 2 - 2
components/common/upload/upload.vue

@@ -4,7 +4,7 @@
       <img :src="qualifications.url==''? uploadImgTemp : isPdf?'/images/all/timg.png':qualifications.url" class="previewImage" :class="{'mobile-previewImage': isMobile}"/>
       <input type="file" v-if="!qualifications.url" class="com-input" @change="update" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf" />
     </div>
-    <div class="hover-show" v-if="qualifications.url">
+    <div class="hover-show" v-if="qualifications.url && !noReview">
       <span class="delete" title="删除" @click="deleteImg(qualifications.url)"><i class="fa fa-trash"></i></span>
       <a @click="showImg(qualifications.url)"><i class="fa fa-search"></i>查看</a>
     </div>
@@ -21,7 +21,7 @@
 </template>
 <script>
   export default {
-    props: ['typeData', 'url', 'NopassThree'],
+    props: ['typeData', 'url', 'NopassThree', 'noReview'],
     data () {
       return {
         qualifications: {

+ 9 - 9
components/home/Carousel.vue

@@ -6,11 +6,11 @@
         <div v-swiper:mySwiper="swiperOption">
           <div class="swiper-wrapper">
             <div class="swiper-slide" v-for="banner in banners">
-              <a :href="banner.hrefUrl" target="_blank" v-if="banner.hrefUrl">
-                <img :src="banner.pictureUrl"/>
+              <a :href="banner.detailsLink" target="_blank" v-if="banner.detailsLink">
+                <img :src="banner.pictureLink"/>
               </a>
-              <span v-if="!banner.hrefUrl">
-                <img :src="banner.pictureUrl"/>
+              <span v-if="!banner.detailsLink">
+                <img :src="banner.pictureLink"/>
               </span>
             </div>
           </div>
@@ -34,10 +34,10 @@
     },
     computed: {
       banners () {
-        if (this.$store.state.carousel.banners) {
-          let banner = this.$store.state.carousel.banners.data.slice()
+        if (this.$store.state.carousel.banners.data) {
+          let banner = this.$store.state.carousel.banners.data.data.slice()
            banner.sort(function (a, b) {
-             return a.orderNumber - b.orderNumber
+             return a.contentId - b.contentId
            })
           return banner
         } else {
@@ -45,7 +45,7 @@
         }
       },
       activeColor () {
-        return this.banners.length ? this.banners[this.activeSlide].metadata['background-color'] : null
+        return this.banners.length ? this.banners[this.activeSlide].metadatas['contExp_select'] : null
       },
       swiperOption () {
         let _this = this
@@ -73,7 +73,7 @@
             let carousel = document.querySelector('.carousel')
             if (carousel && carousel !== null) {
               carousel.style.backgroundColor =
-                _this.banners[swiper.activeIndex - 1].metadata['background-color']
+                _this.banners[swiper.activeIndex - 1].metadatas['contExp_select']
             }
           }
         }

+ 2 - 2
components/home/floor/Floor.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="floor" :class="!isDefault ? 'normal-floor' : 'price-floor'">
     <h3><span v-if="!isDefault">F{{ floor.floorNumber }}&nbsp;{{ floor.name }}</span></h3>
-    <ul class="list-unstyled clearfix" :style="{borderColor: floor.items[1].backGroundColor || '#d8d8d8'}">
+    <ul class="list-unstyled clearfix" :style="{borderColor: floor.items[0].backGroundColor || '#d8d8d8'}">
       <li v-for="(item, index) in floor.items" :key="index" class="floor-item" :class="item.size + (isDefault ? ' default-floor' : '')"
-          :style="{backgroundColor: item.backGroundColor || '#fff', borderColor: item.borderColor || floor.items[1].backGroundColor || '#d8d8d8'}">
+          :style="{backgroundColor: item.backGroundColor || '#fff', borderColor: item.borderColor || floor.items[0].backGroundColor || '#d8d8d8'}">
         <img v-if="!item.isNull && item.size != 'large' && isDefault" src="/images/floor/specificPrice-home.png" alt="">
         <a v-if="!item.isNull" :href="item.hrefUrl" target="_blank">
           <img :src="item.pictureUrl" class="floor-item-img"/>

+ 3 - 3
components/home/floor/FloorBar.vue

@@ -1,8 +1,8 @@
 <template>
   <ul class="floor-bar list-unstyled" :style="!visible?'opacity: 0;':'opacity: 1;'">
-    <li v-for="(floor, index) in floors.data" :key="index" class="floor-bar-item">
+    <li v-for="(floor, index) in floors" :key="index" class="floor-bar-item">
       <a @click="jumpFloor(index)"
-         :style="{backgroundColor: index==activeFloor?floor.items[1].backGroundColor:'#b7dfff'}">
+         :style="{backgroundColor: index==activeFloor?floor.items[0].backGroundColor:'#b7dfff'}">
         <span>F{{ floor.floorNumber }}</span><br/>
         <span class="floor-item-name">{{ floor.name }}</span>
       </a>
@@ -16,7 +16,7 @@
     name: 'floor-bar',
     props: {
       floors: {
-        type: Object
+        type: Array
       }
     },
     data () {

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

@@ -1,7 +1,7 @@
 <template>
   <div class="floor-list">
     <div class="container">
-      <floor-bar :floors="floors"></floor-bar>
+      <floor-bar :floors="floorsList"></floor-bar>
       <!--<a href="/store/33069557578d44e69bd91ad12d28a8d4" target="_blank"><img src="/images/all/banner-cuxiao.png" alt=""></a>-->
       <!--<div v-if="purchaseManListData && false"></div>-->
       <div class="banner">
@@ -51,7 +51,7 @@
       </div>
       <floor :floor="defaultFloors[0]" :isDefault="true" v-if="!isEmpty"></floor>
       <floor :floor="defaultFloors[1]" :isDefault="true" v-if="!isEmpty"></floor>
-      <floor v-for="(floor, index) in floors.data" :floor="floor" :isDefault="false" :key="index"></floor>
+      <floor v-for="(floor, index) in floorsList" :floor="floor" :isDefault="false" :key="index"></floor>
     </div>
     <span v-if="expandFloors && false">floor</span>
     <say-price :current="currentSayPriceIndex"
@@ -140,8 +140,44 @@
       }
     },
     computed: {
-      floors () {
-        return this.$store.state.floor.list
+      floorsF1 () {
+        return this.$store.state.floor.listF1.data
+      },
+      floorsF2 () {
+        return this.$store.state.floor.listF2.data
+      },
+      floorsF3 () {
+        return this.$store.state.floor.listF3.data
+      },
+      floorsF4 () {
+        return this.$store.state.floor.listF4.data
+      },
+      floorsF5 () {
+        return this.$store.state.floor.listF5.data
+      },
+      floorsList () {
+        let lists = []
+        let floorName = ['传感器件', '连接器件', '分立器件', '被动器件', '电源产品']
+        for (let i = 0; i < floorName.length; i++) {
+          lists.push({'floorNumber': i + 1, 'name': floorName[i]})
+        }
+        lists[0].items = this.floorsF1.data
+        lists[1].items = this.floorsF2.data
+        lists[2].items = this.floorsF3.data
+        lists[3].items = this.floorsF4.data
+        lists[4].items = this.floorsF5.data
+        lists.slice().forEach(function(value) {
+          let lengs = value.items.length
+          for (let j = 0; j < lengs; j++) {
+            value.items[j].backGroundColor = value.items[j].metadatas.contExp_select
+            value.items[j].body = value.items[j].metadatas.contExp_remark
+            value.items[j].name = value.items[j].metadatas.contExp_abstract
+            value.items[j].size = value.items[j].metadatas.contExp_spec
+            value.items[j].hrefUrl = value.items[j].detailsLink
+            value.items[j].pictureUrl = value.items[j].pictureLink
+          }
+        })
+        return lists
       },
       isProd () {
         return this.$store.state.option.url === 'http://www.usoftmall.com'

+ 18 - 19
components/main/Nav.vue

@@ -18,24 +18,24 @@
         <span>B2B商务</span>
         <img class="new-animate" src="/images/all/hot.png" alt="">
       </a>
-      <a class="item expand-item" :class="{'active': isActive}">
-        <span>{{name}}
-          <i class="iconfont icon-arrow-down"></i>
-          <i class="iconfont icon-arrow-up"></i>
+      <nuxt-link  to="/provider/shop" class="item expand-item">
+        <span>店铺
+          <!--<i class="iconfont icon-arrow-down"></i>-->
+          <!--<i class="iconfont icon-arrow-up"></i>-->
         </span>
-        <ul class="expand-list" v-if="isMounted">
-          <nuxt-link to="/provider/factories" tag="li" v-show="name !== '原厂专区'">
-            <!--<nuxt-link to="/provider/factories">原厂专区</nuxt-link>-->
-            <span>原厂专区</span>
-          </nuxt-link>
-          <nuxt-link to="/provider/home" tag="li" v-show="name !== '代理经销'">
-            <span>代理经销</span>
-          </nuxt-link>
-          <li @click="open('/store/33069557578d44e69bd91ad12d28a8d4')">
-            <span>优软寄售</span>
-          </li>
-        </ul>
-      </a>
+        <!--<ul class="expand-list" v-if="isMounted">-->
+          <!--<nuxt-link to="/provider/factories" tag="li" v-show="name !== '原厂专区'">-->
+            <!--&lt;!&ndash;<nuxt-link to="/provider/factories">原厂专区</nuxt-link>&ndash;&gt;-->
+            <!--<span>原厂专区</span>-->
+          <!--</nuxt-link>-->
+          <!--<nuxt-link to="/provider/home" tag="li" v-show="name !== '代理经销'">-->
+            <!--<span>代理经销</span>-->
+          <!--</nuxt-link>-->
+          <!--<li @click="open('/store/33069557578d44e69bd91ad12d28a8d4')">-->
+            <!--<span>优软寄售</span>-->
+          <!--</li>-->
+        <!--</ul>-->
+      </nuxt-link>
       <nuxt-link to="/product/brand/brandList/A" class="item">
         <span>品牌墙</span>
       </nuxt-link>
@@ -100,7 +100,6 @@
   .nav-list {
     background-color: rgb(244, 248, 255);
     height: $nav-height;
-    margin-bottom:20px;
 
     .item {
       display: inline-block;
@@ -171,7 +170,7 @@
       }
 
       &.item-first {
-        width: 200px;
+        width: 220px;
         margin: 0;
         background-color: rgb(33, 71, 151);
         font-size: 14px;

+ 9 - 7
components/mobile/MobileHeader.vue

@@ -135,13 +135,6 @@
         window.history.back(-1)
       },
       initHeader: function (val, query) {
-//        if (val !== '/' || !val || val === '') {
-//          this.showHeader = true
-//          this.showSearch = !val.startsWith('/mobile/search')
-//        } else {
-//          this.showHeader = false
-//          this.showSearch = false
-//        }
         this.showSearchIcon = false
         this.showHeader = val && val !== '/' && val !== '/mobile/applyPurchase/list' && !this.startWith(val, '/mobile/supplier')
 //        this.showSearch = val !== '/' && !this.startWith(val, '/mobile/search')
@@ -203,6 +196,15 @@
         } else if (this.startWith(val, '/mobile/store')) {
           this.showSearchIcon = false
           title = '开店申请'
+        } else if (val === '/mobile/center/user/cart') {
+          this.showSearchIcon = false
+          title = '购物车'
+        } else if (this.startWith(val, '/mobile/center/user/pay')) {
+          this.showSearchIcon = false
+          title = '填写订单'
+        } else if (this.startWith(val, '/mobile/center/user/doPay')) {
+          this.showSearchIcon = false
+          title = '待付款订单'
         } else {
           this.showSearchIcon = true
           title = '优软商城'

+ 81 - 0
components/mobile/base/BottomModalWrapper.vue

@@ -0,0 +1,81 @@
+<template>
+  <div class="mobile-modal" v-if="showModal" @click="$emit('closeAction', false)">
+    <div class="mobile-modal-box bottom-modal-wrapper" @click="stopPropagation($event)">
+      <div class="bottom-modal-header">{{title}}<i @click="$emit('closeAction', false)" class="icon-guanbi1 iconfont"></i></div>
+      <slot></slot>
+      <div class="bottom-modal-footer" @click="$emit('closeAction', true)">{{submitText}}</div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    props: {
+      showModal: {
+        type: Boolean,
+        default: false
+      },
+      title: {
+        type: String,
+        default: ''
+      },
+      submitText: {
+        type: String,
+        default: '确定'
+      }
+    }
+//    watch: {
+//      showModal: {
+//        handler: function (val) {
+//          if (val) {
+//            this.init()
+//          }
+//        }
+//      }
+//    },
+//    methods: {
+//      init () {
+//        this.$nextTick(() => {
+//          this._initscroll()
+//        })
+//      }
+//    },
+//    mounted() {
+//      this.init()
+//    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-modal {
+    .bottom-modal-wrapper {
+      bottom: 0;
+      top: initial;
+      left: 0;
+      right: 0;
+      text-align: center;
+      .bottom-modal-header {
+        height: 1rem;
+        line-height: 1rem;
+        font-weight: bold;
+        font-size: .42rem;
+        background: #fff;
+        position: relative;
+        border-top-left-radius: .2rem;
+        border-top-right-radius: .2rem;
+        i {
+          font-size: .32rem;
+          position: absolute;
+          right: .2rem;
+          top: 0;
+          color: #bfbfbf;
+        }
+      }
+      .bottom-modal-footer {
+        height: 1rem;
+        line-height: 1rem;
+        background: #3f84f6;
+        font-size: .36rem;
+        color: #fff;
+      }
+    }
+  }
+</style>

+ 59 - 0
components/mobile/base/LinkUser.vue

@@ -0,0 +1,59 @@
+<template>
+  <div class="mobile-modal" v-if="showLink">
+    <div class="mobile-modal-box mobile-link-en">
+      <div class="mobile-modal-header">联系方式<i @click="$emit('closeAction')" class="icon-guanbi iconfont"></i></div>
+      <div class="mobile-modal-content">
+        <div v-if="checkTel" class="clearfix"><span class="pull-left">电话:</span><a :href="'tel:' + infoObj.enTel" target="_blank" class="content-line link-url pull-left">{{infoObj.enTel}}</a></div>
+        <div v-if="checkPhone" class="clearfix"><span class="pull-left">手机:</span><a :href="'tel:' + infoObj.enPhone" target="_blank" class="content-line link-url pull-left">{{infoObj.enPhone}}</a></div>
+        <div v-if="checkWeixin" class="clearfix"><span class="pull-left">微信:</span><span class="content-line pull-left">{{infoObj.enWeixin}}</span></div>
+        <div v-if="checkQQ" class="clearfix"><span class="pull-left">Q&nbsp;Q:</span><span class="content-line pull-left">{{infoObj.enQQ}}</span></div>
+        <div v-if="!empty">暂无联系方式</div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    props: {
+      showLink: {
+        type: Boolean,
+        default: false
+      },
+      infoObj: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      }
+    },
+    computed: {
+      checkTel () {
+        return this.checkInfo(this.infoObj.enTel)
+      },
+      checkPhone () {
+        return this.checkInfo(this.infoObj.enPhone)
+      },
+      checkWeixin () {
+        return this.checkInfo(this.infoObj.enWeixin)
+      },
+      checkQQ () {
+        return this.checkInfo(this.infoObj.enQQ)
+      },
+      empty () {
+        return this.checkTel || this.checkPhone || this.checkWeixin || this.checkQQ
+      }
+    },
+    methods: {
+      checkInfo: function (str) {
+        return str && str.trim() !== ''
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-modal .mobile-modal-box .mobile-modal-content {
+    .clearfix {
+      padding-left: 1rem;
+    }
+  }
+</style>

+ 54 - 0
components/mobile/base/ModalWrapper.vue

@@ -0,0 +1,54 @@
+<template>
+  <div class="mobile-modal" v-if="showModal" @click="$emit('closeAction')">
+    <div class="mobile-modal-box mobile-modal-wrapper" @click="stopPropagation($event)">
+      <div class="mobile-modal-header">{{title}}<i @click="$emit('closeAction')" class="icon-guanbi iconfont"></i></div>
+      <div ref="mobileModalBox" class="mobile-scroll-wrap"><div><slot></slot></div></div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    props: {
+      showModal: {
+        type: Boolean,
+        default: false
+      },
+      title: {
+        type: String,
+        default: ''
+      }
+    },
+    watch: {
+      showModal: {
+        handler: function (val) {
+          if (val) {
+            this.init()
+          }
+        }
+      }
+    },
+    methods: {
+      init () {
+        this.$nextTick(() => {
+          this._initscroll()
+        })
+      }
+    },
+    mounted() {
+      this.init()
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-modal .mobile-modal-wrapper {
+    top: 11%;
+    bottom: 11%;
+    left: 5%;
+    right: 5%;
+  }
+  .mobile-scroll-wrap {
+    overflow: hidden;
+    height: 100%;
+    background: #fff;
+  }
+</style>

+ 4 - 1
components/mobile/base/index.js

@@ -1,4 +1,7 @@
 import SearchHeader from './SearchHeader.vue'
 import SearchHeader2 from './SearchHeader2.vue'
+import LinkUser from './LinkUser.vue'
+import ModalWrapper from './ModalWrapper.vue'
+import BottomModalWrapper from './BottomModalWrapper.vue'
 
-export { SearchHeader, SearchHeader2 }
+export { SearchHeader, SearchHeader2, LinkUser, ModalWrapper, BottomModalWrapper }

+ 2 - 2
components/mobile/common/StatisticsMobile.vue

@@ -137,7 +137,7 @@
             num += ''
           }
         }
-        return num
+        return num || 0
       },
       formatDouble (num) {
         if (num === '' || !num) return false
@@ -152,7 +152,7 @@
         } else {
           num += ''
         }
-        return num
+        return num || 0
       }
     },
     computed: {

+ 11 - 11
components/provider/Carousel.vue

@@ -3,8 +3,8 @@
     <div v-swiper:mySwiper="swiperOption">
       <div class="swiper-wrapper">
         <div class="swiper-slide" v-for="banner in banners">
-          <a :href="banner.hrefUrl" target="_blank">
-            <img :src="banner.pictureUrl">
+          <a :href="banner.detailsLink" target="_blank">
+            <img :src="banner.pictureLink">
           </a>
         </div>
       </div>
@@ -38,9 +38,9 @@
       },
       banners () {
         if (this.$store.state.carousel.banners) {
-          let banner = this.$store.state.carousel.banners.data.slice()
+          let banner = this.$store.state.carousel.banners.data.data.slice()
           banner.sort(function (a, b) {
-            return a.orderNumber - b.orderNumber
+            return a.contentId - b.contentId
           })
           return banner
         } else {
@@ -69,14 +69,14 @@
 <style lang="scss" scoped>
   @import '~assets/scss/variables';
 
-  $carousel_width: 910px;
-  $carousel_width_670: 670px;
-  $carousel_height: 358px;
+  $carousel_width: 955px;
+  /*$carousel_width_670: 670px;*/
+  $carousel_height: 400px;
 
   .carousel {
-    &.width_670{
-      width: $carousel_width_670;
-    }
+    /*&.width_670{*/
+      /*width: $carousel_width_670;*/
+    /*}*/
     width: $carousel_width;
     height: $carousel_height;
     transition: background-color .3s;
@@ -87,7 +87,7 @@
       .swiper-slide {
         img {
           display: block;
-          width: 100%;
+          width: 955px;
           height: $carousel_height;
         }
       }

+ 127 - 67
components/provider/HotCommodity.vue

@@ -1,14 +1,58 @@
 <template>
-  <div class="container marketing hot-commodity">
-    <div class="title">热销器件</div>
-    <ul class="list-unstyled list-inline">
-      <li class="hot-commodity-box" v-for="(component, index) in hotComponents" :class="{ 'border-right' : index % 5 == 4 }">
-        <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
-          <img :src="component.img || '/images/store/common/default.png'"/>
-          <span>{{component.code}}</span>
-        </a>
-      </li>
-    </ul>
+  <div class="hot-commodity recommend-fragment">
+    <div class="title-icon">
+      <span>产品推荐</span>
+      <img src="/images/original/line.png" alt=""/>
+    </div>
+    <div v-swiper:mySwiper="swiperOption" v-if="hotComponents || hotComponents.length>0">
+      <div class="swiper-wrapper">
+        <div class="swiper-slide" v-if="hotComponents.length>0">
+          <ul class="recommend-list clearfix">
+            <li v-for="(component, index) in hotComponents.slice(0,2)" class="big">
+              <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
+                <div class="img"><img :src="component.img || '/images/store/common/default.png'"/></div>
+                <span class="name">{{component.code}}</span>
+                <div class="price">1111.23242</div>
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="swiper-slide" v-if="hotComponents.length>=2">
+          <ul class="recommend-list clearfix">
+            <li v-for="(component, index) in hotComponents.slice(2,4)" class="big">
+              <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
+                <div class="img"><img :src="component.img || '/images/store/common/default.png'"/></div>
+                <span class="name">{{component.code}}</span>
+                <div class="price">1111.23242</div>
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="swiper-slide" v-if="hotComponents.length>=4">
+          <ul class="recommend-list clearfix">
+            <li v-for="(component, index) in hotComponents.slice(4,6)" class="big">
+              <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
+                <div class="img"><img :src="component.img || '/images/store/common/default.png'"/></div>
+                <span class="name">{{component.code}}</span>
+                <div class="price">1111.23242</div>
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="swiper-slide" v-if="hotComponents.length>=6">
+          <ul class="recommend-list clearfix">
+            <li v-for="(component, index) in hotComponents.slice(6,8)" class="big">
+              <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
+                <div class="img"><img :src="component.img || '/images/store/common/default.png'"/></div>
+                <span class="name">{{component.code}}</span>
+                <div class="price">1111.23242</div>
+              </a>
+            </li>
+          </ul>
+        </div>
+      </div>
+      <div class="swiper-pagination swiper-pagination-bullets" style="bottom: -3px!important;"></div>
+    </div>
   </div>
 </template>
 <script>
@@ -17,68 +61,84 @@ export default {
   name: 'hot-commodity',
   computed: {
     hotComponents () {
+      console.log(this.$store.state.provider.storeCms.hotComponents.data, 'c')
       return this.$store.state.provider.storeCms.hotComponents.data
+    },
+    // 产品推荐轮播
+    swiperOption () {
+      return {
+        autoplay: 5000,
+        initialSlide: 0,
+        loop: true,
+        effect: this.effect,
+        lazyLoading: true,
+        // 解决点击分页器后图片就不能轮播的问题
+        autoplayDisableOnInteraction: false,
+        pagination: '.swiper-pagination',
+        paginationClickable: true,
+        paginationElement: 'li'
+      }
     }
   }
 }
 </script>
-<style scoped>
+<style scoped lang="scss">
   .hot-commodity {
-    margin-bottom: 40px;
-  }
-
-  .marketing .title {
-    font-size: 24px;
-    font-family: "Microsoft Yahei", "微软雅黑";
-    line-height: 60px;
-    height: 60px;
-    font-weight: inherit;
-  }
-
-  .hot-commodity .hot-commodity-box {
-    width: 238px;
-    height: 239px;
-    border-top: 1px solid #D6D3CE;
-    border-left: 1px solid #D6D3CE;
-    overflow: hidden;
-  }
-
-  .hot-commodity > ul > li {
-    /*float: left;*/
-  }
-  .hot-commodity > ul > li:hover{
-    border: #5078cb 1px solid;
-  }
-  .hot-commodity > ul > li:hover span{
-    color: #5078cb;
-    font-weight: bold;
-  }
-  .hot-commodity > ul > li:hover img{
-    transform: scale(1.1);
-  }
-  .hot-commodity ul {
-    border-bottom: 1px solid #D6D3CE;
-    font-size: 0px;
-  }
-
-  .hot-commodity-box img {
-    width: 226px;
-    height: 180px;
-    margin-top: 10px;
-  }
-
-  .hot-commodity-box span {
-    font-size: 14px;
-    color: #333434;
-    text-align: center;
-    display: inline-block;
-    width: 100%;
-    height: 30px;
-    line-height: 30px;
-    margin-top: 12px;
-  }
-
-  .hot-commodity .border-right {
-    border-right: 1px solid #D6D3CE;
+    margin: 10px 0 30px 0;
+    width: 220px;
+    height: 464px;
+    background-color: #fff;
+    border-radius: 5px;
+    .title-icon {
+      position: relative;
+      width: 100%;
+      height: 34px;
+      line-height: 34px;
+      text-align: center;
+      span{
+        font-family: AdobeHeitiStd-Regular;
+        font-size: 16px;
+        color: #333;
+      }
+      img{
+        position: absolute;
+        top: 14px;
+        left: 25px;
+      }
+    }
+    ul{
+      padding: 14px 0 0;
+      width: 220px;
+      li{
+        margin: 0 auto 25px;
+        text-align: center;
+        .img{
+          margin: 0 auto;
+          width: 181px;
+          height: 117px;
+          border-radius: 2px;
+          border: solid 1px #e2e2e2;
+          img{
+            width: 91px;
+            height: 87px;
+          }
+        }
+        .name {
+          display: inline-block;
+          margin: 10px auto;
+          font-size: 14px;
+          color: #333;
+        }
+        .price{
+          margin: 0 auto;
+          width: 124px;
+          height: 21px;
+          line-height: 21px;
+          font-size: 13px;
+          color: #fff;
+          background-color: #e6382f;
+        }
+      }
+    }
   }
 </style>

+ 67 - 106
components/provider/NewStore.vue

@@ -1,40 +1,37 @@
 <template>
   <div class="new-sign-module">
     <div class="head">
-      <div class="img">
-        <img src="/images/store/home/new.png" />
-      </div>
       <div class="title">新入驻的商家</div>
     </div>
-    <ul class="list-unstyled list-inline" style="height: 210px;">
+    <ul class="list-unstyled list-inline">
       <li class="new-store" v-for="(store, index) in stores">
         <div class="img">
-          <img :src="store.logoUrl || '/images/store/common/default.png'" style="max-width: 100%;max-height: 100%;" />
+          <img :src="store.logoUrl || '/images/store/common/default.png'"/>
         </div>
         <div class="content">
           <div class="name"><a target="_blank" :href="'/store/' + store.uuid" :title="store.storeName">{{store.storeName}}</a></div>
-          <div class="subject" style="display: none;">
-            主营:<span>暂无</span>
-          </div>
-          <div class="subject">
-            企业介绍:<span>{{store.enterprise.description || '暂无企业介绍'}}</span>
-          </div>
+          <!--<div class="subject" style="display: none;">-->
+            <!--主营:<span>暂无</span>-->
+          <!--</div>-->
+          <!--<div class="subject">-->
+            <!--企业介绍:<span>{{store.enterprise.description || '暂无企业介绍'}}</span>-->
+          <!--</div>-->
         </div>
       </li>
     </ul>
-    <div class="sign">
-      <div class="img">
-        <img src="/images/store/home/shop.png"/>
-      </div>
-      <div class="content">
-        <div class="count">
-          已入驻商家<span>{{storeCount}}</span>家
-        </div>
-        <div>
-          <a @click="goStoreApply"><button>立即入驻</button></a>
-        </div>
-      </div>
-    </div>
+    <!--<div class="sign">-->
+      <!--<div class="img">-->
+        <!--<img src="/images/store/home/shop.png"/>-->
+      <!--</div>-->
+      <!--<div class="content">-->
+        <!--<div class="count">-->
+          <!--已入驻商家<span>{{storeCount}}</span>        -->
+        <!--</div>-->
+        <!--<div>-->
+          <!--<a @click="goStoreApply"><button>立即入驻</button></a>-->
+        <!--</div>-->
+      <!--</div>-->
+    <!--</div>-->
   </div>
 </template>
 <script>
@@ -61,96 +58,60 @@ export default {
   @import '~assets/scss/variables';
 
   .new-sign-module {
-    width: 280px;
-    height: 360px;
-    padding-left: 10px;
-    border-right: 1px solid #D6D3CE;
-    border-bottom: 1px solid #D6D3CE;
-    border-top: 1px solid #D6D3CE;
-
-    a {
-      color: #337ab7;
-      text-decoration: none;
-    }
-
-    ul {
-      margin-bottom: 10px;
-    }
-
+    width: 220px;
+    height: 352px;
+    background-color: #ffffff;
+    border-radius: 5px;
     .head {
-      height: 60px;
-
-      .img {
-        margin-right: 14px;
-        width: 50px;
-        height: 50px;
-        display: inline-block;
-        text-align: center;
-        line-height: 50px;
-
-        img {
-          vertical-align: middle;
-        }
-      }
-
+      width: 220px;
+      height: 34px;
+      line-height: 34px;
+      text-align: center;
+      background-color: #2496f1;
+      border-top-left-radius: 5px;
+      border-top-right-radius: 5px;
       .title {
-        height: 60px;
-        line-height: 60px;
-        font-size: 18px;
-        font-weight: 600;
-        display: inline-block;
+        font-size: 16px;
+        color: #fff;
       }
     }
-
-    .new-store {
-      display: inline-block;
-      height: 70px;
-      padding-bottom: 0;
-      width: 260px;
-
-      .img {
-        width: 50px;
-        height: 50px;
-        display: inline-block;
-        text-align: center;
-        line-height: 45px;
-        border: #e8e8e8 1px solid;
-
-        img {
-          vertical-align: middle;
+    .list-inline {
+      padding: 14px 0px 0 8px;
+      li{
+        margin-bottom: 12px;
+        overflow: hidden;
+        .img {
+          float: left;
+          margin-right: 8px;
+          width: 48px;
+          height: 48px;
+          border: 1px solid #dcdcdc;
+          img{
+            width: 100%;
+            height: 100%;
+          }
         }
-      }
-
-      .content {
-        width: 185px;
-        display: inline-block;
-        padding: 8px;
-        vertical-align: middle;
-        margin-left: 10px;
-
-        .name {
-          font-size: 16px;
-          color: #6D6B66;
-          width: 190px;
-          line-height: 28px;
-          text-overflow: ellipsis;
-          overflow: hidden;
-          white-space: nowrap;
-          word-break: keep-all;
-        }
-
-        .subject {
-          font-size: 14px;
-          color: #777570;
-          line-height: 28px;
-          overflow: hidden;
-          text-overflow: ellipsis;
-          white-space: nowrap;
-          word-break: keep-all;
+        .content{
+          float: left;
+          width: 145px;
+          line-height: 48px;
+          .name {
+            width: 145px;
+            font-size: 14px;
+            color: #333333;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            a{
+              color: #333;
+              &:hover{
+                  color:#2496f1;
+               }
+            }
+          }
         }
       }
     }
-
     .sign {
       height: 80px;
       box-shadow: 0px -5px 20px 0px #E3E1DE;

+ 73 - 116
components/provider/RecommendOriginal.vue

@@ -1,7 +1,9 @@
 <template>
-  <div class="container" id="recommends">
-    <div class="title-icon">原厂推荐</div>
-    <div class="hr-blue"></div>
+  <div id="recommends">
+    <div class="title-icon">
+      <span>店铺推荐</span>
+      <img src="/images/original/line.png" alt=""/>
+    </div>
     <ul class="recommend-list list-unstyled list-inline">
       <li class="recommend" v-for="(store, index) in stores">
         <a :href="'/store/' + store.uuid" target="_blank">
@@ -12,10 +14,10 @@
             </div>
             <!--<div class="subject" style="min-height: 5px;">
             </div>-->
-            <div class="description">
-              <strong>企业介绍</strong>:
-              <span>{{store.enterprise.description || '暂无企业介绍'}}</span>
-            </div>
+            <!--<div class="description">-->
+              <!--<strong>企业介绍</strong>:-->
+              <!--<span>{{store.enterprise.description || '暂无企业介绍'}}</span>-->
+            <!--</div>-->
           </div>
         </a>
       </li>
@@ -28,121 +30,76 @@ export default {
   name: 'recommend-original',
   computed: {
     stores () {
-      return this.$store.state.provider.storeCms.recommendStore.data
+      return this.$store.state.provider.storeCms.recommendStore.data ? this.$store.state.provider.storeCms.recommendStore.data.slice(0, 3) : []
     }
   }
 }
 </script>
-<style scoped>
+<style scoped lang="scss">
   #recommends {
-		width: 1190px;
-		padding: 0px;
-	}
-
-  .title-icon {
-	  font-size: 24px;
-    color: #323232;
-    margin-bottom: 10px;
-	}
-
-	#recommends .hr-blue {
-		border-bottom: 2px solid #6493FF;
-		border-right: 0px;
-		border-top: 0px;
-		border-left: 0px;
-		width: 100%;
-		margin-bottom: 20px;
-	}
-
-	#recommends .recommend-list {
-		margin-bottom: 20px;
-		margin: 0;
-	}
-
-	#recommends .recommend-list .recommend {
+    margin: 10px 0;
 		width: 220px;
-		height: 210px;
-		border: 1px solid #D6D3CE;
-		margin-right: 22.5px;
-	}
-	#recommends .recommend-list .recommend:last-child{
-		margin-right: 0px !important;
-	}
-	.margin-left-zero {
-		margin-left: 0px !important;
-	}
-	#recommends .recommend-list .recommend a {
-		text-decoration: none;
-	}
-	#recommends .recommend-list .recommend .img{
-		width: 200px;
-		height: 80px;
-		display: inline-block;
-		overflow: hidden;
-		line-height: 80px;
-		text-align: center;
-		margin-top: 5px;
-	}
-	#recommends .recommend-list .recommend img{
-		max-height: 75px;
-		max-width: 200px;
-		margin-top: 5px;
-	}
-
-	#recommends .recommend-list .recommend .content {
-		margin: 0 10px;
-		height: 108px;
-		text-align: left;
+    height: 377px;
+    background-color: #ffffff;
+    border-radius: 5px;
+    .title-icon {
+      position: relative;
+      width: 100%;
+      height: 34px;
+      line-height: 34px;
+      text-align: center;
+      span{
+        font-family: AdobeHeitiStd-Regular;
+        font-size: 16px;
+        color: #333;
+      }
+      img{
+        position: absolute;
+        top: 14px;
+        left: 25px;
+      }
+    }
+    ul.recommend-list{
+      padding: 14px 0px 0 8px;
+      width: 220px;
+      li.recommend{
+        margin-bottom: 12px;
+        .img {
+          margin-right: 8px;
+          float: left;
+          width: 96px;
+          height: 96px;
+          border-radius: 2px;
+          border: solid 1px #e2e2e2;
+          img{
+            width: 100%;
+            height: 100%;
+          }
+        }
+      .content{
+        float: left;
+        width: 95px;
+        line-height: 96px;
+        .name {
+          width: 95px;
+          font-size: 14px;
+          color: #333333;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          span{
+            color: #333;
+            &:hover{
+               color:#2496f1;
+             }
+            }
+          }
+        }
+      &:last-child{
+        margin-bottom: 0;
+       }
+      }
+    }
 	}
 
-	#recommends .recommend-list .recommend .name {
-		font-size: 16px;
-		color: #383939;
-		font-weight: 600;
-		width: 200px;
-		height: 30px;
-		margin-top: 10px;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-		word-break: break-all;
-	}
-	/*#recommends .recommend-list .recommend:hover .name{*/
-		/*width: auto;*/
-	/*}*/
-	#recommends .recommend-list .recommend .subject, #recommends .recommend-list .recommend .description {
-		font-size: 12px;
-		color: #797979;
-		line-height: 18px;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-webkit-box-orient: vertical;
-		-webkit-line-clamp: 2;
-		max-height: 36px;
-	}
-	#recommends .recommend-list .recommend .description{
-		margin-top: 5px;
-		width: 200px;
-		height: 35px;
-	}
-	#recommends .recommend-list .recommend .subject span {
-		width: 204px;
-		white-space: pre-wrap;
-		word-wrap : break-word ;
-		overflow: hidden;
-		text-overflow: ellipsis;
-	}
-	#recommends .recommend-list .recommend:hover{
-		border: #5078cb 1px solid;
-	}
-	#recommends .recommend-list .recommend .description span {
-		word-break: break-all;
-		width: 204px;
-		display: inline;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: pre-wrap;
-		word-wrap : break-word ;
-	}
 </style>

+ 20 - 25
components/provider/RecommendStore.vue

@@ -1,26 +1,21 @@
 <template>
   <div class="container marketing">
-    <div class="sales-rank" v-if="providerType === 'original'">
-      <sales-rank />
+    <div class="toggle-store">
+      <toggle-store/>
     </div>
-    <div class="carousel" :class="{carousel_670: providerType === 'original'}">
+    <div class="carousel">
       <carousel />
     </div>
-    <div class="new-store">
-      <new-store />
-    </div>
   </div>
 </template>
 <script>
-import SalesRank from './SalesRank.vue'
-import NewStore from './NewStore.vue'
+import ToggleStore from './ToggleStore.vue'
 import Carousel from './Carousel.vue'
 
 export default {
   name: 'recommend-store',
   components: {
-   SalesRank,
-    NewStore,
+    ToggleStore,
     Carousel
   },
   computed: {
@@ -36,30 +31,30 @@ export default {
   .marketing {
     width: 1190px;
     min-height: 360px;
-    padding: 0;
-
-    .sales-rank {
-      width: 240px;
-      min-height: 360px;
+    padding-top: 20px!important ;
+    overflow: hidden;
+    .toggle-store {
       float: left;
-      display: inline-block;
+      margin-right: 15px;
+      width: 220px;
+      height: 402px
     }
 
     .carousel {
-      width: 910px;
-      min-height: 360px;
+      width: 955px;
+      min-height: 400px;
       display: inline-block;
       float: left;
       border: 1px solid #D6D3CE;
     }
 
-    .carousel_670 {
-      width: 670px;
-      min-height: 360px;
-      display: inline-block;
-      float: left;
-      border: 1px solid #D6D3CE;
-    }
+    /*.carousel_670 {*/
+      /*width: 670px;*/
+      /*min-height: 360px;*/
+      /*display: inline-block;*/
+      /*float: left;*/
+      /*border: 1px solid #D6D3CE;*/
+    /*}*/
 
     .new-store {
       width: 280px;

+ 47 - 0
components/provider/RecommendStoreShow.vue

@@ -0,0 +1,47 @@
+<template>
+  <div class="container showAll">
+    <div class="new">
+      <new-store/>
+      <recommend-original/>
+      <hot-commodity/>
+    </div>
+    <div class="search">
+      <suppliers/>
+    </div>
+  </div>
+</template>
+<script>
+import NewStore from './NewStore.vue'
+import RecommendOriginal from './RecommendOriginal.vue'
+import HotCommodity from './HotCommodity.vue'
+import Suppliers from './Suppliers.vue'
+
+export default {
+  name: 'recommend-store',
+  components: {
+    NewStore,
+    RecommendOriginal,
+    HotCommodity,
+    Suppliers
+  }
+}
+</script>
+<style lang="scss" scoped>
+  @import '~assets/scss/variables';
+
+  .showAll {
+    margin-top: 15px;
+    width: 1190px;
+    padding: 0;
+    overflow: hidden;
+    .new {
+      float: left;
+      margin-right: 15px;
+      width: 220px;
+    }
+    .search {
+      width: 955px;
+      float: left;
+    }
+  }
+</style>

+ 144 - 86
components/provider/Suppliers.vue

@@ -1,51 +1,49 @@
 <template>
-  <div class="container" id="store-list">
-    <table class="table">
-      <thead>
-      <tr>
-        <td width="175"></td>
-        <td width="auto"></td>
-        <td width="400">
-          <search-header :outerKeyword="keyword" @searchAction="search" :placeholder="'品牌/类目/型号/店铺名'"></search-header>
-          <!--<div class="input-group" style="display: table;">-->
-            <!--<input class="form-control" type="search" v-model="keyword" placeholder="品牌/类目/型号/店铺名" @search="search()" />-->
-            <!--<span class="input-group-btn">-->
-							<!--<button type="button" class="btn btn-default" @click="search()"><i class="iconfont">&#xe6fc;</i></button>-->
-						<!--</span>-->
-          <!--</div>-->
-        </td>
-        <td width="150" style="vertical-align: middle"><span>入驻商家:</span><span class="text-message">{{stores ? stores.totalElements : 0}}</span><span>家</span></td>
-        <td width="150" style="vertical-align: middle;">
-          <a @click="goStoreApply" style="width: 100px; height: 30px; display: inline-block;"><button class="btn btn-primary" style="margin-left: 6px;">立即入驻</button></a>
-        </td>
-      </tr>
-      </thead>
-      <tbody>
-      <!--<tr>{{$data}}</tr>-->
-      <tr v-for="store in stores.content" v-if="store">
-        <td>
-          <div class="logo">
-            <a :href="'/store/' + store.uuid" target="_blank"><img :src="store.logoUrl || '/images/store/common/default.png'" :alt="store.storeName"></a>
-          </div>
-        </td>
-        <td colspan="3">
-          <a class="store-name" :href="'/store/' + store.uuid" target="_blank"><div :title="store.storeName">{{store.storeName}}</div></a>
-          <div class="store-message">
-            <span>企业介绍:</span>
-            <span style="word-break: break-word;">{{showLittleDescription(store.enterprise.description)}}<em v-if="store.description && store.description.length > 160">...</em></span>
-          </div>
-        </td>
-        <td class="vertical-middle">
-          <a :href="'/store/' + store.uuid" target="_blank"><button class="btn btn-primary">进入店铺&nbsp;&gt;</button></a>
-        </td>
-      </tr>
-      <tr v-if="!stores.content || stores.content.length == 0">
-        <td colspan="10" class="text-center" style="line-height: 40px; font-size: 20px;">
-          <i class="fa fa-smile-o fa-lg"></i> 暂无店铺信息
-        </td>
-      </tr>
-      </tbody>
-    </table>
+  <div>
+    <div id="store-list">
+      <table class="table">
+        <thead>
+        <tr data-v-12978a78="">
+          <td width="120"><span v-text="storeType === 'factory' ? '原 厂' : '代理经销'">原厂</span></td>
+          <td width="100" data-v-12978a78=""></td>
+          <td width="450" data-v-12978a78=""></td>
+          <td width="150" style="vertical-align: middle" data-v-12978a78=""></td>
+          <td width="120" style="vertical-align: middle;" data-v-12978a78=""></td>
+        </tr>
+        </thead>
+        <tbody>
+        <!--<tr>{{$data}}</tr>-->
+        <tr style="height: 50px;">
+          <td colspan="5">
+            <search-header :outerKeyword="keyword" @searchAction="search" :placeholder="'品牌/类目/型号/店铺名'"></search-header>
+            <a @click="goStoreApply" class="btn-sure"><button class="btn btn-primary">立即入驻</button></a>
+          </td>
+        </tr>
+        <tr v-for="store in stores.content" v-if="store">
+          <td>
+            <div class="logo">
+              <a :href="'/store/' + store.uuid" target="_blank"><img :src="store.logoUrl || '/images/store/common/default.png'" :alt="store.storeName"></a>
+            </div>
+          </td>
+          <td colspan="3">
+            <a class="store-name" :href="'/store/' + store.uuid" target="_blank"><div :title="store.storeName">{{store.storeName}}</div></a>
+            <div class="store-message">
+              <span>企业介绍:</span>
+              <span style="word-break: break-word;">{{showLittleDescription(store.enterprise.description)}}<em v-if="store.description && store.description.length > 160">...</em></span>
+            </div>
+          </td>
+          <td class="vertical-middle" style="text-align: center">
+            <a :href="'/store/' + store.uuid" target="_blank"><button class="btn btn-primary">进入店铺</button></a>
+          </td>
+        </tr>
+        <tr v-if="!stores.content || stores.content.length == 0">
+          <td colspan="10" class="text-center" style="line-height: 40px; font-size: 20px;">
+            <i class="fa fa-smile-o fa-lg"></i> 暂无店铺信息
+          </td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
     <div style="float: right;">
       <page :total="stores.totalElements" :page-size="pageParams.count"
             :current="pageParams.page" v-on:childEvent="handleCurrentChange"></page>
@@ -57,7 +55,6 @@ import Page from '~components/common/page/pageComponent.vue'
 import SearchHeader from '~components/common/PcSearchHeader.vue'
 export default {
   name: 'suppliers',
-  props: ['types'],
   components: {
     Page,
     SearchHeader
@@ -69,12 +66,18 @@ export default {
         page: 1,
         count: 10,
         keyword: '',
-        type: this.types,
+        type: this.storeType === 'factory' ? 'ORIGINAL_FACTORY' : 'AGENCY-DISTRIBUTION',
         field: ''
       }
     }
   },
   computed: {
+    storeType () {
+      if (this.pageParams) {
+        this.pageParams.page = 1
+      }
+      return this.$store.state.provider.stores.storeType.data
+    },
     stores () {
       return this.$store.state.provider.stores.storeList.data
     },
@@ -128,57 +131,107 @@ export default {
   }
 }
 </script>
-<style scoped>
-  .el-pagination .el-pager li.active{
-    background-color: #5078cb;
-    border-color: #337ab7;
-  }
-
+<style lang="scss" scoped>
   #store-list{
-		width: 1190px;
-		padding: 0;
-	}
-
-	#store-list table {
-		border: 1px solid #d8d4d4;
-		font-size: 14px;
-	}
-
-	#store-list table>thead>tr {
-	  background: none;
-		background-color: #f7f7f7;
-		font-size: 14px;
-		font-weight: 600;
-		color: rgb(50,50,50);
+		width: 955px;
+    height: 1213px;
+    background: #fff;
+    table{
+      table-layout: fixed;
+      width: 955px;
+      thead{
+        padding: 10px 0 9px 9px;
+        width: 955px;
+        height: 34px;
+        line-height: 34px;
+        tr{
+          vertical-align: middle;
+          td{
+            padding: 0!important;
+            height: 34px;
+            line-height: 34px;
+            background-color: #2496f1;
+            span{
+              padding-left: 10px;
+              font-size: 16px;
+              color: #fff;
+            }
+            &:first-child {
+               border-top-left-radius: 5px;
+             }
+           &:last-child {
+              border-top-right-radius: 5px;
+            }
+          }
+        }
+      }
+      tbody{
+        background: #fff;
+        tr{
+          height: 112px;
+          td{
+            padding: 0!important;
+            vertical-align: middle;
+            a.btn-sure{
+              button{
+                margin: 0px 0 0 80px;
+                width: 110px !important;
+                height: 28px;
+                font-size: 14px;
+                color: #2496f1;
+                background-color: #fff;
+                border-radius: 3px;
+                border: solid 1px #2496f1;
+                &:hover{
+                   background-color: #2496f1;
+                   font-size: 14px;
+                   color: #fff;
+                 }
+              }
+            }
+          }
+          &:hover td div{
+             color: #2496f1;
+           }
+        }
+      }
+    }
 	}
-
 	#store-list table>thead>tr input {
 		font-weight: 100;
 	}
-
 	#store-list .text-message {
 		color: rgb(80,120,203);
 	}
 
 	#store-list .btn-primary {
-		background-color: rgb(80,120,203);
-		color: #fff;
-		width: 100px;
-		height: 30px;
-		line-height: 14px;
+    width: 88px;
+    height: 28px;
+    font-size: 14px;
+    color: #2496f1;
+    background-color: #ffffff;
+    border-radius: 3px;
+    border: solid 1px #2496f1;
 	}
-
+  #store-list .btn-primary:hover{
+    background-color: #2496f1;
+    border: solid 1px #2496f1;
+    color: #fff;
+  }
 	#store-list table>tbody .logo {
-		width: 150px;
-		height: 76px;
-		text-align: center;
-		line-height: 72px;
-		border:1px solid #ccc;
+    margin-left: 15px;
+    width: 80px;
+    height: 80px;
+    line-height: 80px;
+    text-align: center;
+    border-radius: 2px;
+    border: solid 1px #e2e2e2;
+    overflow: hidden;
 	}
 
 	#store-list table>tbody img {
-		max-width: 148px;
-		max-height: 72px;
+		max-width: 80px;
+		max-height: 80px;
 	}
 
 	#store-list table>tbody .vertical-middle{
@@ -201,8 +254,9 @@ export default {
 	}
 
 	#store-list table>tbody .store-message {
+    margin-top: 15px;
     color: #999;
-    width: 95%;
+    width: 100%;
     overflow: hidden;
     text-overflow: ellipsis;
     display: -webkit-box;
@@ -222,5 +276,9 @@ export default {
     url('//at.alicdn.com/t/font_sw3uw5ndd9uow29.ttf') format('truetype'),
     url('//at.alicdn.com/t/font_sw3uw5ndd9uow29.svg#iconfont') format('svg');
   }
+  .el-pagination .el-pager li.active{
+    background-color: #5078cb;
+    border-color: #337ab7;
+  }
 </style>
 

+ 220 - 0
components/provider/ToggleStore.vue

@@ -0,0 +1,220 @@
+<template>
+  <div class="toggleStore">
+    <!--原厂-->
+    <div class="factory list-item" :class="{active: storeType === 'factory'}" @click="toggleStore('factory')">
+      <div class="header">
+        <div class="kind"><span></span>原&nbsp;&nbsp;&nbsp;&nbsp;厂</div>
+        <div class="count">
+          <span>已入驻</span>
+          <div class="count_num">
+            <span v-for="item in formatNumber(originalCount, 4)" v-text="item">1</span>
+          </div>
+        </div>
+      </div>
+      <div class="body">
+        <p>原厂直营,品质保障</p>
+        <p>全球品牌,自由筛选</p>
+        <p>原装现货,买得放心</p>
+      </div>
+    </div>
+    <!--代理经销-->
+    <div class="agent list-item" :class="{active: storeType === 'origin'}" @click="toggleStore('origin')">
+      <div class="header">
+        <div class="kind"><span></span>代理经销</div>
+        <div class="count">
+          <span>已入驻</span>
+          <div class="count_num">
+            <span v-for="item in formatNumber(storeCount, 4)" v-text="item">1</span>
+          </div>
+        </div>
+      </div>
+      <div class="body">
+        <p>百强代理,资源共享</p>
+        <p>物料询价,极速响应</p>
+        <p>千万型号,一站找齐</p>
+      </div>
+    </div>
+    <!--寄售-->
+    <div class="sale list-item">
+      <div class="header">
+        <div class="kind"><span></span>优软寄售</div>
+        <a class="enter" @click="open('/store/33069557578d44e69bd91ad12d28a8d4')">进入店铺 <i class="fa fa-angle-right"></i></a>
+      </div>
+      <div class="body">
+        <p>海量库存、不赚差价</p>
+        <p>在线下单、在线跟踪</p>
+        <p>价格透明、节约成本</p>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+
+export default {
+  name: 'excellent-suppliers',
+  computed: {
+    storeType () {
+      return this.$store.state.provider.stores.storeType.data
+    },
+    store () {
+      return this.$store.state.provider.storeCms.recommendStore.data
+    },
+    storeCount () {
+      return this.$store.state.provider.stores.storeCount.data
+    },
+    originalCount () {
+      return this.$store.state.provider.stores.originalCount.data
+    }
+  },
+  methods: {
+    // 切换Store
+    toggleStore (type) {
+      this.$store.commit('provider/stores/SET_STORETYPE', type)
+      this.$store.dispatch('loadBanners', {type: type + '_banner_carousel'})
+      this.$store.dispatch('provider/findSimilarStoreList', { page: 1, count: 10, types: type === 'factory' ? 'ORIGINAL_FACTORY' : 'AGENCY-DISTRIBUTION' })
+    },
+    // 店铺入驻数量
+    formatNumber (num, key) {
+      let count = ('0000' + num).substr(-key)
+      let _arr = []
+      for (var i = 0; i < count.length; i++) {
+        _arr.push(count[i])
+      }
+      return _arr
+    },
+    // 寄售
+    open (url) {
+      window.open(url)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+  .toggleStore {
+    float: left;
+		width: 220px;
+    height: 402px;
+		padding: 0;
+    .list-item{
+      width: 100%;
+      height: 134px;
+      background: #fff;
+      border-bottom: 1px solid #ece9ec;
+      .header {
+        overflow: hidden;
+        padding: 10px 8px 0;
+        .kind{
+          float: left;
+          font-size: 16px;
+          font-weight: bold;
+          color: #2496f1;
+            span{
+              display: inline-block;
+              margin-right: 4px;
+              width: 6px;
+              height: 12px;
+              background: url('/images/original/angle-blue.png') no-repeat;
+            }
+        }
+        .count{
+          overflow: hidden;
+          float: right;
+          padding: 0 5px;
+          width: 120px;
+          height: 26px;
+          line-height: 24px;
+          background-color: #fff;
+          border-radius: 2px;
+          border: solid 1px #bfbfbf;
+          span {
+            float: left;
+            margin-right: 4px;
+            font-size: 12px;
+            letter-spacing: 0;
+            color: #666;
+          }
+          .count_num{
+            float: left;
+            margin-top: 3px;
+            span{
+              display: inline-block;
+              width: 14px;
+              height: 18px;
+              line-height: 18px;
+              font-size: 12px;
+              color: #fff;
+              text-align: center;
+              background-color: #a1a0a0;
+              border-radius: 2px;
+              &:last-child{
+                margin-right: 0;
+               }
+            }
+          }
+        }
+        .enter{
+          float: right;
+          display: inline-block;
+          width: 72px;
+          height: 22px;
+          line-height: 20px;
+          text-align: center;
+          font-size: 12px;
+          color: #2496f1;
+          background-color: #ffffff;
+          border-radius: 11px;
+          border: solid 1px #2496f1;
+          i{
+            font-size: 16px;
+          }
+          &:hover{
+            color: #fff;
+            background: #2496f1;
+            border: solid 1px #2496f1;
+           }
+        }
+      }
+      .body {
+        margin-top: 15px;
+        padding: 0 20px 0;
+        p{
+          width: 195px;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+          font-size: 14px;
+          letter-spacing: 0;
+          color: #666666;
+        }
+      }
+      &:hover, &.active{
+         background: #fa9819;
+         cursor: pointer;
+        .kind {
+          color: #fff;
+          span{
+            background: url('/images/original/angle-white.png') no-repeat;
+          }
+        }
+        .count{
+          background-color: #d87c05;
+          border: solid 1px #d87c05;
+          span {
+            color: #fff;
+          }
+          .count_num{
+            span{
+              color: #626364;
+              background-color: #fff;
+            }
+          }
+        }
+        .body{
+          p{
+            color: #fff;
+          }
+        }
+      }
+    }
+	}
+</style>

+ 3 - 1
components/provider/index.js

@@ -3,5 +3,7 @@ import RecommendOriginal from './RecommendOriginal.vue'
 import ExcellentSuppliers from './ExcellentSuppliers.vue'
 import HotCommodity from './HotCommodity.vue'
 import Suppliers from './Suppliers.vue'
+import ToggleStore from './ToggleStore.vue'
+import RecommendStoreShow from './RecommendStoreShow.vue'
 
-export { RecommendStore, RecommendOriginal, ExcellentSuppliers, HotCommodity, Suppliers }
+export { RecommendStore, RecommendOriginal, ExcellentSuppliers, HotCommodity, Suppliers, ToggleStore, RecommendStoreShow }

+ 1 - 1
components/search/GoodList.vue

@@ -735,7 +735,7 @@
     transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
   }
   div.ng-table-pager a.page-a{
-    background: #5078cb !important;
+    background: #2496f1 !important;
     color: #fff;
     float: right;
   }

+ 0 - 1
components/supplier/articleOne.vue

@@ -30,7 +30,6 @@
     },
     computed: {
       list () {
-        console.log('newMerchant', this.$store.state.supplier.merchant.newMerchant.data)
         return this.$store.state.supplier.merchant.newMerchant.data
       },
       all () {

+ 0 - 1
components/supplier/articleTwo.vue

@@ -33,7 +33,6 @@
     },
     computed: {
       list () {
-        console.log('recommend', this.$store.state.supplier.merchant.recommend.data)
         return this.$store.state.supplier.merchant.recommend.data
       }
     },

+ 2 - 4
components/supplier/details.vue

@@ -22,8 +22,7 @@
           <ul class="list-unstyled">
             <li class="item">
               <span>物料名称(类目)</span>
-              <p v-if="detail.standard === 1" v-text="detail.kind ? spliceString(detail.kind, 135) : '暂无信息'">1</p>
-              <p v-if="detail.standard !== 1" v-text="detail.prodName ? spliceString(detail.prodName, 135) : '暂无信息'">1</p>
+              <p v-text="detail.kind ? spliceString(detail.kind, 135) : detail.prodName ? spliceString(detail.prodName, 135) : '暂无信息'">1</p>
             </li>
             <li class="item">
               <span>品牌</span>
@@ -68,8 +67,7 @@
           </li>
           <li class="form-item">
             <span>物料名称(类目):</span>
-            <p v-if="detail.standard === 1" v-text="detail.kind ? spliceString(detail.kind, 90) : '-'">1</p>
-            <p v-if="detail.standard !== 1" v-text="detail.prodName ? spliceString(detail.prodName, 90) : '-'">1</p>
+            <p v-text="detail.kind ? spliceString(detail.kind, 90) : detail.prodName ? spliceString(detail.prodName, 90) : '-'">1</p>
           </li>
           <li class="form-item">
             <span>型号:</span>

+ 2 - 3
components/supplier/resource.vue

@@ -68,8 +68,7 @@
                 </li>
                 <li class="item">
                   <span class="fl">类目(产品名称)</span>
-                  <p v-if="item.standard === 1" v-text="item.kind ? spliceString(item.kind, 95) : '暂无信息'">1</p>
-                  <p v-if="item.standard !== 1" v-text="item.prodName ? spliceString(item.prodName, 95) : '暂无信息'">1</p>
+                  <p v-text="item.kind ? spliceString(item.kind, 95) : item.prodName ? spliceString(item.prodName, 95) : '暂无信息'">1</p>
                 </li>
                 <li class="item">
                   <span class="fl">规格</span>
@@ -259,7 +258,7 @@
           this.applyObj.cmpCode = type.cmpCode
           this.applyObj.brand = (type.standard === 1 ? type.pbranden : type.brand)
           this.applyObj.spec = type.spec
-          this.applyObj.prodName = (type.standard === 1 ? type.kind : type.prodName)
+          this.applyObj.prodName = type.kind ? type.kind : (type.prodName ? type.prodName : '-')
         }
       },
       // 时间格式化

+ 1 - 0
pages/applyPurchase/index.vue

@@ -43,6 +43,7 @@
 <style>
   .seek {
     position: relative;
+    padding-top:20px;
   }
   .footer {
     text-align: center;

+ 6 - 2
pages/index.vue

@@ -79,8 +79,12 @@
       let nowMonth = today.getMonth() + 1
       let LastMonth = today.getMonth()
       return !store.state.option.isMobile ? Promise.all([
-        store.dispatch('loadFloors'),
-        store.dispatch('loadBanners', {type: 'home'}),
+        store.dispatch('loadNewFloorsF1'),
+        store.dispatch('loadNewFloorsF2'),
+        store.dispatch('loadNewFloorsF3'),
+        store.dispatch('loadNewFloorsF4'),
+        store.dispatch('loadNewFloorsF5'),
+        store.dispatch('loadBanners', {type: 'home_banner_carousel'}),
         store.dispatch('loadProductKinds', { id: 0 }),
         store.dispatch('loadNewsSnapshot', { page: 1, pageSize: 10 }),
         store.dispatch('supplier/loadVendorAll', {page: 1, size: 20}),

+ 502 - 0
pages/mobile/center/user/cart.vue

@@ -0,0 +1,502 @@
+<template>
+  <div class="mobile-fix-content mobile-centerfix-content mobile-cart" id="mobileFixContent">
+    <ul class="store-list">
+      <li class="store-item" v-for="(item, storeIndex) in cartList">
+        <div class="store-info">
+          <label class="mobile-cart-check" :class="{'active': item.$active}">
+            <input type="checkbox" @change="setActive('store', storeIndex)">
+          </label>
+          <span class="store-tag inline-block">{{item.storeType | storeTypeFilter}}</span>
+          <p class="store-name inline-block text-ellipse">{{item.storeName}}</p>
+          <a class="com-mobile-link" @click="linkSaler(item)"><i class="iconfont icon-kefu1"></i>联系卖家</a>
+        </div>
+        <ul class="goods-list">
+          <li class="goods-item" v-for="(goods, goodsIndex) in item.goods">
+            <label class="mobile-cart-check" :class="{'active': goods.$active}">
+              <input type="checkbox" @change="setActive('goods', storeIndex, goodsIndex)">
+            </label>
+            <div class="params inline-block">
+              <p class="param text-ellipse"><span>品牌:</span>{{goods.goods.brandNameEn || '-'}}</p>
+              <p class="param text-ellipse"><span>类目:</span>{{goods.kiName || '-'}}</p>
+              <p class="param text-ellipse"><span>型号:</span>{{goods.code || '-'}}</p>
+              <p class="param text-ellipse"><span>规格:</span>{{goods.spec || '-'}}</p>
+            </div>
+            <div class="fr">
+              <!--<p class="goods-tag">{{goods.goods.tag || '-'}}</p>-->
+              <div class="input-line">
+                <span class="inline-block" @click="setGoods('sub', goods)">-</span>
+                <input type="number" v-model="goods.goods.purchaseNumber" @input="onPurchaseNumberInput(goods)" @blur="setGoods('set', goods)">
+                <span class="inline-block" @click="setGoods('add', goods)">+</span>
+              </div>
+              <div class="price-line">
+                <span>{{goods.currencyName | currencyFilter}}</span>{{goods.goods.currentPrice}}
+              </div>
+            </div>
+          </li>
+        </ul>
+      </li>
+    </ul>
+    <div class="buy-wrap">
+      <label class="mobile-cart-check" :class="{'active': isAllChecked}">
+        <input type="checkbox" @change="setActive('all')">
+        <span>全选</span>
+      </label>
+      <div class="fr">
+        <i class="fare">不含运费</i>
+        <span class="title">合计:</span><span class="price"><span v-show="allCount > 0">{{allCurrency | currencyFilter}}</span>{{allPrice}}</span>
+        <button class="buy-btn" @click="submit">结算({{allCount}})</button>
+      </div>
+    </div>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+    <pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+    <link-user :infoObj="currentStoreInfo"
+               :showLink="showLink"
+               @closeAction="showLink = false"></link-user>
+  </div>
+</template>
+<script>
+  import {RemindBox, PullUp} from '~components/mobile/common'
+  import {LinkUser} from '~components/mobile/base'
+  export default {
+    layout: 'mobile',
+    middleware: 'authenticated',
+    data () {
+      return {
+        cartList: [],
+        remindText: '',
+        timeoutCount: '',
+        isAllChecked: false,
+        page: 1,
+        count: 10,
+        allCurrency: 'RMB', // 选定币别
+        currentStoreInfo: {},
+        showLink: false
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      LinkUser
+    },
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('userCenter/loadCartList', {page: 1, count: 10})
+      ])
+    },
+    watch: {
+      '$store.state.userCenter.list.cart.data': {
+        handler: function (val) {
+          let tmpVal = this.baseUtils.deepCopy(val)
+//          this.cartList = []
+          tmpVal.content.forEach(item => {
+            let current = this.cartList.find(objItem => {
+              return objItem.storeUuid === item.storeUuid
+            })
+            item.$active = false
+            // 初始化购买数量及状态
+            let goodsItem = item.goods
+            let pack = goodsItem.perQty || goodsItem.minPackQty
+            if (goodsItem.breakUp) {
+              goodsItem.purchaseNumber = goodsItem.minBuyQty
+              goodsItem.canSub = false
+              goodsItem.canAdd = goodsItem.purchaseNumber < goodsItem.reserve
+            } else {
+              if (pack >= goodsItem.minBuyQty) {
+                goodsItem.purchaseNumber = pack
+              } else {
+                let max = Math.max(pack, goodsItem.minBuyQty)
+                goodsItem.purchaseNumber = max + max % pack
+              }
+              goodsItem.canSub = false
+              goodsItem.canAdd = goodsItem.purchaseNumber + goodsItem.minPackQty <= goodsItem.reserve
+            }
+            goodsItem.currentPrice = Number((this.baseUtils.getPriceByLevel(goodsItem.prices, goodsItem.purchaseNumber, goodsItem.currencyName) * goodsItem.purchaseNumber).toFixed(6))
+            if (!current) {
+              this.cartList.push({
+                storeName: item.storeName,
+                storeType: item.storeType,
+                storeUuid: item.storeUuid,
+                enterprise: item.storeEnterprise.enterpriseInfo,
+                goods: [item],
+                $active: false
+              })
+            } else {
+              current.goods.push(item)
+            }
+          })
+          this.checkAll()
+        },
+        immediate: true
+      }
+    },
+    computed: {
+      cartData () {
+        return this.$store.state.userCenter.list.cart.data
+      },
+      fetching () {
+        return this.$store.state.userCenter.list.cart.fetching
+      },
+      allPage () {
+        return this.cartData.totalPages
+      },
+      // 已选goods
+      allActiveObj () {
+        let arr = []
+        this.cartList.forEach(item => {
+          item.goods.forEach(goodsItem => {
+            if (goodsItem.$active) {
+              arr.push(goodsItem)
+            }
+          })
+        })
+        return arr
+      },
+      // 统计价格
+      allPrice () {
+        let price = 0
+        this.allActiveObj.forEach(item => {
+          price += Number(item.goods.currentPrice)
+        })
+        return price
+      },
+      // 统计数量
+      allCount () {
+        return this.allActiveObj.length
+      }
+    },
+    methods: {
+      setRemindText: function (str) {
+        this.remindText = str
+        this.timeoutCount++
+      },
+      checkCurrency: function (currency, callback) {
+        if (currency === this.allCurrency) {
+          callback.call()
+        } else {
+          this.setRemindText('所选产品币别与已选产品不是同一币别')
+        }
+      },
+      setActive (type, storeIndex, goodsIndex, goodsCheckFlag) {
+        if (type === 'store') {
+          let storeActive = this.cartList[storeIndex].$active
+          for (let i = 0; i < this.cartList[storeIndex].goods.length; i++) {
+            this.setActive('goods', storeIndex, i, !storeActive)
+          }
+//          this.cartList[storeIndex].goods.forEach(item => {
+//            this.checkCurrency(item.goods.currencyName, () => {
+//              item.$active = !this.cartList[storeIndex].$active
+//            })
+//          })
+          this.checkAll()
+        } else if (type === 'goods') {
+          if (!this.allActiveObj[0]) {
+            this.allCurrency = this.cartList[storeIndex].goods[goodsIndex].currencyName
+          }
+          this.checkCurrency(this.cartList[storeIndex].goods[goodsIndex].currencyName, () => {
+            this.cartList[storeIndex].goods[goodsIndex].$active = typeof goodsCheckFlag === 'undefined' ? !this.cartList[storeIndex].goods[goodsIndex].$active : goodsCheckFlag
+//            this.cartList[storeIndex].$active = !this.cartList[storeIndex].goods.find(item => {
+//              return !item.$active
+//            })
+            this.checkAll()
+          })
+        } else if (type === 'all') {
+          let activeFlag = true
+          this.cartList.forEach(item => {
+            item.goods.forEach(goodsItem => {
+              if (!goodsItem.$active) {
+                activeFlag = false
+              }
+            })
+          })
+          for (let i = 0; i < this.cartList.length; i++) {
+            this.cartList[i].$active = activeFlag
+            this.setActive('store', i)
+          }
+          this.checkAll()
+        }
+      },
+      // 总勾选校验
+      checkAll: function () {
+        let activeFlag = true
+        this.cartList.forEach(item => {
+          let itemActive = true
+          item.goods.forEach(goodsItem => {
+            if (!goodsItem.$active) {
+              activeFlag = false
+              itemActive = false
+            }
+          })
+          item.$active = itemActive
+        })
+        this.isAllChecked = activeFlag
+      },
+      onPurchaseNumberInput: function (goods) {
+        let showPrice = this.baseUtils.getPriceByLevel(goods.goods.prices, goods.goods.purchaseNumber, goods.goods.currencyName)
+        goods.goods.currentPrice = Number(((showPrice || goods.goods.currentPrice) * goods.goods.purchaseNumber).toFixed(6))
+      },
+      checkPurchaseNumber: function (goods) {
+        if ((/^[\d]*$/).test(goods.goods.purchaseNumber)) {
+          this.changeNum(goods.goods.purchaseNumber, goods)
+        } else {
+          this.setRemindText('请输入整数')
+          goods.goods.purchaseNumber = goods.goods.minBuyQty
+        }
+      },
+      setGoods: function (type, goods) {
+        if (type === 'set') {
+          this.checkPurchaseNumber(goods)
+        } else {
+          let isAdd = type === 'add'
+          let pack = goods.goods.perQty || goods.goods.minPackQty
+          let newNum = 0
+          if (goods.goods.breakUp) {
+            newNum = isAdd ? goods.goods.purchaseNumber + 1 : goods.goods.purchaseNumber - 1
+          } else {
+            newNum = isAdd ? goods.goods.purchaseNumber + pack : goods.goods.purchaseNumber - pack
+          }
+          this.changeNum(newNum, goods)
+          this.onPurchaseNumberInput(goods)
+        }
+      },
+      changeNum: function (newNum, goods) {
+        let pack = goods.goods.perQty || goods.goods.minPackQty
+        let buy = goods.goods.minBuyQty
+        let reserve = goods.goods.reserve
+        let breakUp = goods.goods.breakUp
+        if (!newNum && newNum !== 0) {
+          goods.goods.purchaseNumber = buy
+        } else {
+          newNum = parseInt(newNum)
+          if (breakUp) {
+            if (newNum < buy) {
+              this.setRemindText('最小起订量为' + buy)
+              goods.goods.purchaseNumber = buy
+              goods.goods.canSub = false
+              goods.goods.canAdd = true
+            } else if (newNum > reserve) {
+              this.setRemindText('库存不足')
+              goods.goods.purchaseNumber = reserve
+              goods.goods.canAdd = false
+              goods.goods.canSub = true
+            } else {
+              goods.goods.canSub = true
+              goods.goods.canAdd = true
+              goods.goods.purchaseNumber = newNum
+              newNum === buy && (goods.goods.canSub = false)
+              newNum === reserve && (goods.goods.canAdd = false)
+            }
+          } else {
+            if (newNum < buy) {
+              this.setRemindText('最小起订量为' + buy)
+              goods.goods.purchaseNumber = buy
+              goods.goods.canSub = false
+              if (newNum > reserve) {
+                this.setRemindText('库存不足')
+                goods.goods.purchaseNumber = reserve - (reserve % pack)
+                goods.goods.canAdd = false
+              }
+            } else if (newNum > reserve) {
+              goods.goods.canSub = true
+              goods.goods.canAdd = false
+              this.setRemindText('库存不足')
+              goods.goods.purchaseNumber = reserve - (reserve % pack)
+            } else {
+              goods.goods.canSub = true
+              goods.goods.canAdd = true
+              let remainder = newNum % pack
+              if (remainder !== 0) {
+//                console.log(this.fragment.num)
+                this.setRemindText('不支持拆包且包装量为' + pack)
+                // 这个直接赋值的,应该给这个值进行判断(Math.floor(newNum / pack) + 1) * pack
+                let res = (Math.floor(newNum / pack) + 1) * pack
+                goods.goods.purchaseNumber = res > reserve ? Math.floor(newNum / pack) * pack : res
+              } else {
+                goods.goods.purchaseNumber = newNum
+              }
+              newNum === buy && (goods.goods.canSub = false)
+              newNum === reserve && (goods.goods.canAdd = false)
+            }
+          }
+        }
+      },
+      onPullUpAction: function () {
+        this.page++
+        this.reloadList()
+      },
+      reloadList: function () {
+        this.$store.dispatch('userCenter/loadCartList', {page: this.page, count: this.count})
+      },
+      submit: function () {
+        if (!this.allCount) {
+          this.setRemindText('请勾选要生成订单的批次')
+          return
+        }
+        let arrOD = []
+        this.allActiveObj.forEach(item => {
+          arrOD.push({
+            batchCode: item.goods.batchCode,
+            minPackQty: item.goods.minPackQty,
+            number: item.goods.purchaseNumber,
+            storeid: item.storeUuid
+          })
+        })
+        console.log(arrOD)
+        this.$http.post('/trade/order/saveByGroup', {
+          arrOD: arrOD,
+          currency: this.allCurrency
+        }).then(res => {
+          console.log(res.data)
+          if (res.data.code === 1) {
+            if (res.data.message) {
+              this.setRemindText(res.data.message)
+            }
+            this.$router.push(`/mobile/center/user/pay/${this.baseUtils.enidfilter(res.data.data.orderid)}`)
+          } else if (res.data.code === 7) {
+            this.setRemindText('选中的购物车信息已经失效,将为您刷新界面之后重新操作')
+            setTimeout(() => {
+              this.page = 1
+              this.reloadList()
+            }, 1500)
+          } else {
+            this.setRemindText(res.data.message)
+          }
+        }, err => {
+          console.log(err.response.data.data || '系统错误')
+          this.setRemindText(err.response.data.data || '系统错误')
+        })
+      },
+      linkSaler (item) {
+        this.currentStoreInfo = item.enterprise
+        this.showLink = true
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-cart {
+    bottom: 2rem;
+    .store-list {
+      .store-item {
+        padding: 0 .25rem;
+        background: #fff;
+        margin: .19rem 0;
+        .store-info {
+          height: .9rem;
+          line-height: .9rem;
+          .store-tag {
+            width: .54rem;
+            height: .3rem;
+            line-height: .3rem;
+            text-align: center;
+            font-size: .24rem;
+            color: #fff;
+            background: #15b262;
+            border-radius: .04rem;
+            margin-left: .18rem;
+          }
+          .store-name {
+            font-size: .28rem;
+            margin-left: .08rem;
+            max-width: 5.7rem;
+          }
+        }
+        .goods-list {
+          .goods-item {
+            padding: .32rem 0;
+            border-top: 1px solid #e4e4e4;
+            .params {
+              margin-left: .17rem;
+              .param {
+                width: 3.65rem;
+                span {
+                  color: #666;
+                }
+              }
+            }
+            .fr {
+              width: 2.6rem;
+              text-align: center;
+              .input-line {
+                $group-height: .35rem;
+                margin-top: .52rem;
+                input {
+                  width: 1.31rem;
+                  height: .35rem;
+                  border-top: 1px solid #ddd;
+                  border-bottom: 1px solid #ddd;
+                  vertical-align: middle;
+                  border-radius: 0;
+                  padding: 0 .05rem;
+                  text-align: center;
+                  position: relative;
+                  top: .01rem;
+                }
+                span {
+                  width: .5rem;
+                  height: $group-height;
+                  line-height: $group-height;
+                  text-align: center;
+                  border: 1px solid #ddd;
+                }
+              }
+              .price-line {
+                font-size: .32rem;
+                color: #f43938;
+                margin-top: .2rem;
+                span {
+                  font-size: .24rem;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    .buy-wrap {
+      position: fixed;
+      bottom: .98rem;
+      height: 1.02rem;
+      line-height: 1.02rem;
+      padding-left: .27rem;
+      background: #fff;
+      width: 100%;
+      border-top: .02rem solid #ccc;
+      .fr {
+        .fare {
+          font-size: .18rem;
+          color: #999;
+          margin-right: .15rem;
+          font-style: normal;
+        }
+        .title {
+          font-size: .28rem;
+          margin-right: .38rem;
+        }
+        .price {
+          font-size: .28rem;
+          color: #fc2706;
+          display: inline-block;
+          max-width: 1.6rem;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          vertical-align: middle;
+          span {
+            font-size: .24rem;
+            margin-right: .08rem;
+          }
+          margin-right: .25rem;
+        }
+        .buy-btn {
+          width: 2.08rem;
+          height: 1.02rem;
+          line-height: 1.02rem;
+          text-align: center;
+          font-size: .28rem;
+          color: #fff;
+          background: #fc2706;
+        }
+      }
+    }
+  }
+</style>

+ 313 - 0
pages/mobile/center/user/doPay/_ids.vue

@@ -0,0 +1,313 @@
+<template>
+  <div class="mobile-fix-content mobile-centerfix-content mobile-dopay">
+    <p class="md-remain-time">
+      请您在 <span class="red-text">{{baseUtils.filterDate(remainTime, 'day')}}天{{baseUtils.filterDate(remainTime, 'hour')}}时{{baseUtils.filterDate(remainTime, 'minute')}}分</span> 内完成支付,否则订单会被自动取消!
+    </p>
+    <div class="content-line md-pay">
+      <h1>收款账户</h1>
+      <div class="info-line clearfix">
+        <div class="fl">平台代收&nbsp;<i class="inline-block">i</i></div>
+        <div class="fr"><span class="inline-block text-ellipse">{{accountData.branchname}}</span></div>
+      </div>
+      <div class="info-line clearfix">
+        <div class="fl">{{accountData.bankname}}</div>
+        <div class="fr"><span class="inline-block text-ellipse">{{accountData.number}}</span></div>
+      </div>
+      <div class="info-line clearfix">
+        <div class="fl">上传付款凭证:</div>
+        <div class="fr">
+          <div class="img inline-block">
+            <upload @uploadAction="onUpload" :noReview="true"></upload>
+          </div>
+          <div class="inline-block text">仅支持jpg、gif、pdf格式的文件,大小不超过3M</div>
+        </div>
+      </div>
+      <div class="remind clearfix">
+        <span class="fl">注意:</span>
+        <p class="fr">1、移动端仅支持线下转账,如需网银转账,可在pc端进行操作。<br/>2、优软商城及销售商不会以订单异常、系统升级为由要求您点击任何网址链接进行退款操作。</p>
+      </div>
+    </div>
+    <div class="content-line md-pay md-info">
+      <div class="info-line clearfix">
+        <div class="fl">付款方式:</div>
+        <div class="fr"><span class="inline-block text-ellipse red-text">线下付款</span></div>
+      </div>
+      <div class="info-line clearfix">
+        <div class="fl">需支付:</div>
+        <div class="fr">
+          <span class="inline-block text-ellipse">
+          <span class="red-text"><span>{{orderData[0].currency | currencyFilter}}</span>{{totalPrice}}</span>
+            (包含以下订单号)
+          </span>
+        </div>
+      </div>
+      <ul class="order-list" :class="{'more-list': showMore}">
+        <li class="clearfix" v-for="(item, index) in orderData">
+          <div class="fl"><i>{{index + 1}}</i></div>
+          <div class="fr">{{item.orderid}}</div>
+        </li>
+      </ul>
+      <div class="more" v-if="orderData.length > 3" @click="showMore = !showMore">{{showMore ? '收起' : '查看更多'}}
+        <i class="iconfont icon-arrow-down" v-if="!showMore"></i>
+        <i class="iconfont icon-arrow-up" v-else></i>
+      </div>
+    </div>
+    <div class="operate-line">
+      <nuxt-link to="/mobile/order?type=buyer" class="operate inline-block">前往订单中心</nuxt-link>
+      <a class="operate inline-block active" @click="submit">提交</a>
+    </div>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+<script>
+  import { RemindBox } from '~components/mobile/common'
+  import Upload from '~components/common/upload/upload.vue'
+  export default {
+    layout: 'mobile',
+    middleware: 'authenticated',
+    data () {
+      return {
+        remindText: '',
+        timeoutCount: '',
+        showMore: false,
+        imgUrl: null
+      }
+    },
+    components: {
+      RemindBox,
+      Upload
+    },
+    fetch ({ store, params }) {
+      return Promise.all([
+        store.dispatch('userCenter/loadOrderData', {ids: params.ids}),
+        store.dispatch('userCenter/loadAccount', {status: 104, type: 'mall'})
+      ])
+    },
+    computed: {
+      orderData () {
+        return this.$store.state.userCenter.list.order.data
+      },
+      remainTime () {
+        return this.orderData[0].availabletime - Date.now()
+      },
+      accountData () {
+        return this.$store.state.userCenter.list.account.data[0] || {}
+      },
+      totalPrice () {
+        let price = 0
+        this.orderData.forEach(item => {
+          price += item.ensurePrice
+        })
+        return price
+      }
+    },
+    methods: {
+      setRemindText: function (str) {
+        this.remindText = str
+        this.timeoutCount++
+      },
+      onUpload (obj) {
+        this.imgUrl = obj.url
+      },
+      submit () {
+        console.log(this.imgUrl)
+        if (this.imgUrl) {
+          let arr = []
+          this.orderData.forEach(item => {
+            arr.push(item.orderid)
+          })
+          this.$http.post(`/trade/transfer?order=${arr.join('-')}`, {
+            imgUrl: this.imgUrl,
+            total: this.totalPrice,
+            type: 'PAIDTOPLATFORM'
+          }).then(res => {
+            if (res.data === 'success') {
+              this.$router.push('/mobile/order?type=buyer')
+            } else {
+              this.setRemindText(res.data || '付款失败')
+            }
+          }, err => {
+            this.setRemindText(err.response.data || '付款失败')
+          })
+        } else {
+          this.setRemindText('请上传付款凭证')
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss">
+  $red-text: #f43938;
+  .mobile-dopay {
+    .red-text {
+      color: $red-text;
+    }
+    .md-remain-time {
+      font-size: .28rem;
+      color: #666;
+      padding: .14rem 0 .1rem;
+      text-align: center;
+    }
+    .content-line {
+      background: #fff;
+      margin-bottom: .19rem;
+    }
+    .md-pay {
+      padding-bottom: .45rem;
+      h1 {
+        height: .8rem;
+        line-height: .8rem;
+        text-align: center;
+        font-size: .35rem;
+        border-bottom: 1px solid #e4e4e4;
+      }
+      .info-line {
+        padding: 0 .45rem;
+        margin-top: .28rem;
+        font-size: .28rem;
+        color: #666;
+        .fl {
+          i {
+            width: .36rem;
+            height: .36rem;
+            color: #fff;
+            font-weight: bold;
+            font-size: .28rem;
+            text-align: center;
+            line-height: .36rem;
+            background: $red-text;
+            border-radius: 100%;
+            font-style: normal;
+          }
+        }
+        .fr {
+          span {
+            width: 4.5rem;
+            text-align: right;
+          }
+          .img {
+            width: 1.09rem;
+            height: 1.09rem;
+            border: 2px dashed #9c9c9c;
+            .preview {
+              position: relative;
+              input {
+                width: 1.09rem;
+                height: 1.09rem;
+                opacity: 0;
+                position: absolute;
+                top: -.3rem;
+              }
+            }
+          }
+          .text {
+            color: #999;
+            font-size: .24rem;
+            max-width: 3rem;
+            margin-left: .26rem;
+          }
+        }
+      }
+      .remind {
+        color: #999;
+        font-size: .24rem;
+        padding: 0 .45rem;
+        margin-top: .44rem;
+        .fr {
+          line-height: .36rem;
+          max-width: 5.8rem;
+        }
+      }
+    }
+    .md-info {
+      padding: .33rem 0 0 0;
+      .info-line {
+        margin-top: .14rem;
+        &:first-child {
+          margin-top: 0;
+        }
+        .fl {
+          width: 1.57rem;
+          text-align: right;
+        }
+        .fr {
+          > span {
+            width: 4.7rem;
+            text-align: left;
+            word-break: break-all;
+            white-space: initial;
+            .red-text {
+              span {
+                font-size: .24rem;
+              }
+            }
+          }
+        }
+      }
+      .order-list {
+        max-height: 1.56rem;
+        overflow: hidden;
+        margin-top: .31rem;
+        &.more-list {
+          max-height: unset;
+        }
+        li {
+          margin-bottom: .19rem;
+          .fl {
+            text-align: right;
+            width: 35%;
+            i {
+              font-size: .24rem;
+              color: #fff;
+              font-style: normal;
+              background: #3f84f6;
+              padding: .03rem .06rem;
+              border-radius: .04rem;
+            }
+          }
+          .fr {
+            padding-left: .07rem;
+            text-align: left;
+            width: 65%;
+            font-size: .24rem;
+            color: #666;
+            padding-top: .04rem;
+          }
+        }
+      }
+      .more {
+        height: .67rem;
+        line-height: .67rem;
+        border-top: 1px solid #e4e4e4;
+        font-size: .28rem;
+        text-align: center;
+        i {
+          font-size: .24rem;
+          margin-left: .1rem;
+        }
+      }
+    }
+    .operate-line {
+      margin-bottom: .63rem;
+      margin-top: .51rem;
+      text-align: center;
+      .operate {
+        width: 5.96rem;
+        height: .77rem;
+        line-height: .77rem;
+        font-size: .32rem;
+        color: #666;
+        text-align: center;
+        background: #fff;
+        border: 2px solid #b5b5b6;
+        border-radius: .08rem;
+        &.active {
+          color: #fff;
+          background: #3f84f6;
+          border-color: #3f84f6;
+          margin-top: .28rem;
+        }
+      }
+    }
+  }
+</style>

+ 10 - 0
pages/mobile/center/user/index.vue

@@ -27,6 +27,16 @@
         </ul>
       </div>
       <div class="block-wrap collect-block">
+        <nuxt-link tag="div" to="/mobile/order?type=buyer" class="content-line">
+          <img src="/images/mobile/center/user/order.jpg" alt="">
+          <span>采购订单</span>
+          <i class="iconfont icon-xiangyou"></i>
+        </nuxt-link>
+        <nuxt-link tag="div" to="/mobile/center/user/cart" class="content-line">
+          <img src="/images/mobile/center/user/cart.jpg" alt="">
+          <span>购物车<span class="text">(0)</span></span>
+          <i class="iconfont icon-xiangyou"></i>
+        </nuxt-link>
         <nuxt-link tag="div" to="/mobile/center/user/collect/component" class="content-line">
           <img src="/images/mobile/center/user/comp-collect.png" alt="">
           <span>器件收藏<span class="text">({{compCount.data || 0}})</span></span>

+ 1132 - 0
pages/mobile/center/user/pay/_orderId.vue

@@ -0,0 +1,1132 @@
+<template>
+  <div class="mobile-content mobile-content-long mobile-pay">
+    <div class="pay-head" @click="openAddrModal">
+      <p class="info">
+        {{selectedAddress.name}}&nbsp;&nbsp;&nbsp;{{selectedAddress.tel | telHideFilter}}
+      </p>
+      <div class="addr">
+        <img src="/images/mobile/center/user/addr-flag.png" alt="">
+        <span>{{selectedAddress.area + selectedAddress.detailAddress}}</span>
+      </div>
+      <i class="iconfont icon-xiangyou fr"></i>
+    </div>
+    <ul class="pay-store-list">
+      <li class="ps-item" v-for="item in orderData">
+        <p class="ps-store-name">{{item.storeName}}
+          <a class="com-mobile-link" @click="linkSaler(item)"><i class="iconfont icon-kefu1"></i>联系卖家</a>
+        </p>
+        <div class="ps-goods-info clearfix">
+          <div class="fl">
+            <span class="inline-block arrow" @click="goodsScroll('left')">
+            <i class="iconfont icon-xiangzuo"></i>
+          </span>
+            <ul class="ps-goods-list">
+              <li class="inline-block" v-for="goods in item.goods">
+                <div class="ps-goods-item text-ellipse"><span>品牌:</span>{{goods.brName || '-'}}</div>
+                <div class="ps-goods-item text-ellipse"><span>类目:</span>{{goods.kiName || '-'}}</div>
+                <div class="ps-goods-item text-ellipse"><span>型号:</span>{{goods.cmpCode || '-'}}</div>
+                <div class="ps-goods-item text-ellipse"><span>规格:</span>{{goods.spec || '-'}}</div>
+              </li>
+            </ul>
+            <span class="inline-block arrow" @click="goodsScroll('right')">
+            <i class="iconfont icon-xiangyou"></i>
+          </span>
+          </div>
+          <div class="fr" @click="showDetailList(item.goods)">
+            <p class="price text-ellipse"><span>{{payData.currency | currencyFilter}}</span>{{item.goodsPrice}}</p>
+            <p class="count text-ellipse">共{{item.goods.length || 0}}件产品</p>
+          </div>
+        </div>
+        <div class="ps-operate-line" @click="showRuleSet(item.storeid)">
+          <span class="title">配送方式</span>
+          <div class="fr">
+            <div class="inline-block">
+              <span v-if="fareRule[item.storeid] && fareRule[item.storeid][0]">{{fareRule[item.storeid][0].method | deliveryRuleFilter}}</span>
+              <span v-if="fareRule[item.storeid] && fareRule[item.storeid][0]">{{fareRule[item.storeid][0].ruleName}}</span>
+              <span v-if="!(fareRule[item.storeid] && fareRule[item.storeid][0])" class="red">当前地址不支持配送,请与卖家协商处理</span>
+            </div>
+            <i class="iconfont icon-xiangyou" v-if="fareRule[item.storeid] && fareRule[item.storeid][0]"></i>
+          </div>
+        </div>
+        <div class="ps-operate-line ps-operate-takeself" v-if="checkShowTakeSelf(item)" @click="showTakeSelfSet(item.storeid)">
+          <span class="title">自提点</span>
+          <div class="fr">
+            <div class="inline-block">
+              <span>{{takeSelfData[item.storeid][0].takename}}</span>
+              <span>地址:{{takeSelfData[item.storeid][0].area + takeSelfData[item.storeid][0].detailAddress}}</span>
+              <span>营业时间:{{takeSelfData[item.storeid][0].businesstime}}</span>
+            </div>
+          </div>
+        </div>
+        <div class=""></div>
+        <div class="ps-operate-line">
+          <span class="title">订单备注</span>
+          <input type="text" v-model="item.remark" placeholder="选填:填写内容需和卖家协商确认">
+        </div>
+        <div class="ps-operate-line ps-price">
+          <span class="inline-block text-ellipse">
+             运费:<span class="ol-price" v-if="item.fare"><span v-if="item.fare.fare > 0">{{item.fare.currencyName | currencyFilter}}</span>{{item.fare.fare || 0}}</span>
+          </span>
+          <span class="inline-block text-ellipse">
+             店铺合计:<span class="ol-price"><span>{{payData.currency | currencyFilter}}</span>{{item.goodsFarePrice || 0}}</span>
+          </span>
+        </div>
+      </li>
+    </ul>
+    <div class="ps-operate-line pay-operate">
+      <span class="title">支付方式</span>
+      <div class="fr">
+        <span>线下支付</span>
+        <!--<i class="iconfont icon-xiangyou"></i>-->
+      </div>
+    </div>
+    <div class="ps-operate-line pay-invoice" @click="openInvoiceModal">
+      <span class="title">开具发票</span>
+      <div class="fr">
+        <div class="inline-block" :style="!selectedInvoice ? 'line-height: unset;' : ''">
+          <template v-if="selectedInvoice">
+            <span>{{selectedInvoice.head}}</span>
+            <span>{{selectedInvoice.kind === 1205 ? '增值税专用发票' : '增值税普通发票'}}</span>
+          </template>
+          <template v-else>
+            <span>暂不开具发票</span>
+          </template>
+        </div>
+        <i class="iconfont icon-xiangyou"></i>
+      </div>
+    </div>
+    <div class="buy-wrap">
+      <div class="fr">
+        <span class="title">实付:</span><span class="ol-price price inline-block text-ellipse"><span>{{payData.currency | currencyFilter}}</span>{{allOrderPrice}}</span>
+        <button class="buy-btn" @click="confirmOrder">提交订单</button>
+      </div>
+    </div>
+
+    <!-- 联系卖家弹框start -->
+    <link-user :infoObj="currentStoreInfo"
+               :showLink="showLink"
+               @closeAction="showLink = false">
+
+    </link-user>
+    <!-- 联系卖家弹框end -->
+
+    <!-- 产品清单弹框start -->
+    <modal-wrapper :showModal="showModal"
+                   :title="'产品清单'"
+                   @closeAction="showModal = false">
+      <ul class="cGoods-list">
+        <li v-for="cGoods in currentGoods" class="clearfix">
+          <div class="fl">
+            <div class="cg-param-line text-ellipse">
+              <span>品牌:</span>{{cGoods.brName}}
+            </div>
+            <div class="cg-param-line text-ellipse">
+              <span>物料名称(类目):</span>{{cGoods.kiName}}
+            </div>
+            <div class="cg-param-line text-ellipse">
+              <span>型号:</span>{{cGoods.cmpCode}}
+            </div>
+            <div class="cg-param-line text-ellipse">
+              <span>规格:</span>{{cGoods.spec}}
+            </div>
+          </div>
+          <div class="fr">
+            <p class="ol-price text-ellipse"><span>{{cGoods.currencyName | currencyFilter}}</span>{{cGoods.price}}</p>
+            <p class="count text-ellipse">x&nbsp;{{cGoods.number}}</p>
+          </div>
+        </li>
+      </ul>
+    </modal-wrapper>
+    <!-- 产品清单弹框end -->
+
+    <!-- 选择配送方式弹框start -->
+    <bottom-modal-wrapper :showModal="showDeliveryModal"
+                          :title="'选择配送方式'"
+                          @closeAction="onDeliveryModalClose">
+      <ul class="delivery-rule-list">
+        <li v-for="cdr in fareRule[currentDeliveryStoreId]" @click="checkDelivery(cdr)">
+          <label class="bottom-modal-check mobile-cart-check" :class="{'active': cdr.$checked}">
+            <input type="checkbox">
+            <span>{{cdr.method | deliveryRuleFilter}}</span>
+          </label>
+          <div class="fr" v-if="cdr.fare && cdr.fare > 0">运费:<span class="ol-price"><span>{{cdr.currencyName | currencyFilter}}</span>{{cdr.fare}}</span></div>
+        </li>
+      </ul>
+    </bottom-modal-wrapper>
+    <!-- 选择配送方式弹框end -->
+
+    <!-- 选择发票弹框start -->
+    <modal-wrapper :showModal="showInvoiceModal"
+                   :title="'选择发票'"
+                   @closeAction="showInvoiceModal = false">
+      <ul class="invoice-list">
+        <li @click="setInvoiceCheck(-1)">
+          <label class="bottom-modal-check mobile-cart-check" :class="{active: selectedInvoiceIndex === -1}">
+            <input type="checkbox">
+          </label>
+          <span class="inv-head">暂不开票</span>
+        </li>
+        <li v-for="(inv, index) in invoiceData" @click="setInvoiceCheck(index)">
+          <label class="bottom-modal-check mobile-cart-check" :class="{'active': selectedInvoiceIndex === index}">
+            <input type="checkbox">
+          </label>
+          <span class="inv-head inline-block text-ellipse">{{inv.head}}</span>
+          <img class="inv-type" :src="`/images/mobile/center/user/${inv.kind === 1205 ? 'invoice-spec' : 'invoice-nor'}.png`" alt="">
+          <div class="content-line" v-if="inv.kind === 1205">
+            <div class="title inline-block">单位地址:</div>
+            <div class="content inline-block">{{inv.companyAddress || '-'}}</div>
+          </div>
+          <div class="content-line" v-if="inv.kind === 1205">
+            <div class="title inline-block">单位电话:</div>
+            <div class="content inline-block">{{inv.companyPhone || '-'}}</div>
+          </div>
+          <div class="content-line" v-if="inv.kind === 1205">
+            <div class="title inline-block">税务登记号:</div>
+            <div class="content inline-block">{{inv.companyTaxNumber || '-'}}</div>
+          </div>
+          <div class="content-line" v-if="inv.kind === 1205">
+            <div class="title inline-block">开户银行:</div>
+            <div class="content inline-block">{{inv.bankName || '-'}}</div>
+          </div>
+          <div class="content-line" v-if="inv.kind === 1205">
+            <div class="title inline-block">开户银行账户:</div>
+            <div class="content inline-block">{{inv.bankAccount || '-'}}</div>
+          </div>
+          <div class="content-line">
+            <div class="title inline-block">收票人:</div>
+            <div class="content inline-block">{{inv.name || '-'}}</div>
+          </div>
+          <div class="content-line">
+            <div class="title inline-block">联系电话:</div>
+            <div class="content inline-block">{{inv.telephone || '-'}}</div>
+          </div>
+          <div class="content-line">
+            <div class="title inline-block">详细地址:</div>
+            <div class="content inline-block">{{inv.area + inv.detailAddress}}</div>
+          </div>
+        </li>
+      </ul>
+    </modal-wrapper>
+    <!-- 选择发票弹框end -->
+
+    <!-- 选择地址弹框start -->
+    <modal-wrapper :showModal="showAddrModal"
+                   :title="'收货地址'"
+                   @closeAction="showAddrModal = false">
+      <ul class="addr-list">
+        <li v-for="(addr, index) in addressData" :class="{active: selectedAddressIndex === index}" @click="setAddressCheck(index)">
+          <div class="info-line">
+            <label class="mobile-cart-check" :class="{active: selectedAddressIndex === index}">
+              <input type="checkbox">
+            </label>
+            <span class="name inline-block text-ellipse">{{addr.name}}</span>
+            <span class="tel inline-block text-ellipse">{{addr.tel}}</span>
+            <i class="inline-block" v-if="addr.num === 1">默认地址</i>
+          </div>
+          <p>{{addr.area + addr.detailAddress}}</p>
+        </li>
+      </ul>
+    </modal-wrapper>
+    <!-- 选择地址弹框end -->
+
+    <!-- 选择自提点弹框start -->
+    <modal-wrapper :showModal="showTakeSelfModal"
+                   :title="'选择自提点'"
+                   @closeAction="showTakeSelfModal = false">
+      <ul class="addr-list takeself-list">
+        <li v-for="(takeself, index) in takeSelfData[currentTakeSelfStoreId]" @click="checkTakeSelf(index)" :class="{active: index === 0}">
+          <div class="info-line">
+            <label class="mobile-cart-check" :class="{active: index === 0}">
+              <input type="checkbox">
+            </label>
+            <span class="name inline-block text-ellipse">{{takeself.takename}}</span>
+          </div>
+          <p><span>地址:</span>{{takeself.area + takeself.detailAddress}}</p>
+          <p><span>营业时间:</span>{{takeself.businesstime}}</p>
+        </li>
+      </ul>
+    </modal-wrapper>
+    <!-- 选择自提点弹框end -->
+
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+<script>
+  import { LinkUser, ModalWrapper, BottomModalWrapper } from '~components/mobile/base'
+  import { RemindBox } from '~components/mobile/common'
+  export default {
+    layout: 'mobile',
+    middleware: 'authenticated',
+    data () {
+      return {
+        orderData: [],
+        // 联系卖家店铺信息
+        currentStoreInfo: {},
+        showLink: false,
+        showModal: false,
+        showDeliveryModal: false,
+        showInvoiceModal: false,
+        showAddrModal: false,
+        showTakeSelfModal: false,
+        currentGoods: [],
+        remindText: '',
+        timeoutCount: '',
+        // 配送规则
+        fareRule: {},
+        // 自提点
+        takeSelfData: {},
+        // 正在修改配送方式的店铺id
+        currentDeliveryStoreId: '',
+        // 订单总价
+        allOrderPrice: 0,
+        // 选中的发票
+        selectedInvoiceIndex: -1,
+        // 选中的地址
+        selectedAddressIndex: 0,
+        // 正在修改自提点的店铺id
+        currentTakeSelfStoreId: ''
+      }
+    },
+    components: {
+      LinkUser,
+      ModalWrapper,
+      RemindBox,
+      BottomModalWrapper
+    },
+    fetch ({ store, params }) {
+      return Promise.all([
+        store.dispatch('userCenter/loadPayInfo', {enOrderid: params.orderId}),
+        store.dispatch('userCenter/loadAcceptAddress', {send: false}),
+        store.dispatch('userCenter/loadPayInvoice')
+      ])
+    },
+//    watch: {
+//      '$store.state.userCenter.list.invoice.data': {
+//        handler: function (val) {
+//          this.invoiceData = this.baseUtils.deepCopy(val)
+//          if (this.invoiceData && this.invoiceData.length) {
+//            this.invoiceData.forEach(item => {
+//              this.$set(item, '$checked', false)
+//            })
+//          }
+//        },
+//        immediate: true
+//      }
+//    },
+    computed: {
+      payData () {
+        //        // 人民币为专用增值税发票,美元不开发票    --1205专用增值税发票   --1206普通发票  --1207不开发票
+//        let invoices = this.baseUtils.deepCopy(this.$store.state.userCenter.list.pay.data)
+//        if (invoices.currency === 'USD') {
+//          invoices.invoicetype = 1207
+//          invoices.paytype = '1103'
+//        } else {
+//          invoices.invoicetype = 1205
+//          invoices.paytype = '1102'
+//        }
+//        // 默认选择第三方配送  --1301第三方配送 --卖家配送  --1303上门自提
+//        invoices.deliverytype = 1301
+//        return invoices
+        return this.$store.state.userCenter.list.pay.data
+      },
+      addressData () {
+        return this.$store.state.userCenter.list.address.data
+      },
+      invoiceData () {
+        return this.$store.state.userCenter.list.invoice.data
+      },
+      // 已选择完的发票
+      selectedInvoice () {
+        return this.selectedInvoiceIndex > -1 ? this.invoiceData[this.selectedInvoiceIndex] : null
+      },
+//      // 选择中选中的发票
+//      checkedInvoiceObj () {
+//        return this.invoiceData.find(item => {
+//          return item.$checked
+//        })
+//      },
+      selectedAddress () {
+//        console.log(this.addressData[this.selectedAddressIndex])
+        return this.addressData[this.selectedAddressIndex]
+      },
+      ruleParamsArr () {
+        let arr = []
+        this.orderData.forEach(item => {
+          item.goodsPrice = this.getTotalPrice(item)
+          arr.push({
+            uuid: item.storeid,
+            fare: this.getTotalPrice(item)
+          })
+        })
+        return arr
+      }
+//      // 选择自提点的列表统计
+//      showTakeSelfList () {
+//        let arr = {}
+//        if (!this.showDeliveryModal || !this.showTakeSelfModal) { // 为了触发更新
+//          for (let attr in this.fareRule) {
+//            arr[attr] = this.fareRule[attr][0] && this.fareRule[attr][0].method === 1303
+//          }
+//        }
+//        return arr
+//      }
+//      defaultAddress () {
+//        return this.addressData.find(item => {
+//          return item.num === 1
+//        })
+//      }
+    },
+    created () {
+      this.initOrderData()
+    },
+    methods: {
+      initOrderData () {
+        this.payData.orderDetails.forEach(item => {
+          let current = this.orderData.find(objItem => {
+            return objItem.storeid === item.storeid
+          })
+          if (!current) {
+            this.orderData.push({
+              storeName: item.storeName,
+              storeid: item.storeid,
+              supEnUU: item.supEnUU,
+              goods: [item]
+            })
+          } else {
+            current.goods.push(item)
+          }
+        })
+        this.getDeliveryRule()
+        this.getTakeSelfInfo()
+      },
+      getDeliveryRule () {
+        return this.$http.post(`/trade/distributionRule/usable/rule?area=${this.selectedAddress.area}`, this.ruleParamsArr)
+          .then(res => {
+            this.fareRule = res.data || {}
+            this.initFare()
+          }, err => {
+            this.setRemindText(err.response.data || '系统错误')
+          })
+      },
+      getTakeSelfInfo () {
+        return this.$http.post(`/trade/takeSelf/store/takeSelf`, this.ruleParamsArr)
+            .then(res => {
+              this.takeSelfData = res.data || {}
+            }, err => {
+              this.setRemindText(err.response.data || '系统错误')
+            })
+      },
+      initFare () {
+        this.allOrderPrice = 0
+        this.orderData.forEach(item => {
+          item.fare = this.fareRule[item.storeid] && this.fareRule[item.storeid].length ? this.fareRule[item.storeid][0] : {}
+          item.goodsPrice = this.getTotalPrice(item) // 总价
+          // 包含运费的价格
+          item.goodsFarePrice = item.goodsPrice + (item.fare && item.fare.fare ? item.fare.fare : 0)
+          this.allOrderPrice += item.goodsFarePrice
+        })
+      },
+      getTotalPrice (storeItem) {
+        let price = 0
+        storeItem.goods.forEach(item => {
+          price += item.price * item.number
+        })
+        return Number(price.toFixed(6))
+      },
+      linkSaler (item) {
+        this.$http.get(`/basic/enterprise/${item.supEnUU}/info`).then(res => {
+          this.currentStoreInfo = res.data
+          this.showLink = true
+        }, err => {
+          this.setRemindText(err.response.data || '系统错误')
+          console.log(err)
+        })
+      },
+      showDetailList (goods) {
+        this.currentGoods = goods
+        this.showModal = true
+      },
+      goodsScroll (type) {
+        console.log(type)
+      },
+      setRemindText: function (str) {
+        this.remindText = str
+        this.timeoutCount++
+      },
+      checkShowTakeSelf (item) {
+        return item.fare && item.fare.method === 1303
+      },
+      // 显示配送规则弹框
+      showRuleSet: function (storeid) {
+        if (this.fareRule[storeid] && this.fareRule[storeid].length) {
+          this.currentDeliveryStoreId = storeid
+          this.clearCurrentDeliveryCheck()
+          this.fareRule[this.currentDeliveryStoreId][0].$checked = true
+          this.showDeliveryModal = true
+        }
+//        console.log(storeid)
+      },
+      clearCurrentDeliveryCheck () {
+        this.fareRule[this.currentDeliveryStoreId].forEach(item => {
+          if (!item.hasOwnProperty('$checked')) {
+            this.$set(item, '$checked', false)
+          } else {
+            item.$checked = false
+          }
+        })
+      },
+      checkDelivery (cdr) {
+        if (!cdr.$checked) {
+          this.clearCurrentDeliveryCheck()
+          cdr.$checked = true
+        }
+      },
+      onDeliveryModalClose (isSubmit) {
+        if (!isSubmit) {
+          this.showDeliveryModal = false
+//          this.currentDeliveryRule = {}
+        } else {
+          let currentDi = this.fareRule[this.currentDeliveryStoreId]
+          for (let i = 0; i < currentDi.length; i++) {
+            if (currentDi[i].$checked) {
+              this.baseUtils.exchangeArr(currentDi, i, 0)
+              break
+            }
+          }
+          this.initFare()
+          this.showDeliveryModal = false
+        }
+      },
+      // 显示自提点弹框
+      showTakeSelfSet (storeid) {
+        if (this.takeSelfData[storeid] && this.takeSelfData[storeid].length) {
+          this.currentTakeSelfStoreId = storeid
+          this.showTakeSelfModal = true
+        }
+      },
+      checkTakeSelf (index) {
+//        for (let i = 0; i < this.takeSelfData[this.currentTakeSelfStoreId].length; i++) {
+//          if (item.id === this.takeSelfData[this.currentTakeSelfStoreId][i].id) {
+//
+//            break
+//          }
+//        }
+        if (index > 0) {
+          this.baseUtils.exchangeArr(this.takeSelfData[this.currentTakeSelfStoreId], index, 0)
+        }
+        this.showTakeSelfModal = false
+      },
+      setInvoiceCheck (index) {
+        if (this.selectedInvoiceIndex === index) {
+          return
+        }
+        this.selectedInvoiceIndex = index
+        this.showInvoiceModal = false
+      },
+      openInvoiceModal () {
+        if (this.invoiceData && this.invoiceData.length) {
+          this.showInvoiceModal = true
+        } else {
+          this.setRemindText('暂无发票信息,请前往pc端维护')
+        }
+      },
+      setAddressCheck (index) {
+        if (this.selectedAddressIndex === index) {
+          return
+        }
+        this.selectedAddressIndex = index
+        this.showAddrModal = false
+        this.getDeliveryRule()
+      },
+      openAddrModal () {
+        if (this.addressData && this.addressData.length) {
+          this.showAddrModal = true
+        } else {
+          this.setRemindText('暂无收货地址,请前往pc端维护')
+        }
+      },
+      // 配送规则校验
+      checkRule () {
+        let flag = true
+        for (let attr in this.fareRule) {
+          if (!this.fareRule[attr].length) {
+            flag = false
+          }
+        }
+        return flag
+      },
+      // 收货地址校验
+      checkAddress () {
+        if (!this.selectedAddress) {
+          this.setRemindText('收货地址信息为空,请前往pc端添加收货地址')
+          return false
+        } else if (this.selectedAddress.area.indexOf('香港') > -1) {
+          if (this.payData.currency === 'RMB') {
+            this.setRemindText('当前选择的币别是RMB,地址却是香港')
+            return false
+          }
+        } else {
+          if (this.payData.currency === 'USD') {
+            this.setRemindText('当前选择的币别是USD,地址却是内陆')
+            return false
+          }
+        }
+        return true
+      },
+      // 提交订单流程
+      confirmOrder () {
+        if (this.accountInvalid) {
+          this.setRemindText('您的账户安全等级较低,请先在pc端进行信息完善')
+        } else {
+          if (this.payData.status === 502 || this.payData.status === 503) {
+            this.underLinePaySubmitted()
+          } else {
+            if (!this.checkRule()) {
+              this.setRemindText('当前地址部分卖家无法配送,请重新选择地址或与卖家协商处理')
+            } else {
+              let infos = []
+              let info = this.generateOrderInfo()
+              if (info) {
+                infos.push(info)
+                this.doSubmit(infos)
+              }
+            }
+          }
+        }
+      },
+      // 待付款订单-线下付款
+      underLinePaySubmitted () {
+        let arr = []
+        if (this.payData.orderids) {
+          arr = this.payData.orderids.split(',')
+        } else {
+          arr.push(this.payData.orderid)
+        }
+        let param = {
+          orderid: this.baseUtils.enidfilter(arr.join('-'))
+        }
+        console.log(param)
+        // 跳转至付款页面
+        return param
+      },
+      // 处理订单数据
+      generateOrderInfo () {
+        let orderInfo = {
+          id: this.payData.id,
+          orderid: this.payData.orderid
+        }
+        if (this.payData.currency === 'USD' && this.selectedInvoiceIndex !== -1) {
+          this.setRemindText('美元请选择暂不开票')
+          return false
+        }
+        if (this.checkAddress()) {
+          orderInfo.add_id = this.selectedAddress.id
+        } else {
+          return false
+        }
+        let submitParam = this.orderSubmitParams()
+        // 发票信息
+        if (this.selectedInvoice) {
+          if (this.selectedInvoice.kind === 1205) {
+            orderInfo.invoicetype = '1205'
+          } else if (this.selectedInvoice.kind === 1206) {
+            if (submitParam.includeConsignment) {
+              this.setRemindText('订单中包含寄售类型商品,请选择专票')
+              return false
+            }
+            orderInfo.invoicetype = '1206'
+          }
+          if (this.selectedInvoice.id) {
+            orderInfo.invoiceid = this.selectedInvoice.id
+          } else {
+            this.setRemindText('请添加发票信息')
+            return false
+          }
+        } else {
+          orderInfo.invoicetype = '1207'
+        }
+        orderInfo.totalprice = submitParam.goodsPrice
+        orderInfo.currency = this.payData.currency
+        orderInfo.orderRemark = JSON.stringify(submitParam.remarkObj)
+        // 1103线下 1102线上
+        orderInfo.payType = '1103'
+        orderInfo.splitInfo = {
+          ruleList: JSON.stringify(submitParam.ruleList),
+          takeList: JSON.stringify(submitParam.takeList)
+        }
+        orderInfo.orderDetails = this.convertOrderDetailParams()
+        console.log(orderInfo)
+        return orderInfo
+
+        // 人民币为专用增值税发票,美元不开发票    --1205专用增值税发票   --1206普通发票  --1207不开发票
+        // 默认选择第三方配送  --1301第三方配送 --卖家配送  --1303上门自提
+      },
+      // 订单提交的参数整合
+      orderSubmitParams () {
+        let params = {
+          // 不包含运费的价格
+          goodsPrice: 0,
+          // 备注
+          remarkObj: {},
+          // 配送方式
+          ruleList: {},
+          // 自提点
+          takeList: {},
+          // 是否包含寄售商品
+          includeConsignment: false
+        }
+        this.orderData.forEach(item => {
+          params.goodsPrice += item.goodsPrice
+          params.remarkObj[item.storeid] = item.remark
+          params.ruleList[item.storeid] = item.fare
+          params.takeList[item.storeid] = this.checkShowTakeSelf(item) ? this.takeSelfData[item.storeid][0] : null
+          if (item.storeid === '33069557578d44e69bd91ad12d28a8d4') {
+            params.includeConsignment = true
+          }
+        })
+        return params
+      },
+      // 提取要提交到服务器的订单明细goods数据
+      convertOrderDetailParams () {
+        let orderDetails = []
+        this.payData.orderDetails.forEach(item => {
+          orderDetails.push({
+            id: item.id,
+            number: item.number,
+            taxUnitprice: item.taxUnitprice,
+            remark: item.remark,
+            goodsnumber: item.goodsnumber,
+            storeid: item.storeid
+          })
+        })
+        return orderDetails
+      },
+      // 提交订单请求
+      doSubmit (orders) {
+        this.$http.put(`/trade/order/${this.baseUtils.enidfilter(this.payData.orderid)}/ensure`, orders)
+          .then(res => {
+            console.log(res)
+            if (res.data.code === 1) {
+              if (res.data.data && res.data.data[0]) {
+                let orderids = []
+                let batchCodes = []
+                for (let i = 0; i < res.data.data.length; i++) {
+                  orderids.push(res.data.data[i].orderid)
+                  for (let j = 0; j < res.data.data[i].orderDetails.length; j++) {
+                    batchCodes.push(res.data.data[i].orderDetails[j].batchCode)
+                  }
+                }
+                // 如果不是立即购买,删除购物车里的对应信息
+                if (!this.payData.buyNow) {
+                  this.$http.put('/trade/cart/delete', batchCodes)
+                }
+                // 跳转至订单提交完成页面
+                console.log('订单提交完成,跳转至结果页')
+                this.$router.push(`/mobile/center/user/doPay/${encodeURIComponent(this.baseUtils.enidfilter(orderids.join('-')))}`)
+              }
+            } else {
+              if (res.data.data.code === 6) {
+                this.setRemindText(res.data.message + ',请刷新界面之后重新操作')
+              } else if (res.data.data.code === 7) {
+                this.setRemindText(res.data.message + ',将为您跳转到购物车界面')
+                setTimeout(() => {
+                  this.$router.push('/mobile/center/user/cart')
+                }, 1500)
+              } else {
+                this.setRemindText(res.data.message)
+              }
+            }
+          }, err => {
+            console.log(err)
+            this.setRemindText(err.response.data || '提交订单失败')
+          })
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  $red-text: #f43938;
+  .mobile-pay {
+    margin-bottom: 2.02rem;
+    .pay-head {
+      height: 1.31rem;
+      padding: .25rem 0 0 .21rem;
+      position: relative;
+      border-bottom: .18rem solid #f1f3f7;
+      background: url('/images/mobile/center/user/addr-border.png') no-repeat;
+      background-size: contain;
+      background-position: bottom;
+      .info {
+        padding-left: .43rem;
+        font-size: .3rem;
+        font-weight: bold;
+      }
+      .addr {
+        width: 6.5rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        img {
+          height: .29rem;
+          margin-right: .16rem;
+        }
+        span {
+          font-size: .26rem;
+        }
+      }
+      .icon-xiangyou {
+        position: absolute;
+        right: .21rem;
+        top: .52rem;
+        color: #bebebe;
+      }
+    }
+    .pay-store-list {
+      .ps-item {
+        border-bottom: .18rem solid #f1f3f7;
+        .ps-store-name {
+          height: .89rem;
+          line-height: .89rem;
+          padding: 0 .25rem;
+          font-size: .28rem;
+          text-align: left;
+        }
+        .ps-goods-info {
+          background: #f0f0f0;
+          .fl {
+            padding: 0 .29rem;
+            position: relative;
+            .ps-goods-list {
+              width: 4.5rem;
+              height: 100%;
+              padding: .22rem 0;
+              overflow-x: auto;
+              white-space: nowrap;
+              li {
+                border-right: 1px solid #969696;
+                .ps-goods-item {
+                  width: 2.25rem;
+                  padding-left: .12rem;
+                }
+              }
+            }
+            .arrow {
+              position: absolute;
+              height: 100%;
+              color: #666;
+              background: #dfdfdf;
+              padding-top: .72rem;
+              top: 0;
+              &:first-child {
+                left: 0;
+              }
+              &:last-child {
+                right: 0;
+              }
+            }
+          }
+          .fr {
+            width: 2.3rem;
+            text-align: center;
+            .price {
+              color: #f43938;
+              font-size: .32rem;
+              margin-top: .44rem;
+              padding-right: .05rem;
+              span {
+                font-size: .24rem;
+              }
+            }
+            .count {
+              font-size: .28rem;
+              font-weight: bold;
+              margin-top: .2rem;
+            }
+          }
+        }
+      }
+    }
+    .ps-operate-line {
+      height: .89rem;
+      line-height: .89rem;
+      padding: 0 .21rem 0 .25rem;
+      border-bottom: 1px solid #e4e4e4;
+      font-size: .28rem;
+      .fr {
+        height: 100%;
+        .inline-block {
+          line-height: normal;
+          text-align: right;
+          span {
+            font-size: .27rem;
+            color: #666;
+            &:first-child {
+              color: #333;
+              font-weight: bold;
+              display: block;
+            }
+            &.red {
+              color: $red-text;
+            }
+          }
+        }
+        i {
+          color: #bebebe;
+          margin-left: .14rem;
+        }
+      }
+      input {
+        width: 4.78rem;
+        margin-left: .68rem;
+        padding: 0 .1rem;
+        height: .45rem;
+      }
+      &.ps-price {
+        text-align: right;
+        padding-right: .31rem;
+        .inline-block {
+          font-size: .26rem;
+          max-width: 64%;
+          &:first-child {
+            max-width: 32%;
+            margin-right: .18rem;
+          }
+        }
+      }
+      &.pay-operate {
+        border-bottom: .11rem solid #f1f3f7;
+        padding-top: 0;
+        .fr {
+          line-height: .78rem;
+          i {
+            position: static;
+          }
+          span {
+            color: #333;
+            font-size: .28rem;
+          }
+        }
+      }
+      &.pay-invoice {
+        border-bottom: .11rem solid #f1f3f7;
+        .fr {
+          padding-top: 0;
+          .inline-block {
+            vertical-align: top;
+          }
+          i {
+            float: right;
+          }
+          span {
+            font-size: .28rem;
+            color: #333;
+            font-weight: normal !important;
+            max-width: 5rem;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+        }
+      }
+      &.ps-operate-takeself {
+        height: 1.35rem;
+        line-height: 1.35rem;
+        .fr {
+          span {
+            display: block;
+            max-width: 5.5rem;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+        }
+      }
+    }
+    .ol-price {
+      color: #f43938;
+      font-size: .32rem;
+      span {
+        font-size: .24rem;
+      }
+    }
+    .buy-wrap {
+      position: fixed;
+      bottom: .98rem;
+      height: 1.02rem;
+      line-height: 1.02rem;
+      padding-left: .27rem;
+      background: #fff;
+      width: 100%;
+      border-top: .02rem solid #ccc;
+      .fr {
+        .title {
+          font-size: .28rem;
+          margin-right: .13rem;
+        }
+        .price {
+          max-width: 3.6rem;
+          vertical-align: top;
+          span {
+            margin-right: .08rem;
+          }
+          margin-right: .13rem;
+        }
+        .buy-btn {
+          width: 2.08rem;
+          height: 1.02rem;
+          line-height: 1.02rem;
+          text-align: center;
+          font-size: .28rem;
+          color: #fff;
+          background: #fc2706;
+        }
+      }
+    }
+    .cGoods-list {
+      background: #fff;
+      li {
+        padding: .3rem .32rem;
+        border-bottom: 1px solid #e4e4e4;
+        .fl {
+          .cg-param-line {
+            width: 3.65rem;
+            margin-bottom: .23rem;
+            &:last-child {
+              margin-bottom: 0;
+            }
+            font-size: .28rem;
+            span {
+              color: #666;
+            }
+          }
+        }
+        .fr {
+          text-align: right;
+          p {
+            width: 2.3rem;
+          }
+          .ol-price {
+            margin-top: .59rem;
+          }
+          .count {
+            color: #999;
+            font-size: .24rem;
+            margin-top: .32rem;
+          }
+        }
+      }
+    }
+    .delivery-rule-list {
+      li {
+        background: #fff;
+        text-align: left;
+        padding: 0 .31rem 0 .25rem;
+        height: .94rem;
+        line-height: .94rem;
+        .fr {
+          height: 100%;
+          .ol-price {
+            margin-left: .23rem;
+          }
+        }
+      }
+    }
+    .invoice-list {
+      background: #f1f3f7;
+      padding: .19rem 0;
+      li {
+        margin-bottom: .19rem;
+        position: relative;
+        &:last-child {
+          margin-bottom: 0;
+        }
+        background: #fff;
+        padding: .26rem .16rem .32rem .25rem;
+        .inv-head {
+          margin-left: .17rem;
+          max-width: 5.3rem;
+        }
+        .inv-type {
+          position: absolute;
+          right: 0;
+          top: 0;
+          height: .85rem;
+        }
+        .content-line {
+          margin-top: .23rem;
+          padding-left: .53rem;
+          .title {
+            width: 34%;
+            text-align: right;
+            vertical-align: top;
+          }
+          .content {
+            width: 66%;
+            word-break: break-all;
+          }
+        }
+      }
+    }
+    .addr-list {
+      background: #f1f3f7;
+      padding: .19rem 0;
+      li {
+        margin-bottom: .19rem;
+        position: relative;
+        &:last-child {
+          margin-bottom: 0;
+        }
+        background: #fff;
+        padding: .35rem .25rem .28rem;
+        .info-line {
+          font-size: .3rem;
+          color: #666;
+
+          .name {
+            margin: 0 .27rem 0 .17rem;
+            max-width: 1.5rem;
+          }
+          .tel {
+            max-width: 2.3rem;
+          }
+          i {
+            width: 1.08rem;
+            height: .25rem;
+            line-height: .25rem;
+            font-size: .24rem;
+            text-align: center;
+            border: 1px solid #fc2706;
+            border-radius: .04rem;
+            color: #f43938;
+            font-style: normal;
+            margin-left: .48rem;
+          }
+        }
+        p {
+          margin-top: .19rem;
+          word-break: break-all;
+          padding-left: .54rem;
+          font-size: .28rem;
+          color: #999;
+        }
+        &.active {
+          .info-line {
+            color: #f43938;
+          }
+          p {
+            color: #666;
+          }
+        }
+      }
+    }
+    .takeself-list {
+      li {
+        .info-line {
+          .name {
+            max-width: 5.3rem;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 5 - 0
pages/mobile/center/vendor/index.vue

@@ -49,6 +49,11 @@
           <span>我的店铺</span>
           <i class="iconfont icon-xiangyou"></i>
         </div>-->
+        <nuxt-link tag="div" to="/mobile/order?type=saler" class="content-line">
+          <img src="/images/mobile/center/user/order.jpg" alt="">
+          <span>采购订单</span>
+          <i class="iconfont icon-xiangyou"></i>
+        </nuxt-link>
         <nuxt-link tag="div" to="/mobile/center/vendor/message"  class="content-line" v-if="user.data.enterprise.uu">
           <img src="/images/mobile/center/user/message.png" alt="">
           <span>消息中心<span class="text">({{messageCount.count || 0}})</span></span>

+ 43 - 0
pages/provider/shop.vue

@@ -0,0 +1,43 @@
+<template>
+  <!-- 组件模板只能包含一个根元素,除非使用v-if 和 v-if-else -->
+  <div>
+    <!-- 轮播及店铺推荐 -->
+    <recommend-store/>
+
+    <recommendStore-show/>
+  </div>
+</template>
+<script>
+import { RecommendStore, RecommendStoreShow } from '~components/provider'
+
+export default {
+  layout: 'main',
+  fetch ({ store }) {
+    return Promise.all([
+      store.dispatch('loadBanners', {type: 'factory_banner_carousel'}),
+      store.dispatch('provider/loadSalesStore', { isOriginal: true }),
+      store.dispatch('provider/loadNewStores', { types: 'ORIGINAL_FACTORY' }),
+      store.dispatch('provider/loadRecommendOriginal', { types: 'ORIGINAL_FACTORY', num: 5 }),
+      store.dispatch('provider/findSimilarStoreList', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' }),
+      store.dispatch('provider/loadHotComponents'),
+      store.dispatch('provider/loadFactoriesCount'),
+      store.dispatch('provider/loadAgencyCount'),
+      store.dispatch('loadStoreStatus', { op: 'check' })
+    ])
+  },
+  components: {
+    RecommendStore,
+    RecommendStoreShow
+  },
+  data () {
+    return {
+      msg: 'hello vue'
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+  div{
+    background: #efefef;
+  }
+</style>

+ 1 - 1
pages/supplier/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="supplier" style="background: #f2f1f1;padding-top:20px; margin-top:-20px;">
+  <div class="supplier" style="background: #f2f1f1;padding-top:20px;">
     <div class="container">
       <div class="article">
         <article-one></article-one>

+ 66 - 9
plugins/mixin.js

@@ -64,6 +64,10 @@ Vue.mixin({
     },
     isMobile () {
       return this.$store.state.option.isMobile
+    },
+    // 账户安全状态
+    accountInvalid () {
+      return !this.user.data.pwdEnable || !this.user.data.haveUserQuestion || !this.user.data.emailValidCode || this.user.data.emailValidCode !== 2
     }
   },
   methods: {
@@ -79,15 +83,17 @@ Vue.mixin({
       }
     },
     _initscroll() {
-      if (!this.initScroll) {
-        this.initScroll = new BScroll(this.$refs.mobileModalBox, {
-          click: true
-        })
-      } else {
-        this.initScroll.destroy()
-        this.initScroll = new BScroll(this.$refs.mobileModalBox, {
-          click: true
-        })
+      if (this.$refs.mobileModalBox) {
+        if (!this.initScroll) {
+          this.initScroll = new BScroll(this.$refs.mobileModalBox, {
+            click: true
+          })
+        } else {
+          this.initScroll.destroy()
+          this.initScroll = new BScroll(this.$refs.mobileModalBox, {
+            click: true
+          })
+        }
       }
     },
     login: function (url) {
@@ -137,6 +143,57 @@ Vue.mixin({
           return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
         }
       }
+    },
+    currencyFilter: function (val) {
+      return val === 'RMB' ? '¥' : '$'
+    },
+    telHideFilter: function (val) {
+      return val.slice(0, 3) + '****' + val.slice(7, 11)
+    },
+    storeTypeFilter: function (type) {
+      let tmp = ''
+      switch (type) {
+        case 'CONSIGNMENT':
+          tmp = '寄售'
+          break
+        case 'DISTRIBUTION':
+          tmp = '经销'
+          break
+        case 'AGENCY':
+          tmp = '代理'
+          break
+        case 'ORIGIN_FACTORY':
+          tmp = '原厂'
+          break
+      }
+      return tmp
+    },
+    deliveryRuleFilter: function (type) {
+      let tmp = ''
+      switch (type) {
+        case 1301:
+          tmp = '第三方配送'
+          break
+        case 1302:
+          tmp = '卖家配送'
+          break
+        case 1303:
+          tmp = '上门自提'
+          break
+      }
+      return tmp
+    },
+    invoiceTypeFilter: function (type) {
+      let tmp = ''
+      switch (type) {
+        case 1205:
+          tmp = '普票'
+          break
+        case 1206:
+          tmp = '专票'
+          break
+      }
+      return tmp
     }
   }
 })

BIN
static/images/brandCenter/11.png


BIN
static/images/brandCenter/22.png


BIN
static/images/brandCenter/33.png


BIN
static/images/brandCenter/brand-recommend.png


BIN
static/images/brandCenter/search-index.png


BIN
static/images/mobile/center/user/addr-border.png


BIN
static/images/mobile/center/user/addr-flag.png


BIN
static/images/mobile/center/user/bottom-checked.png


BIN
static/images/mobile/center/user/car-checked.png


BIN
static/images/mobile/center/user/car-noChecked.png


BIN
static/images/mobile/center/user/cart.jpg


BIN
static/images/mobile/center/user/invoice-nor.png


BIN
static/images/mobile/center/user/invoice-spec.png


BIN
static/images/mobile/center/user/order.jpg


BIN
static/images/original/angle-blue.png


BIN
static/images/original/angle-white.png


BIN
static/images/original/line.png


+ 70 - 0
store/floor.js

@@ -3,6 +3,26 @@ export const state = () => ({
     fetching: false,
     data: []
   },
+  listF1: {
+    fetching: false,
+    data: []
+  },
+  listF2: {
+    fetching: false,
+    data: []
+  },
+  listF3: {
+    fetching: false,
+    data: []
+  },
+  listF4: {
+    fetching: false,
+    data: []
+  },
+  listF5: {
+    fetching: false,
+    data: []
+  },
   list_v3: {
     fetching: false,
     data: []
@@ -23,6 +43,56 @@ export const mutations = {
     state.list.fetching = false
     state.list.data = result
   },
+  REQUEST_LISTF1 (state) {
+    state.listF1.fetching = true
+  },
+  GET_LIST_FAILUREF1 (state) {
+    state.listF1.fetching = false
+  },
+  GET_LIST_SUCCESSF1 (state, result) {
+    state.listF1.fetching = false
+    state.listF1.data = result
+  },
+  REQUEST_LISTF2 (state) {
+    state.listF2.fetching = true
+  },
+  GET_LIST_FAILUREF2 (state) {
+    state.listF2.fetching = false
+  },
+  GET_LIST_SUCCESSF2 (state, result) {
+    state.listF2.fetching = false
+    state.listF2.data = result
+  },
+  REQUEST_LISTF3 (state) {
+    state.listF3.fetching = true
+  },
+  GET_LIST_FAILUREF3 (state) {
+    state.listF3.fetching = false
+  },
+  GET_LIST_SUCCESSF3 (state, result) {
+    state.listF3.fetching = false
+    state.listF3.data = result
+  },
+  REQUEST_LISTF4 (state) {
+    state.listF4.fetching = true
+  },
+  GET_LIST_FAILUREF4 (state) {
+    state.listF4.fetching = false
+  },
+  GET_LIST_SUCCESSF4 (state, result) {
+    state.listF4.fetching = false
+    state.listF4.data = result
+  },
+  REQUEST_LISTF5 (state) {
+    state.listF5.fetching = true
+  },
+  GET_LIST_FAILUREF5 (state) {
+    state.listF5.fetching = false
+  },
+  GET_LIST_SUCCESSF5 (state, result) {
+    state.listF5.fetching = false
+    state.listF5.data = result
+  },
   REQUEST_NEWLIST (state) {
     state.list_v3.fetching = true
   },

+ 51 - 1
store/index.js

@@ -127,7 +127,7 @@ export const actions = {
   // 获取轮播配置
   loadBanners({ commit }, params = {}) {
     commit('carousel/REQUEST_BANNER')
-    return axios.get('/api/carousel/' + params.type + '%20' + (params.type === 'home' ? 'page' : 'zone') + '%20banner')
+    return axios.get(`/cmsApi?method=queryContentPage&module=${params.type}&orderBy=order_number%20ASC`)
       .then(response => {
         commit('carousel/GET_BANNER_SUCCESS', response.data)
       }, err => {
@@ -144,6 +144,56 @@ export const actions = {
         commit('floor/GET_NEWLIST_FAILURE', err)
       })
   },
+  // 获取楼层配置f1
+  loadNewFloorsF1({ commit }) {
+    commit('floor/REQUEST_LISTF1')
+    return axios.get(`/cmsApi?method=queryContentPage&module=home_floor_f1&orderBy=order_number%20ASC`)
+      .then(response => {
+        commit('floor/GET_LIST_SUCCESSF1', response.data)
+      }, err => {
+        commit('floor/GET_LIST_FAILUREF1', err)
+      })
+  },
+  // 获取楼层配置f2
+  loadNewFloorsF2({ commit }) {
+    commit('floor/REQUEST_LISTF2')
+    return axios.get(`/cmsApi?method=queryContentPage&module=home_floor_f2&orderBy=order_number%20ASC`)
+      .then(response => {
+        commit('floor/GET_LIST_SUCCESSF2', response.data)
+      }, err => {
+        commit('floor/GET_LIST_FAILUREF2', err)
+      })
+  },
+  // 获取楼层配置f3
+  loadNewFloorsF3({ commit }) {
+    commit('floor/REQUEST_LISTF3')
+    return axios.get(`/cmsApi?method=queryContentPage&module=home_floor_f3&orderBy=order_number%20ASC`)
+      .then(response => {
+        commit('floor/GET_LIST_SUCCESSF3', response.data)
+      }, err => {
+        commit('floor/GET_LIST_FAILUREF3', err)
+      })
+  },
+  // 获取楼层配置f4
+  loadNewFloorsF4({ commit }) {
+    commit('floor/REQUEST_LISTF4')
+    return axios.get(`/cmsApi?method=queryContentPage&module=home_floor_f4&orderBy=order_number%20ASC`)
+      .then(response => {
+        commit('floor/GET_LIST_SUCCESSF4', response.data)
+      }, err => {
+        commit('floor/GET_LIST_FAILUREF4', err)
+      })
+  },
+  // 获取楼层配置f5
+  loadNewFloorsF5({ commit }) {
+    commit('floor/REQUEST_LISTF5')
+    return axios.get(`/cmsApi?method=queryContentPage&module=home_floor_f5&orderBy=order_number%20ASC`)
+      .then(response => {
+        commit('floor/GET_LIST_SUCCESSF5', response.data)
+      }, err => {
+        commit('floor/GET_LIST_FAILUREF5', err)
+      })
+  },
   // 获取子器件类目
   loadProductKinds({ commit }, params = {}) {
     let id = params.id

+ 26 - 10
store/provider.js

@@ -42,6 +42,32 @@ export const actions = {
       commit('storeCms/GET_SALES_FAILURE', err)
     })
   },
+  // 获取原厂入驻数量信息
+  loadFactoriesCount ({commit}, params = {types: 'ORIGINAL_FACTORY'}) {
+    commit('stores/REQUEST_ORIGINALCOUNT')
+    return axios.get('/api/store-service/stores/type/count', {
+      params: {
+        types: params.types
+      }
+    }).then(response => {
+      commit('stores/GET_ORIGINALCOUNT_SUCCESS', response.data && response.data.success ? response.data.data : 0)
+    }, err => {
+      commit('stores/GET_ORIGINALCOUNT_FAILURE', err)
+    })
+  },
+  // 获取代理经销入驻数量信息
+  loadAgencyCount ({commit}, params = {types: 'AGENCY-DISTRIBUTION'}) {
+    commit('stores/REQUEST_STORE_COUNT')
+    return axios.get('/api/store-service/stores/type/count', {
+      params: {
+        types: params.types
+      }
+    }).then(response => {
+      commit('stores/GET_STORE_COUNT_SUCCESS', response.data && response.data.success ? response.data.data : 0)
+    }, err => {
+      commit('stores/GET_STORE_COUNT_FAILURE', err)
+    })
+  },
   // 获取新开店铺信息
   loadNewStores ({ commit }, params = { types: 'ORIGINAL_FACTORY' }) {
     commit('storeCms/REQUEST_NEW_STORES')
@@ -52,16 +78,6 @@ export const actions = {
       }
     }).then(response => {
       commit('storeCms/GET_NEW_STORES_SUCCESS', response.data)
-      commit('storeCms/REQUEST_STORE_COUNT')
-      return axios.get('/api/store-service/stores/type/count', {
-        params: {
-          types: params.types
-        }
-      }).then(response => {
-        commit('storeCms/GET_STORE_COUNT_SUCCESS', response.data && response.data.success ? response.data.data : 0)
-      }, err => {
-        commit('storeCms/GET_STORE_COUNT_FAILURE', err)
-      })
     }, err => {
       commit('storeCms/GET_NEW_STORES_FAILURE', err)
     })

+ 0 - 14
store/provider/storeCms.js

@@ -7,10 +7,6 @@ export const state = () => ({
     fetching: false,
     data: []
   },
-  storeCount: {
-    fetching: false,
-    data: 0
-  },
   recommendStore: {
     fetching: false,
     data: []
@@ -42,16 +38,6 @@ export const mutations = {
     state.newStores.fetching = false
     state.newStores.data = result
   },
-  REQUEST_STORE_COUNT (state) {
-    state.storeCount.fetching = true
-  },
-  GET_STORE_COUNT_FAILURE (state) {
-    state.storeCount.fetching = false
-  },
-  GET_STORE_COUNT_SUCCESS (state, result) {
-    state.storeCount.fetching = false
-    state.storeCount.data = result
-  },
   REQUEST_RECOMMEND_STORE (state) {
     state.recommendStore.fetching = true
   },

+ 34 - 0
store/provider/stores.js

@@ -2,6 +2,17 @@ export const state = () => ({
   storeList: {
     fetching: false,
     data: {}
+  },
+  originalCount: {
+    fetching: false,
+    data: 0
+  },
+  storeCount: {
+    fetching: false,
+    data: 0
+  },
+  storeType: {
+    data: 'factory'
   }
 })
 
@@ -15,5 +26,28 @@ export const mutations = {
   GET_STORE_LIST_SUCCESS (state, result = {}) {
     state.storeList.fetching = false
     state.storeList.data = result
+  },
+  REQUEST_ORIGINALCOUNT (state) {
+    state.originalCount.fetching = true
+  },
+  GET_ORIGINALCOUNT_FAILURE (state) {
+    state.originalCount.fetching = false
+  },
+  GET_ORIGINALCOUNT_SUCCESS (state, result) {
+    state.originalCount.fetching = false
+    state.originalCount.data = result
+  },
+  REQUEST_STORE_COUNT (state) {
+    state.storeCount.fetching = true
+  },
+  GET_STORE_COUNT_FAILURE (state) {
+    state.storeCount.fetching = false
+  },
+  GET_STORE_COUNT_SUCCESS (state, result) {
+    state.storeCount.fetching = false
+    state.storeCount.data = result
+  },
+  SET_STORETYPE (state, result) {
+    state.storeType.data = result || 'factory'
   }
 }

+ 74 - 0
store/userCenter.js

@@ -0,0 +1,74 @@
+import axios from '~plugins/axios'
+
+export const actions = {
+  // app获取购物车列表
+  loadCartList ({ commit }, params = {}) {
+    commit('list/REQUEST_CART')
+    return axios.get('/trade/cart/pageInfo', {params: params})
+      .then(response => {
+        commit('list/GET_CART_SUCCESS', response.data)
+      }, err => {
+        commit('list/GET_CART_FAILURE', err)
+      })
+  },
+  // app获取结算页订单信息
+  loadPayInfo ({ commit }, params = {}) {
+    commit('list/REQUEST_PAY')
+    return axios.get('/trade/order/orderContainGoods', {params: params})
+      .then(response => {
+        commit('list/GET_PAY_SUCCESS', response.data)
+      }, err => {
+        commit('list/GET_PAY_FAILURE', err)
+      })
+  },
+  // app获取结算页收货地址
+  loadAcceptAddress ({ commit }, params = {}) {
+    commit('list/REQUEST_ADDRESS')
+    return axios.get('/trade/address/shipping', {params: params})
+      .then(response => {
+        commit('list/GET_ADDRESS_SUCCESS', response.data)
+      }, err => {
+        commit('list/GET_ADDRESS_FAILURE', err)
+      })
+  },
+  // app获取结算页发票信息
+  loadPayInvoice ({ commit }, params = {}) {
+    commit('list/REQUEST_INVOICE')
+    return axios.get('/trade/bill/list/personal', {params: params})
+      .then(response => {
+        commit('list/GET_INVOICE_SUCCESS', response.data)
+      }, err => {
+        commit('list/GET_INVOICE_FAILURE', err)
+      })
+  },
+  // 根据订单号获取订单信息
+  loadOrderData ({ commit }, params = {}) {
+    commit('list/REQUEST_ORDER')
+    return axios.get(`/trade/order/${params.ids}`)
+      .then(response => {
+        commit('list/GET_ORDER_SUCCESS', response.data)
+      }, err => {
+        commit('list/GET_ORDER_FAILURE', err)
+      })
+  },
+  // 获取企业收款账户
+  loadAccount ({ commit }, params = {}) {
+    commit('list/REQUEST_ACCOUNT')
+    return axios.get(`/trade/bankInfo/b2c/enterprise`, {params: params})
+      .then(response => {
+        commit('list/GET_ACCOUNT_SUCCESS', response.data)
+      }, err => {
+        commit('list/GET_ACCOUNT_FAILURE', err)
+      })
+  }
+  // // app获取结算页配送规则
+  // loadPayFareRule ({ commit }, params = {}) {
+  //   commit('list/REQUEST_FARE_RULE')
+  //   return axios.post(`/trade/bill/list/personal?area=${params.area}`, params.storeArr)
+  //     .then(response => {
+  //       commit('list/GET_FARE_RULE_SUCCESS', response.data)
+  //     }, err => {
+  //       commit('list/GET_FARE_RULE_FAILURE', err)
+  //     })
+  // }
+}

+ 95 - 0
store/userCenter/list.js

@@ -0,0 +1,95 @@
+export const state = () => ({
+  // 购物车信息
+  cart: {
+    fetching: false,
+    data: []
+  },
+  // 结算页信息
+  pay: {
+    fetching: false,
+    data: []
+  },
+  // 收货地址
+  address: {
+    fetching: false,
+    data: []
+  },
+  // 发票
+  invoice: {
+    fetching: false,
+    data: []
+  },
+  // 订单
+  order: {
+    fetching: false,
+    data: []
+  },
+  // 账户
+  account: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_CART (state) {
+    state.cart.fetching = true
+  },
+  GET_CART_FAILURE (state) {
+    state.cart.fetching = false
+  },
+  GET_CART_SUCCESS (state, result) {
+    state.cart.fetching = false
+    state.cart.data = result
+  },
+  REQUEST_PAY (state) {
+    state.pay.fetching = true
+  },
+  GET_PAY_FAILURE (state) {
+    state.pay.fetching = false
+  },
+  GET_PAY_SUCCESS (state, result) {
+    state.pay.fetching = false
+    state.pay.data = result
+  },
+  REQUEST_ADDRESS (state) {
+    state.address.fetching = true
+  },
+  GET_ADDRESS_FAILURE (state) {
+    state.address.fetching = false
+  },
+  GET_ADDRESS_SUCCESS (state, result) {
+    state.address.fetching = false
+    state.address.data = result
+  },
+  REQUEST_INVOICE (state) {
+    state.invoice.fetching = true
+  },
+  GET_INVOICE_FAILURE (state) {
+    state.invoice.fetching = false
+  },
+  GET_INVOICE_SUCCESS (state, result) {
+    state.invoice.fetching = false
+    state.invoice.data = result
+  },
+  REQUEST_ORDER (state) {
+    state.order.fetching = true
+  },
+  GET_ORDER_FAILURE (state) {
+    state.order.fetching = false
+  },
+  GET_ORDER_SUCCESS (state, result) {
+    state.order.fetching = false
+    state.order.data = result
+  },
+  REQUEST_ACCOUNT (state) {
+    state.account.fetching = true
+  },
+  GET_ACCOUNT_FAILURE (state) {
+    state.account.fetching = false
+  },
+  GET_ACCOUNT_SUCCESS (state, result) {
+    state.account.fetching = false
+    state.account.data = result
+  }
+}

+ 65 - 1
utils/baseUtils.js

@@ -347,6 +347,11 @@ const _filterStringEllipsis = (str, len) => {
   return str ? _getRealLen(str) > len ? _cutOutString(str, len) + '...' : str : null
 }
 
+/*
+* @$this 上下文
+* @str 提示信息
+* @isMobile 是否移动端
+* */
 const _setMessage = ($this, str = '系统错误', isMobile) => {
   if (isMobile) {
     $this.setRemindText(str)
@@ -355,6 +360,12 @@ const _setMessage = ($this, str = '系统错误', isMobile) => {
   }
 }
 
+/*
+* @$this 上下文
+* @url 权限链接
+* @callBack 回调
+* @isMobile 是否移动端
+* */
 const _getAuthority = ($this, url, callBack, isMobile) => {
   return $this.$http.get('/user/authentication/isauthority', {params: {resUrl: url}}).then(res => {
     if (res.data.status === 'fail') {
@@ -368,6 +379,51 @@ const _getAuthority = ($this, url, callBack, isMobile) => {
   })
 }
 
+// 店铺类型筛选
+const _storeTypeFilter = (type) => {
+  let tmp = ''
+  switch (type) {
+    case 'CONSIGNMENT':
+      tmp = '寄售'
+      break
+    case 'DISTRIBUTION':
+      tmp = '经销'
+      break
+    case 'AGENCY':
+      tmp = '代理'
+      break
+    case 'ORIGIN_FACTORY':
+      tmp = '原厂'
+      break
+  }
+  return tmp
+}
+
+const _getPriceByLevel = (prices, number, currency) => {
+  let prName = currency === 'RMB' ? 'rMBPrice' : 'uSDPrice'
+  for (let i = 0; i < prices.length; i++) {
+    if (number >= prices[i].start && number <= prices[i].end) {
+      return prices[i][prName]
+    }
+  }
+}
+
+const _exchangeArr = (arr, x, y) => {
+  let tmp = arr[x]
+  arr[x] = arr[y]
+  arr[y] = tmp
+}
+
+const _filterDate = (timeStamp, type) => {
+  if (type === 'day') {
+    return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
+  } else if (type === 'hour') {
+    return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
+  } else if (type === 'minute') {
+    return Math.floor((timeStamp / (1000 * 60)) % 60)
+  }
+}
+
 export default {
   // 获取字符串字符长度
   getRealLen: _getRealLen,
@@ -395,5 +451,13 @@ export default {
   // 截取字符长度并补充省略号
   filterStringEllipsis: _filterStringEllipsis,
   // 获取url权限
-  getAuthority: _getAuthority
+  getAuthority: _getAuthority,
+  // 获得店铺类型中文名
+  storeTypeFilter: _storeTypeFilter,
+  // 通过分段数量获取分段价格
+  getPriceByLevel: _getPriceByLevel,
+  // 交换数组元素位置
+  exchangeArr: _exchangeArr,
+  // 根据时间戳提取天数、时、分
+  filterDate: _filterDate
 }