{
if(res.data.status!=0){
this.error=res.data.message
}else{
this.hideModal();
$dispatch('alert-msg',{type:'success',msg:'收藏成功'})
}
})
},
query({keyword}){
this.loading=true;
this.error=null;
axios.get('/collect/self_collects?pageSize=40&keyword='+keyword).then(res=>{
this.loading=false;
if(res.data.status==402){
location.href='/index/sign-in'
return
}
if(res.data.list){
this.list = res.data.list
}
})
},
addCollect(keyword){
this.error=null;
axios.post('/collect/add_collect',{keyword}).then(res=>{
if(res.data.status!=0){
this.error=res.data.message;
return
}
this.query({keyword:''})
})
}
}" x-init="$watch('keyword',keyword=> query({keyword})); " x-on:opencollect.window="openCollect($event)">
收藏集合
默认只显示40条,更多请搜索...