|
...
|
...
|
@@ -100,7 +100,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @remark :获取语种信息
|
|
...
|
...
|
@@ -160,15 +160,16 @@ class TranslateLogic extends BaseLogic |
|
|
|
/**
|
|
|
|
* 翻译校对 dom
|
|
|
|
*/
|
|
|
|
public function proofreadPhpQuery()
|
|
|
|
public function proofreadPhpQuery($url)
|
|
|
|
{
|
|
|
|
$html = file_get_contents(storage_path('logs/proofread.html'));
|
|
|
|
$dom = phpQuery::newDocument($html);
|
|
|
|
$html = file_get_contents($url);
|
|
|
|
$dom = \phpQuery::newDocument($html);
|
|
|
|
$dom->find('.change-language')->remove();
|
|
|
|
$dom->find('script')->remove();
|
|
|
|
$dom->find('style')->remove();
|
|
|
|
$test = $dom->text();
|
|
|
|
file_put_contents(storage_path('logs/proofreadPhpQuery.html'), $test);
|
|
|
|
dd('end');
|
|
|
|
file_put_contents($url, $test);
|
|
|
|
$this->success($test);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|