Browse Source

验收修改。

yangc 8 năm trước cách đây
mục cha
commit
568e025531

+ 8 - 10
components/mobile/Home.vue

@@ -22,7 +22,7 @@
           <div class="home-input">
             <input type="text" placeholder="请输入您要查找的型号、品牌或商家"
                    @click="onHomeSearchClick()"/>
-            <span><i class="iconfont icon-sousuo"></i></span>
+            <i class="iconfont icon-sousuo"></i>
           </div>
           <!--<p style="color:#e45803;line-height:.4rem;margin-top:.1rem;width:4.2rem;margin-left:1rem;">搜品牌、搜现货 、搜好店 、搜规格书 就上优软商城</p>-->
         </div>
@@ -75,7 +75,7 @@
         </a>
       </div>
     </div>
-    <main-search v-else></main-search>
+    <main-search v-else @cancelSearchAction="onCancelSearch"></main-search>
   </div>
 </template>
 
@@ -134,6 +134,9 @@
       },
       loadCounts () {
         this.$store.dispatch('loadProductCounts', { _status: 'actived' })
+      },
+      onCancelSearch: function () {
+        this.showMainSearch = false
       }
     },
     computed: {
@@ -197,19 +200,14 @@
             border:.02rem solid #3c7cf5;
             border-radius:.05rem;
           }
-          span{
+          i{
              display:inline-block;
              text-align: center;
              width:.83rem;
-             font-size:.23rem;
+             font-size:.33rem;
              border-left:none;
-             border-radius:   0 .05rem .05rem 0;
-             background: #3c7cf5;
-             color:#fff;
+             color: #999;
             vertical-align: middle;
-            i{
-              font-size: .33rem;
-            }
           }
         }
       }

+ 21 - 11
components/mobile/MobileHeader.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="mobile-nav">
-    <div class="mobile-modal" v-if="showStoreInfo || showShare">
-      <div class="mobile-modal-box" v-if="showStoreInfo">
+    <div class="mobile-modal" v-if="showStoreInfo || showShare" @click="cancelModal">
+      <div class="mobile-modal-box" v-if="showStoreInfo" @click="stopPropagation($event)">
         <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
         <div class="mobile-modal-content" v-if="showDefaultAddr">
           <div>商家地址:深圳市南山区英唐大厦6楼</div>
@@ -16,7 +16,7 @@
           <div>邮件:<a :href="'mailto:'+store.enterprise.enEmail" class="content-line link-url">{{store.enterprise.enEmail}}</a></div>
         </div>
       </div>
-      <div class="mobile-share-box" v-if="showShare">
+      <div class="mobile-share-box" v-if="showShare" @click="stopPropagation($event)">
         <div class="share-area">
           <ul>
             <li class="share-item" @click="shareWeChat">
@@ -77,7 +77,8 @@
         showDefaultAddr: true,
         url: '',
         clipboard: {},
-        showMainSearch: false
+        showMainSearch: false,
+        title: '优软商城'
       }
     },
     components: {
@@ -86,15 +87,13 @@
     watch: {
       $route: function (val, oldVal) {
         this.showMainSearch = false
+        this.title = this.initHeader(val.path)
       }
     },
     computed: {
       brandDetail () {
         return this.$store.state.brandDetail.detail.data
       },
-      title () {
-        return this.initHeader(this.$route.path)
-      },
       store () {
         return this.$store.state.shop.storeInfo.store.data
       },
@@ -129,6 +128,7 @@
         let title = '优软商城'
         if (val.startsWith('/mobile/brand/componentDetail/')) {
           title = this.component.code
+          this.rightIcon = 'share'
         } else if (val.startsWith('/mobile/brand/brandCenter')) {
           title = '品牌墙'
           this.rightIcon = 'share'
@@ -159,7 +159,7 @@
         } else if (val.startsWith('/mobile/search')) {
           title = '搜索结果'
           this.rightIcon = 'share'
-        } else if (val === '' || val === '/') {
+        } else if (val === '' || val === '/' || !val) {
           title = '优软商城'
           this.rightIcon = 'phone'
         } else {
@@ -226,6 +226,13 @@
       },
       onCancelSearch: function () {
         this.showMainSearch = false
+      },
+      cancelModal: function () {
+        this.showStoreInfo = false
+        this.showShare = false
+      },
+      stopPropagation: function (event) {
+        event.stopPropagation()
       }
     }
   }
@@ -248,7 +255,10 @@
     color:#fff;
   }
   .mobile-header p{
-    flex:1;
+    width: 5.2rem;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
     font-size:.36rem;
     text-align: center;
     margin: 0;
@@ -260,10 +270,10 @@
   .mobile-header p span {
     position: absolute;
     right: .4rem;
-    font-size: .24rem;
+    font-size: .28rem;
   }
   .mobile-header p span i {
-    font-size: .24rem;
+    font-size: .28rem;
   }
   .mobile-nav >i{
     font-size: .4rem;

+ 11 - 3
components/mobile/brand/BrandCenter.vue

@@ -21,6 +21,7 @@
           <div class="brand-items">
             <nuxt-link :to="`/mobile/brand/${brand.uuid}/`" :key="key" v-for="(brand, key) in brands">
               <div>{{brand.nameEn}}</div>
+              <div v-if="brand.nameCn != brand.nameEn">{{brand.nameCn}}</div>
             </nuxt-link>
           </div>
         </div>
@@ -58,6 +59,11 @@
         window.addEventListener('scroll', this.onScroll)
       })
     },
+    watch: {
+      $route: function (val, oldVal) {
+        this.activeIndex = val.params.initial
+      }
+    },
     computed: {
       brandList () {
         let brandsList = this.$store.state.product.brand.brandList.data
@@ -93,11 +99,13 @@
     width: 100%;
     background: #f7f7f7;
     padding-top: .24rem;
+    margin-bottom: .98rem;
     .mobile-brand-wrap {
       width: 6.96rem;
       background: #fff;
       margin: 0 auto;
       padding: 0 .21rem;
+      border-radius: .1rem;
       .mobile-brand-header {
         text-align: center;
         >img {
@@ -171,14 +179,14 @@
             color: #333;
             border-radius: .05rem;
             background: #fff;
-            margin: .19rem .42rem 0 0;
+            margin: .19rem .42rem .32rem 0;
             &:nth-child(3n) {
               margin-right: 0;
             }
             div {
               width: 1.9rem;
-              height: .59rem;
-              line-height: .59rem;
+              height: .39rem;
+              line-height: .39rem;
               text-align: left;
               text-overflow: ellipsis;
               white-space: nowrap;

+ 21 - 4
components/mobile/brand/BrandDetail.vue

@@ -88,9 +88,25 @@
         return str.length > 65 ? str.substring(0, 65) + '...' : str
       }
     },
+    mounted: function () {
+      this.$nextTick(function () {
+        document.addEventListener('click', this.checkShowFilter)
+      })
+    },
     watch: {
       keyword: function (val, oldVal) {
         this.isSearch = true
+      },
+      activeType: function (val, oldVal) {
+        if (val === 'product') {
+          this.pageParams = {
+            page: 1,
+            count: 10,
+            filter: {}
+          }
+          this.keyword = ''
+          this.pageCommodity(this.pageParams)
+        }
       }
     },
     computed: {
@@ -325,17 +341,17 @@
     }
     .brand-product-list {
       font-size: .28rem;
+      background: #fff;
       ul.product-list {
         text-align: center;
-        background: #fff;
         li {
           margin-left: .42rem;
           width: 6.66rem;
           height: .66rem;
           line-height: .66rem;
           border: {
-            top: 1px solid rgb(230,228,228);
-            bottom: 1px solid rgb(230,228,228);
+            top: .01rem solid rgb(230,228,228);
+            bottom: .01rem solid rgb(230,228,228);
           }
           &:nth-child(even) {
             background: #f9f9f9;
@@ -366,6 +382,7 @@
       }
       .search-box {
         margin-bottom: .28rem;
+        padding-top: .28rem;
         .kind-selecter {
           display: inline-block;
           position: relative;
@@ -400,7 +417,7 @@
             display: inline-block;
             width: 3.61rem;
             height: .6rem;
-            border: 1px solid rgb(195,195,195);
+            border: .01rem solid rgb(195,195,195);
             padding-left: .21rem;
             font-size: .24rem;
             float: left;

+ 12 - 7
components/mobile/brand/ComponentDetail.vue

@@ -40,7 +40,7 @@
         </thead>
         <tbody>
           <tr v-for="store in storeList.content">
-            <td class="store-name">{{store.storeName || '-'}}</td>
+            <td class="store-name"><div>{{store.storeName || '-'}}</div></td>
             <td>
               <div v-if="!store.packaging && !store.breakUp && !store.produceDate">-</div>
               <div>{{store.packaging}}</div>
@@ -62,7 +62,6 @@
             </td>
             <td>
               <div v-if="store.b2cMinDelivery">
-                <span>交期:</span>
                 <span>{{store.b2cMinDelivery}}</span>
                 <span v-if="store.b2cMaxDelivery && store.b2cMaxDelivery !== store.b2cMinDelivery">-</span>
                 <span v-if="store.b2cMaxDelivery && store.b2cMaxDelivery !== store.b2cMinDelivery">{{store.b2cMaxDelivery}}</span>
@@ -258,7 +257,7 @@
         height: .6rem;
         line-height: .6rem;
         border-radius: 100%;
-        box-shadow: 0 0 5px #aaa;
+        box-shadow: 0 0 .05rem #aaa;
         right: .28rem;
         top: .55rem;
         text-align: center;
@@ -330,18 +329,24 @@
           }
         }
         tbody {
+          background: #fff;
           tr {
-            border-top: .01rem solid rgb(174,175,176);
+            border-top: 0.2rem solid #f7f7f7;
+            &:first-child {
+              border-top: none;
+            }
             td {
               padding: .2rem .1rem;
               &.store-name {
                 color: #418bf6;
+                div {
+                  padding: 0;
+                  width: 1rem;
+                  overflow: hidden;
+                }
               }
               div {
                 padding-left: .4rem;
-                overflow: hidden;
-                text-overflow: ellipsis;
-                white-space: nowrap;
                 margin-bottom: .2rem;
                 &:last-child {
                   margin-bottom: 0;

+ 1 - 1
components/mobile/search/MainSearch.vue

@@ -87,8 +87,8 @@
         }
       },
       searchKeywords () {
-        this.associate.show = true
         this.$store.dispatch('searchKeywords', { keyword: this.keyword })
+        this.associate.show = true
       },
       onAssociateClick (word) {
         this.keyword = word

+ 7 - 5
components/mobile/store/StoreDetail.vue

@@ -2,7 +2,7 @@
   <div class="store-detail">
     <div class="store-logo">
       <div class="store-logo-box">
-        <img :src="store.logoUrl || '/images/component/default.png'"/>
+        <img :src="'/images/component/default.png'"/>
         <i class="iconfont icon-shoucang" :style="isFocus === 'true'?'color:#ff7800':'color: #ddd'" @click="collectStore"></i>
       </div>
     </div>
@@ -53,7 +53,6 @@
           </td>
           <td>
             <div v-if="commodity.b2cMinDelivery">
-              <span>交期:</span>
               <span>{{commodity.b2cMinDelivery}}</span>
               <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">-</span>
               <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">{{commodity.b2cMaxDelivery}}</span>
@@ -175,8 +174,8 @@
         background: #fff;
         position: relative;
         img {
-          max-height: 2.13rem;
-          max-width: 3.7rem;
+          max-height: 2.19rem;
+          max-width: 3.71rem;
         }
         >i {
           position: absolute;
@@ -243,7 +242,10 @@
         tbody {
           tr {
             background: #fff;
-            border-top: .01rem solid rgb(174,175,176);
+            border-top: 0.2rem solid #f7f7f7;
+            &:first-child {
+              border-top: none;
+            }
             td {
               padding: .2rem .1rem;
               text-align: left;

+ 0 - 55
pages/mobile/merchantDescription/_uuid.vue

@@ -1,55 +0,0 @@
-<template>
-  <div class="merchant-description">
-    <div>
-      <h5>{{description.storeName}}</h5>
-      <p>{{description.description}}</p>
-    </div>
-  </div>
-</template>
-<script>
-  export default {
-    layout: 'main',
-    fetch ({ store, params }) {
-      return Promise.all([
-        store.dispatch('shop/findStoreInfoFromUuid', params)
-      ])
-    },
-    computed: {
-      description () {
-        return this.$store.state.shop.storeInfo.store.data
-      }
-    }
-  }
-</script>
-<style scoped>
-  .merchant-description{
-    width:100%;
-    background: url('/images/mobile/@2x/shop/store-intro-bg.png')no-repeat;
-    background-size: cover;
-    height: -webkit-fill-available;
-    background-position: 0 -.86rem;
-  }
-  .merchant-description div{
-    width:6.5rem;
-    margin:0 auto;
-    padding-top:.75rem;
-    color: #fff;
-  }
-  .merchant-description div h5{
-    text-align: center;
-    font-size: .36rem;
-    margin:0;
-  }
-  .merchant-description div p{
-    font-size:.32rem;
-    line-height: .4rem;
-    margin:0;
-    margin-top: .76rem;
-    color: #333;
-    padding: .35rem .25rem;
-    border-radius: .1rem;
-    background: url('/images/mobile/@2x/shop/store-intro-content-bg.png')no-repeat;
-    background-color: #fff;
-    background-size: cover;
-  }
-</style>

+ 4 - 3
pages/mobile/search/_keycode.vue

@@ -149,7 +149,7 @@
 <style scoped lang="scss">
   .search-list{
       width:100%;
-      margin-bottom: .98rem;
+      padding-bottom: 1rem;
       .none-state{
         text-align: center;
         margin-top:2rem;
@@ -201,8 +201,8 @@
       .brand-list-top{
         span:first-child{
           font-size:.32rem;
-          margin-right:4.78rem;
-          margin-left: .3rem;
+          margin-right:4.98rem;
+          margin-left: .2rem;
         }
         span.row-switch{
           font-size:.28rem;
@@ -297,6 +297,7 @@
         background: #fff;
         padding:.2rem;
         position:relative;
+        box-shadow: 0 0 0 .02rem #ddd;
         &:active{
            background: #e1e1e1;
          }

+ 6 - 2
pages/mobile/shop/index.vue

@@ -202,12 +202,16 @@
       }
       .list-item-phone{
         width:3.95rem;
-        padding-top:.18rem;
+        padding:.18rem 0;
         position:relative;
         p{
           font-size:.28rem;
-          line-height: .45rem;
+          line-height: .67rem;
           margin:0;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          width: 3.2rem;
         }
         i{
           display:block;

+ 28 - 9
pages/mobile/user/index.vue

@@ -13,7 +13,7 @@
         <li @click="onDown('0')" v-show="!isDevice || isShop">器件收藏</li>
       </ul>
     </div>
-    <div class="collect-list-type" v-if="focusPage.content && focusPage.content.length > 0 && isShop">
+    <div class="collect-list-type" v-if="focusPage.totalElements > 0 && isShop">
       <p>店铺</p>
     </div>
     <div class="shop-list" v-if="isShop" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
@@ -30,7 +30,7 @@
         </div>
       </div>
     </div>
-    <div class="collect-list-type" v-if="collectSave.content && collectSave.content.length > 0 && isDevice">
+    <div class="collect-list-type" v-if="collectSave.totalElements > 0 && isDevice">
       <p>器件</p>
     </div>
     <div class="detail-brand" v-for="(item, index) in collectSave.content" v-if="isDevice">
@@ -43,8 +43,9 @@
         </div>
       </nuxt-link>
     </div>
-    <div class="none-state" v-if="!(collectSave.content&&collectSave.content.length>0 || focusPage.content&&focusPage.content.length > 0)">
-      <img src="/images/mobile/@2x/shoucangkongzhuangtai@2x.png">
+    <div class="none-state" v-if="(collectSave.totalElements == 0 && !isShop) || (focusPage.totalElements == 0 && !isDevice) || (collectSave.totalElements == 0 && focusPage.totalElements == 0)">
+      <img src="/images/mobile/@2x/empty-collect.png">
+      <p v-text="getRemindText()"></p>
       <nuxt-link to="/">返回首页</nuxt-link>
     </div>
   </div>
@@ -67,9 +68,9 @@
     },
     fetch ({ store }) {
       return Promise.all([
-        store.dispatch('product/saveStores', { count: 25, page: 1, type: 'component' }),
+        store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
         store.dispatch('loadUserInfo'),
-        store.dispatch('shop/StoreFocusPage', { count: 5, page: 1 })
+        store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 })
       ])
     },
     methods: {
@@ -124,6 +125,15 @@
       },
       goStoreDetail: function (uuid) {
         this.$router.push('/mobile/shop/' + uuid)
+      },
+      getRemindText: function () {
+        if (this.isDevice && !this.isShop) {
+          return '抱歉,暂无器件收藏'
+        } else if (!this.isDevice && this.isShop) {
+          return '抱歉,暂无店铺关注'
+        } else {
+          return '抱歉,暂无收藏记录'
+        }
       }
     },
     computed: {
@@ -162,7 +172,12 @@
       img{
         margin:0 auto;
         width: 4.08rem;
-        height: 4.13rem;
+        height: 2.62rem;
+      }
+      p {
+        font-size: .32rem;
+        color: #999;
+        margin: 1.19rem 0 0 0;
       }
       a {
         display: block;
@@ -264,12 +279,16 @@
         }
         .list-item-phone{
           width:3.95rem;
-          padding-top:.18rem;
+          padding:.18rem 0;
           position:relative;
           p{
             font-size:.28rem;
-            line-height: .45rem;
+            line-height: .67rem;
             margin:0;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            width: 3.2rem;
           }
           i{
             display:block;

BIN
static/images/mobile/@2x/empty-collect.png


BIN
static/images/mobile/@2x/shop/store-intro-bg.png


BIN
static/images/mobile/@2x/shop/store-intro-content-bg.png