Browse Source

搜索框选项弹出调整,首页器件列表导航显示调整

yangc 8 years ago
parent
commit
31c723e328

+ 5 - 2
components/common/page/pageComponent.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="float: right;">
+  <div style="float: right; margin: 30px 0;">
     <el-pagination
       :current-page.sync="current"
       :page-size="pageSize"
@@ -31,6 +31,9 @@
     cursor: pointer;
     transition: color .2s ease;
   }
+  .el-pagination .btn-next, .el-pagination .btn-prev {
+    color: #337ab7;
+  }
   .el-pager li{
     color: #337ab7;
     text-decoration: none;
@@ -38,7 +41,7 @@
     border: 1px solid #ddd;
     font-size: 10px;
   }
-  .el-pager li:not(.active):hover {
+  .el-pager li:not(.active):hover, .el-pagination button:hover {
     z-index: 3;
     color: #23527c;
     background-color: #eee;

+ 1 - 1
components/home/Nav.vue

@@ -19,7 +19,7 @@
       <nuxt-link to="/product/original" class="item">
         <span>热卖推荐</span>
       </nuxt-link>
-      <nuxt-link to="/product" class="item">
+      <nuxt-link to="/product" class="item" target="_blank">
         <span>库存寄售</span>
       </nuxt-link>
       <nuxt-link to="/news" class="item">

+ 9 - 1
components/home/floor/FloorBar.vue

@@ -30,9 +30,17 @@
         let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
         let floors = document.querySelectorAll('.floor')
         let barOffset = document.querySelector('.floor-bar').offsetTop
-        let barOffset2 = 0
+    /*    let barOffset2 = 0
         this.visible = (barOffset >= floors[0].offsetTop - scrolled &&
           barOffset2 <= floors[floors.length - 1].offsetTop - scrolled + floors[floors.length - 1].clientHeight)
+        if (this.visible) {
+          for (let i = 0; i < floors.length; i++) {
+            if (barOffset >= floors[i].offsetTop - scrolled + 60) {
+              this.activeFloor = i
+            }
+          }
+        } */
+        this.visible = scrolled >= floors[0].offsetTop - 285 && scrolled <= floors[floors.length - 1].offsetTop
         if (this.visible) {
           for (let i = 0; i < floors.length; i++) {
             if (barOffset >= floors[i].offsetTop - scrolled + 60) {

+ 1 - 1
components/main/Nav.vue

@@ -19,7 +19,7 @@
       <nuxt-link to="/product/original" class="item">
         <span>热卖推荐</span>
       </nuxt-link>
-      <nuxt-link :to="{ name: 'store-uuid', params: { uuid: '33069557578d44e69bd91ad12d28a8d4' } }" class="item">
+      <nuxt-link target="_blank" :to="{ name: 'store-uuid', params: { uuid: '33069557578d44e69bd91ad12d28a8d4' } }" class="item">
         <span>库存寄售</span>
       </nuxt-link>
       <nuxt-link to="/news" class="item">

+ 8 - 2
components/main/Search.vue

@@ -39,7 +39,8 @@
           focus: false,
           show: false,
           activeIndex: null
-        }
+        },
+        click_flag: false
       }
     },
     computed: {
@@ -59,7 +60,7 @@
             url: 'product/component/1100400300009990'
           }, {
             name: '电池组',
-            url: 'product/kinds/346'
+            url: 'product/kind/346'
           }, {
             name: 'Vishay',
             url: 'product/brand/30327265e42a871be050007f01003d96'
@@ -112,6 +113,10 @@
         } else {
           this.searchKeywords()
         }
+        if (this.click_flag) {
+          this.associate.show = false
+          this.click_flag = false
+        }
       },
       searchKeywords () {
         this.associate.show = true
@@ -125,6 +130,7 @@
         }
       },
       onAssociateClick (word) {
+        this.click_flag = true
         this.keyword = word
         this.onSearch()
       }

+ 9 - 8
components/search/GoodList.vue

@@ -71,7 +71,7 @@
             </td>
             <td>
               <div>
-                <nuxt-link :to="`/product/kind/${item.kindid}`" v-text="item.storeName">
+                <nuxt-link :to="'/store/' + item.storeId" v-text="item.storeName">
                 </nuxt-link>
                 <span v-if="!item.storeName">—</span>
               </div>
@@ -229,15 +229,13 @@
       clear_price: function () {
         this.min_price = ''
         this.max_price = ''
-        delete this.filter.goods_minpricermb
-        delete this.filter.goods_maxpricermb
         this.$emit('filterPriceEvent', this.filter)
       }
     }
   }
 </script>
 <style scoped>
-  .tab-filter {
+/*  .tab-filter {
     width: 1190px;
     height: 40px;
     margin: 0 auto;
@@ -285,7 +283,7 @@
   }
   .price-filter {
     position: relative;
-  }
+  }*/
   .price-filter .price-input {
     position: relative;
     z-index: 10;
@@ -346,7 +344,7 @@
     display: inline-block;
     padding: 0;
   }
-  .tab-filter .fr .off {
+ /* .tab-filter .fr .off {
     margin-left: 130px;
     float: right;
   }
@@ -358,7 +356,7 @@
   }
   .tab-filter .fr .off a i {
     font-size: 16px;
-  }
+  }*/
   .product-list{
     width: 1190px;
     /*margin-bottom: 20px;*/
@@ -373,7 +371,9 @@
     font-size: 14px;
     text-align: center;
   }
-
+  .product-list .brand-code .brand{
+  font-size: 12px;
+  }
   .product-list .brand-code .code {
     font-weight: 600;
   }
@@ -638,4 +638,5 @@
   tbody a:hover{
     color: #f39801;
   }
+
 </style>

+ 3 - 2
components/search/Kind.vue

@@ -440,9 +440,10 @@
         } else if (name === 'crname') {
           this.list_crname.concat(this.crname_arr)
           this.crname_arr = []
+          this.crname_click_flag.rmb_click_flag = false
+          this.crname_click_flag.usd_click_flag = false
+          this.$emit('crnameFlagEvent', this.crname_click_flag)
           this.$emit('crnameFilterEvent', this.crname_arr)
-          this.rmb_click_flag = false
-          this.usd_click_flag = false
         }
       },
       getIndex: function (arr, obj) {