作者 lyh

gx

... ... @@ -29,9 +29,7 @@ class ProofreadingController extends BaseController
if(empty($list)){
//获取当前URl的所有文本内容
$new_list = $this->getUrlRead($this->param['url']);
$str = implode('__',$new_list);
var_dump($str);
die();
$str = implode('|',$new_list);
//翻译
$translate_str = Translate::tran($str, $countryInfo['alias']);
$arr = explode('__',$translate_str);
... ... @@ -125,6 +123,7 @@ class ProofreadingController extends BaseController
$matches = array();
preg_match_all($pattern, $strippedContent, $matches);
$textContentArray = array_filter($matches[1], function($item) {
$item = str_replace("\n", "", $item);
return !empty(trim($item));
});
$textContentArray = array_values($textContentArray);
... ...