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);
}
},
1 个回复
今天回复我了吗 (作者) - uniapp 粉丝条
已解决 谢谢