Просмотр исходного кода

1.手机端搜索,仅看有货分页问题。2.新增寄售店铺类型。3.品牌logo溢出问题。4.品牌中心滚动事件无效问题

yangc 8 лет назад
Родитель
Сommit
2c5e6d8a04

+ 1 - 1
components/mobile/Home.vue

@@ -6,7 +6,7 @@
         <div class="mobile-modal-content">
           <div>商家地址:深圳市南山区英唐大厦6楼</div>
          <!-- <div class="content-line link-url">在线咨询</div>-->
-          <div>致电:<a href="tel:0755-96586323" target="_blank" class="content-line link-url">0755-96586323</a></div>
+          <div>致电:<a href="tel:4008301818" target="_blank" class="content-line link-url">4008301818</a></div>
           <div>邮件:<a href="mailto:yrsc@usoftchina.com" target="_blank" class="content-line link-url">yrsc@usoftchina.com</a></div>
         </div>
       </div>

+ 6 - 6
components/mobile/brand/BrandCenter.vue

@@ -55,8 +55,11 @@
       }
     },
     mounted: function () {
-      this.$nextTick(function () {
-        window.addEventListener('scroll', this.onScroll)
+      let _this = this
+      _this.$nextTick(function () {
+        window.addEventListener('scroll', function () {
+          _this.onScroll()
+        }, false)
       })
     },
     watch: {
@@ -100,10 +103,7 @@
 </script>
 <style lang="scss" scoped>
   .mobile-brand-center {
-    position: fixed;
-    top: .88rem;
-    bottom: .98rem;
-    overflow-y: auto;
+    margin-bottom: .98rem;
     width: 100%;
     background: #f7f7f7;
     padding-top: .24rem;

+ 1 - 1
components/mobile/brand/BrandDetail.vue

@@ -333,7 +333,7 @@
         position: relative;
         img {
           max-height: 2.13rem;
-          max-width: 3.7rem;
+          max-width: 3.63rem;
         }
       }
     }

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

@@ -69,7 +69,8 @@
         timeoutCount: 0,
         searchLists: [],
         isSearchSearchingMore: false,
-        showLoginBox: false
+        showLoginBox: false,
+        isChange: false
       }
     },
     components: {
@@ -99,8 +100,14 @@
     computed: {
       productList () {
         let list = this.$store.state.searchData.searchList.lists.data
-        this.searchLists = this.searchLists.concat(list.components)
-        this.isSearchSearchingMore = false
+        if (this.isChange) {
+          this.searchLists = []
+          this.page = 1
+          this.isChange = false
+        } else {
+          this.searchLists = this.searchLists.concat(list.components)
+          this.isSearchSearchingMore = false
+        }
         return list
       },
       allPage () {
@@ -129,6 +136,7 @@
       },
       clickType (type) {
 //        this.searchLists = []
+        this.isChange = true
         if (type === 'store') {
           this.activeType = 'store'
           this.$store.dispatch('searchData/searchForListInMobile', {count: 15, filter: {}, keyword: this.$route.query.w, page: 1, sorting: {}})
@@ -178,7 +186,6 @@
       },
       scroll: function () {
         let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
-        console.log(Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight)
         if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
           this.getMoreSearch()
         }

+ 12 - 10
pages/mobile/shop/index.vue

@@ -8,6 +8,7 @@
         <li @click="onDown('ORIGINAL_FACTORY')" v-show="downName !== '原厂'">原厂</li>
         <li @click="onDown('AGENCY')" v-show="downName !== '代理'">代理</li>
         <li @click="onDown('DISTRIBUTION')" v-show="downName !== '经销'">经销</li>
+        <li @click="onDown('CONSIGNMENT')" v-show="downName !== '寄售'">寄售</li>
       </ul>
     </div>
     <div class="shop-list" v-for="item in searchLists" @click="goStoreDetail(item.uuid)" v-if="item">
@@ -72,7 +73,7 @@
     },
     fetch ({ store }) {
       return Promise.all([
-        store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, types: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY' })
+        store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, types: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT' })
       ])
     },
     computed: {
@@ -120,13 +121,13 @@
       isType (type) {
         let bgurl = ''
         if (type === 'ORIGINAL_FACTORY') {
-          bgurl = '/images/mobile/@2x/shop/yuanchang@2x.png'
-        }
-        if (type === 'DISTRIBUTION') {
-          bgurl = '/images/mobile/@2x/shop/jingxiao@2x.png'
-        }
-        if (type === 'AGENCY') {
-          bgurl = '/images/mobile/@2x/shop/daili@2x.png'
+          bgurl = '/images/mobile/@2x/shop/original_factory.png'
+        } else if (type === 'DISTRIBUTION') {
+          bgurl = '/images/mobile/@2x/shop/distribution.png'
+        } else if (type === 'AGENCY') {
+          bgurl = '/images/mobile/@2x/shop/agency.png'
+        } else if (type === 'CONSIGNMENT') {
+          bgurl = '/images/mobile/@2x/shop/consignment.png'
         }
         return bgurl
       },
@@ -143,7 +144,9 @@
           this.downName = '经销'
         } else if (type === 'AGENCY') {
           this.downName = '代理'
-        } else if (type === 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY') {
+        } else if (type === 'CONSIGNMENT') {
+          this.downName = '寄售'
+        } else if (type === 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT') {
           this.downName = '全部'
         }
         this.$store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, types: type })
@@ -189,7 +192,6 @@
 <style scoped lang="scss">
   .shop{
     margin-bottom: .98rem;
-    min-height: 10rem;
     background: #e2e4e6;
     .shop-top{
       width:100%;

+ 5 - 3
pages/mobile/user/index.vue

@@ -137,11 +137,13 @@
       getBackground: function (type) {
         let url = ''
         if (type === 'AGENCY') {
-          url += '/images/mobile/@2x/shop/daili@2x.png'
+          url += '/images/mobile/@2x/shop/agency.png'
         } else if (type === 'DISTRIBUTION') {
-          url += '/images/mobile/@2x/shop/jingxiao@2x.png'
+          url += '/images/mobile/@2x/shop/distribution.png'
         } else if (type === 'ORIGINAL_FACTORY') {
-          url += '/images/mobile/@2x/shop/yuanchang@2x.png'
+          url += '/images/mobile/@2x/shop/original_factory.png'
+        } else if (type === 'CONSIGNMENT') {
+          url = '/images/mobile/@2x/shop/consignment.png'
         }
         return url
       },

+ 0 - 0
static/images/mobile/@2x/shop/daili@2x.png → static/images/mobile/@2x/shop/agency.png


BIN
static/images/mobile/@2x/shop/consignment.png


+ 0 - 0
static/images/mobile/@2x/shop/jingxiao@2x.png → static/images/mobile/@2x/shop/distribution.png


+ 0 - 0
static/images/mobile/@2x/shop/yuanchang@2x.png → static/images/mobile/@2x/shop/original_factory.png