正在显示
1 个修改的文件
包含
7 行增加
和
5 行删除
| @@ -30,11 +30,13 @@ class ProofreadingController extends BaseController | @@ -30,11 +30,13 @@ class ProofreadingController extends BaseController | ||
| 30 | $new_list = $this->getUrlRead($this->param['url']); | 30 | $new_list = $this->getUrlRead($this->param['url']); |
| 31 | if(empty($list)){ | 31 | if(empty($list)){ |
| 32 | $data = []; | 32 | $data = []; |
| 33 | - foreach ($new_list as $v){ | ||
| 34 | - $data[] = [ | ||
| 35 | - 'text'=>$v, | ||
| 36 | - 'translate'=>Translate::tran($v, $countryInfo['alias']), | ||
| 37 | - ]; | 33 | + foreach ($new_list as $k => $v){ |
| 34 | + if($k < 5){ | ||
| 35 | + $data[] = [ | ||
| 36 | + 'text'=>$v, | ||
| 37 | + 'translate'=>Translate::tran($v, $countryInfo['alias']), | ||
| 38 | + ]; | ||
| 39 | + } | ||
| 38 | } | 40 | } |
| 39 | return $this->response('success',Code::SUCCESS,$data); | 41 | return $this->response('success',Code::SUCCESS,$data); |
| 40 | } | 42 | } |
-
请 注册 或 登录 后发表评论