瀏覽代碼

仅看有货问题

yangc 8 年之前
父節點
當前提交
d1503b526c
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. 8 4
      pages/mobile/search/_keycode.vue

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

@@ -96,8 +96,12 @@
     computed: {
       productList () {
         let list = this.$store.state.searchData.searchList.lists.data
-        this.searchLists = this.searchLists.concat(list.components)
-        this.isSearchingMore = false
+        if (this.isSearchingMore) {
+          this.searchLists = this.searchLists.concat(list.components)
+          this.isSearchingMore = false
+        } else {
+          this.searchLists = list.components
+        }
         return list
       },
       allPage () {
@@ -122,11 +126,11 @@
         this.isShow = !this.isShow
       },
       clickType (type) {
+//        this.searchLists = []
         if (type === 'store') {
           this.activeType = 'store'
           this.$store.dispatch('searchData/searchForListInMobile', {count: 15, filter: {}, keyword: this.$route.query.w, page: 1, sorting: {'GO_RESERVE': 'DESC', 'GO_SEARCH': 'DESC'}})
-        }
-        if (type === 'support') {
+        } else if (type === 'support') {
           this.activeType = 'support'
           this.$store.dispatch('searchData/searchForListInMobile', {count: 15, filter: {'goods_status': 601}, keyword: this.$route.query.w, page: 1, sorting: {'GO_RESERVE': 'DESC', 'GO_SEARCH': 'DESC'}})
         }