店铺搜索

This commit is contained in:
2020-08-15 19:04:18 +08:00
parent 94dc78555a
commit 33e8942180
4 changed files with 20 additions and 5 deletions

View File

@@ -42,7 +42,8 @@ export default {
scrollTop: 0,
old: {
scrollTop: 0
}
},
sid:''
}
},
watch: {
@@ -57,6 +58,7 @@ export default {
},
onLoad(option) {
this.value = option.value
this.sid = option.sid
this.setViewHeight();
this.ShopSearch()
this.setNavSearchInput(this.value);
@@ -106,11 +108,14 @@ export default {
// 排序方式 goods_salenum销量 evaluation_count评价 goods_price_asc价格从低到高 goods_price_desc价格从高到低
async ShopSearch({ load = 'reload' } = {}) {
console.log(this.value);
console.log(this.sid)
const sort = this.setOrderSort();
const res = await this.$u.api.ShopSearch({
keyword: this.value,
page: this.page,
order: sort,
sid:this.sid
})
this.timer = true;
if(res.errCode == 0) {