get_goods_shop_list({
cat_id:this.cat_id,
brand_id:this.bid,
keyword:this.keyword,
warehouse_id:this.warehouse_id,
price_rank:this.price_id,
page:this.page,
size:10
}).then(res=>{
console.log(res,'商品李北奥')
let data = res.data.data
this.shop_data = this.shop_data.concat(data.list)
this.total = res.data.data.total
console.log(this.shop_data,898)
})
上面这段是请求成功 拿到的数据,this.shop_data是我渲染的列表数据,这时候下拉加载更多是没问题的,
但是当我调用了下面这段搜索代码的时候,后端返回的数据已经是搜索结果的数据,但是页面上显示的数据没变化,我感觉是要清空下, 重新获取,但是好像又会影响加载更多的功能,不知道怎么去改,想让大家帮忙看看
search_click(){
console.log(22233)
this.get_shop_list() //这是上面的方法 重新调用了下,里面的keyword已经取到了,
},
搜索时肯定是要清空的
这样应该没问题吧