Explorar el Código

修复搜索分享

bding hace 1 año
padre
commit
9a435c84a8

+ 2 - 0
pages-search/components/synthetical.vue

@@ -144,6 +144,8 @@ export default {
           });
         this.newDataList = this.pageNumSynthetical === 1 ? listArr : [...this.newDataList, ...listArr];
         this.haveData = this.newDataList && this.newDataList.length ? true : false;
+        clearInterval(this.$parent.timerOut);
+        this.$store.commit("requestHideLoading");
       }
     },
     // 晨会弹框显示

+ 14 - 11
pages-search/indedxSearch/indedxSearch.vue

@@ -3,16 +3,7 @@
     <view class="container search-container">
       <view class="sticky-content">
         <view class="searchTarget-header">
-          <input
-            type="text"
-            :placeholder="searchPlaceholderList.TabSearch"
-            placeholder-class="sea_ipt_placeholder"
-            class="sea_ipt"
-            v-model="searchTxt"
-            focus="true"
-            confirm-type="search"
-            @confirm="searchHandle"
-          />
+          <input type="text" :placeholder="searchPlaceholderList.TabSearch" placeholder-class="sea_ipt_placeholder" class="sea_ipt" v-model="searchTxt" confirm-type="search" @confirm="searchHandle" />
           <icon type="search" size="15" class="sea_ico" />
           <view class="ipt-right">
             <icon type="clear" size="16" color="#E0E0E0" v-show="searchTxt" @click="clearIpt" />
@@ -61,7 +52,7 @@
       </view>
       <view v-else class="content">
         <block v-if="haveResult">
-          <block v-if="tabsActive === 1">
+          <block v-if="tabsActive == 1">
             <synthetical :searchTxt="searchTxt" :isSyntheticalShow="isSyntheticalShow" :pageNumSynthetical="pageNumSynthetical" />
           </block>
           <view v-else>
@@ -127,6 +118,7 @@ export default {
       },
       isSearchKeyWord: [],
       isSyntheticalShow: false,
+      timerOut: null,
     };
   },
   computed: {
@@ -214,6 +206,9 @@ export default {
         this.isSearchKeyWord.push(this.searchTxt);
         await User.userSearchKeyWordLog({ KeyWord: this.searchTxt });
       }
+      this.timerOut = setInterval(() => {
+        this.$store.commit("requestShowLoading");
+      }, 300);
       if (this.tabsActive == 1) {
         this.isSyntheticalShow = true;
         this.pageNumSynthetical = 1;
@@ -273,6 +268,8 @@ export default {
           res.Data.List.length && this.resultDataList.push(...res.Data.List);
         }
         this.resultList = this.resultDataList;
+        clearInterval(this.timerOut);
+        this.$store.commit("requestHideLoading");
       }
     },
     //活动回放的接口获取列表
@@ -306,6 +303,8 @@ export default {
       } else {
         this.collectList.push(...res.Data.List);
       }
+      clearInterval(this.timerOut);
+      this.$store.commit("requestHideLoading");
     },
     //获取报告的
     async getReportList() {
@@ -324,6 +323,8 @@ export default {
         } else {
           this.haveResultReport = false;
         }
+        clearInterval(this.timerOut);
+        this.$store.commit("requestHideLoading");
       }
     },
     //获取微路演
@@ -347,6 +348,8 @@ export default {
         } else {
           this.roadshowPageList = this.roadshowPageList.concat(res.Data.List);
         }
+        clearInterval(this.timerOut);
+        this.$store.commit("requestHideLoading");
       }
     },
     //点击了更多