onLoad(e) {
if(e.type){
this.type=e.type;
}
let pageTitle='贴子';
switch(this.type){
case 'post':
pageTitle='贴子'
break;
case 'topic':
pageTitle='话题'
break;
case 'user':
pageTitle='用户'
break;
}
// #ifdef APP-PLUS
// 修改搜索占位
// 获取当前页面实例
let currentWebView= this.$scope.$getAppWebview();
// 加计时器延时,不加延时的话重复点击其他请求会报错
setTimeout(function() {
// 获取titleNview信息
let tn=currentWebView.getStyle().titleNView;
// 设置搜索框的占位内容并更新
tn.searchInput.placeholder='搜索'+pageTitle;
currentWebView.setStyle({
titleNView:tn
})
}, 10);
// #endif
},
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!