作者 lyh

gx翻译校队导出

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