搜索完成

This commit is contained in:
2020-08-09 18:29:36 +08:00
parent d00b4a75ac
commit b9b9a8e829
7 changed files with 304 additions and 75 deletions

View File

@@ -21,7 +21,7 @@ export default {
// type: 2 商品 1: 其他
onLoad(option) {
this.type = option.type;
if(option.type == 2) this.getWordList();
this.getWordList();
},
// 点击搜索按钮
onNavigationBarButtonTap(e) {
@@ -37,8 +37,10 @@ export default {
},
methods:{
getWordList() {
this.$u.api.searchwordlist().then(res => {
this.searchwordlist = res.data;
this.$u.api.searchwordlist({type:this.type}).then(res => {
console.log(res)
this.searchwordlist = res.data;
})
},
search(value){
@@ -52,14 +54,17 @@ export default {
type: this.type,
}
if(this.type == 2) {
Object.assign(params, {
order: 'goods_salenum'
})
}
this.$u.route({
url: "/pageB/search/out",
params: params,
})
this.$u.route({
url: "/pageB/search/out",
params: params,
})
}else{
this.$u.route({
url: "/pageB/search/searchGoods",
params: params,
})
}
}
}
}