作者 lyh

gx翻译校队导出

... ... @@ -58,6 +58,7 @@ class TranslateController extends BaseController
],[
'language_id.required' => 'language_id不能为空',
]);
//上线后放开
// $is_trans_proof = $this->project['deploy_build']['is_trans_proof'] ?? 0;
// if($is_trans_proof == 0){
// $this->response('未开启导出功能。请联系管理员开启。',Code::SYSTEM_ERROR);
... ...
... ... @@ -46,6 +46,7 @@ class CustomTemplateLogic extends BaseLogic
*/
public function customTemplateInfo(){
$info = $this->model->read(['id'=>$this->param['id']]);
$info['image'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']);
if($info === false){
$this->fail('当前数据不存在');
}
... ... @@ -205,6 +206,9 @@ class CustomTemplateLogic extends BaseLogic
* @time :2024/8/6 16:52
*/
public function handleSaveParam(){
if(isset($param['image'])){
$this->param['image'] = str_replace_url($this->param['image'] ?? '');
}
$this->param['url'] = str_replace_url($this->param['url']);
$this->param['operator_id'] = $this->user['id'];
if(empty($this->project)){
... ...
... ... @@ -2,6 +2,7 @@
namespace App\Models\Template;
use App\Helper\Arr;
use App\Models\Base;
class BCustomTemplate extends Base
... ... @@ -14,4 +15,5 @@ class BCustomTemplate extends Base
const STATUS_ACTIVE = 1;
const STATUS_DRAFT = 0;
}
... ...