作者 lyh

gx

... ... @@ -238,14 +238,15 @@ class BaseController extends Controller
* @method :post
* @time :2023/9/13 14:02
*/
public function getIsRenovation($source,$is_list,$template_id,$id){
public function getIsRenovation($source,$is_list,$template_id,$id,$is_custom = 0){
$webTemplateModel = new BTemplate();
$param = [
'source'=>$source,
'project_id'=>$this->user['project_id'],
'source_id'=>$id,
'template_id'=>$template_id,
'is_list'=>$is_list
'is_list'=>$is_list,
'is_custom'=>$is_custom
];
$templateInfo = $webTemplateModel->read($param);
if($templateInfo !== false){
... ...
... ... @@ -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);
}
/**
... ...