Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx

This commit is contained in:
2020-08-11 16:03:48 +08:00
22 changed files with 287 additions and 148 deletions

View File

@@ -18,11 +18,13 @@ export default {
searchwordlist: [],
}
},
// type: 2 商品 1: 其他
// type: 1 商品 2: 其他
onLoad(option) {
this.type = option.type;
this.getWordList();
this.curent = option.curent || 0
this.getWordList();
if(option.type == 1) this.setNavSearchInput('搜索您需要的商品');
else if(option.type == 2) this.setNavSearchInput('请输入搜索内容');
},
// 点击搜索按钮
onNavigationBarButtonTap(e) {
@@ -37,6 +39,18 @@ export default {
this.search(this.keyword);
},
methods:{
setNavSearchInput(placeholder) {
// #ifdef APP-PLUS
// 修改 placeholder
webview.setStyle({
'titleNView': {
"searchInput": { //修改当前窗口search样式
"placeholder": placeholder,
}
}
})
// #endif
},
getWordList() {
this.$u.api.searchwordlist({type:this.type}).then(res => {
console.log(res)