ctx.body = await service.get_search_data(start,count,keyword,(err,res)=>{
if(err){
return '找不到数据';
}else {
return res;
}
}
)
回调函数中的res能接受到数据,为何ctx.body接受不到呢?
ctx.body = await service.get_search_data(start,count,keyword,(err,res)=>{
if(err){
return '找不到数据';
}else {
return res;
}
}
)
回调函数中的res能接受到数据,为何ctx.body接受不到呢?