respText('没有找到结果, 要不过一会再试试?'); } $num = $obj['result']['result']['num']; $data = $obj['result']['result']['list']; $sum = 0; for($i = 0; $i < $num; $i++) { if (empty($data[$i]['pic']) || $sum >= 8) { continue; } $news[] = array( 'title' => strval($data[$i]['title']), 'picurl' => strval($data[$i]['pic']), 'url' => strval($data[$i]['url']) ); $sum++; } return $this->respNews($news); } return $this->respText('没有找到结果, 要不过一会再试试?');