今天回复我了吗
今天回复我了吗
  • 发布:2019-08-23 10:05
  • 更新:2019-08-23 11:24
  • 阅读:974

安卓端在监听原生标题栏搜索输入框输入内容变化事件时无限请求

分类:uni-app
  onNavigationBarSearchInputChanged: _debounce(function (e) {  
  return;  
    console.log(JSON.stringify(e));  

    let text = e.text;  
    if (!text) {  
      return;  
    } else {  
      this.isSearch = true;  

             this.getSearchListInfo(text);  

    }  

  }, 800),
    async getSearchListInfo(e) {  
      console.log(e);  
      console.log("wodetian");  

      // #ifdef APP-PLUS  

      let pages = getCurrentPages();  
      // console.log(JSON.stringify(pages));  
      let page = pages[pages.length - 1];  
      let currentWebview = page.$getAppWebview();  
      let titleObj = currentWebview.getStyle().titleNView;  
      console.log(JSON.stringify(titleObj));  
      currentWebview.setTitleNViewSearchInputText(e)  

      currentWebview.setStyle({  
        titleNView: titleObj  
      });  
      // #endif  
      this.isSearch = true;  

      let data = {  
        keyWord: e,  
        pageNo: 1,  
        pageSize: 3  
      };  
      //  console.log();  
      let res = await post(URL.HomePageSearchController.homePageSearch, data);  
      if (res.code == 200) {  

        this.searchList.ad = res.data.ad.list;  

        this.searchList.article = res.data.article.list;  

        this.searchList.friend = res.data.friend.list;  
        this.searchList.order = res.data.order;  

        console.log(this.searchList);  
      }  

    },
2019-08-23 10:05 负责人:无 分享
已邀请:
今天回复我了吗

今天回复我了吗 (作者) - uniapp 粉丝条

已解决 谢谢

该问题目前已经被锁定, 无法添加新回复