Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
19 行增加
和
6 行删除
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Http\Logic\Aside\Project; | 3 | namespace App\Http\Logic\Aside\Project; |
| 4 | 4 | ||
| 5 | +use App\Console\Commands\Languages; | ||
| 5 | use App\Enums\Common\Code; | 6 | use App\Enums\Common\Code; |
| 6 | use App\Events\CopyImageFile; | 7 | use App\Events\CopyImageFile; |
| 7 | use App\Events\CopyProject; | 8 | use App\Events\CopyProject; |
| @@ -19,6 +20,7 @@ use App\Models\Project\WebTrafficConfig; | @@ -19,6 +20,7 @@ use App\Models\Project\WebTrafficConfig; | ||
| 19 | use App\Models\Template\Setting; | 20 | use App\Models\Template\Setting; |
| 20 | use App\Models\User\ProjectMenu; | 21 | use App\Models\User\ProjectMenu; |
| 21 | use App\Models\User\ProjectRole; | 22 | use App\Models\User\ProjectRole; |
| 23 | +use App\Models\WebSetting\WebLanguage; | ||
| 22 | use App\Services\SyncService; | 24 | use App\Services\SyncService; |
| 23 | use App\Utils\HttpUtils; | 25 | use App\Utils\HttpUtils; |
| 24 | use App\Utils\LogUtils; | 26 | use App\Utils\LogUtils; |
| @@ -156,7 +158,7 @@ class ProjectLogic extends BaseLogic | @@ -156,7 +158,7 @@ class ProjectLogic extends BaseLogic | ||
| 156 | $this->saveProjectDeployOptimize($this->param['deploy_optimize']); | 158 | $this->saveProjectDeployOptimize($this->param['deploy_optimize']); |
| 157 | //保存售后信息 | 159 | //保存售后信息 |
| 158 | $this->saveProjectAfter($this->param['project_after']); | 160 | $this->saveProjectAfter($this->param['project_after']); |
| 159 | - $this->saveMinorLanguages($this->param['minor_language'] ?? []); | 161 | + $this->saveMinorLanguages($this->param['deploy_optimize']['minor_languages'] ?? []); |
| 160 | $this->syncImageFile($this->param['project_location'],$this->param['id']); | 162 | $this->syncImageFile($this->param['project_location'],$this->param['id']); |
| 161 | (new SyncService())->projectAcceptAddress($this->param['id']); | 163 | (new SyncService())->projectAcceptAddress($this->param['id']); |
| 162 | } | 164 | } |
| @@ -327,12 +329,23 @@ class ProjectLogic extends BaseLogic | @@ -327,12 +329,23 @@ class ProjectLogic extends BaseLogic | ||
| 327 | $languageModel = new MinorLanguages(); | 329 | $languageModel = new MinorLanguages(); |
| 328 | $languageModel->del(['project_id'=>$this->param['id']]); | 330 | $languageModel->del(['project_id'=>$this->param['id']]); |
| 329 | if(!empty($minor_language)){ | 331 | if(!empty($minor_language)){ |
| 332 | + $webLanguageModel = new WebLanguage(); | ||
| 333 | + $result = []; | ||
| 330 | foreach ($minor_language as $k => $v){ | 334 | foreach ($minor_language as $k => $v){ |
| 331 | - if(!empty($v['language'])){ | ||
| 332 | - $v['created_at'] = date('Y-m-d H:i:s'); | ||
| 333 | - $v['updated_at'] = date('Y-m-d H:i:s'); | ||
| 334 | - $v['project_id'] = $this->param['id']; | ||
| 335 | - $data[] = $v; | 335 | + if(!empty($v['lang'])){ |
| 336 | + $zh = $webLanguageModel->read(['short'=>$v['lang']],['chinese']); | ||
| 337 | + if(empty($zh)){ | ||
| 338 | + continue; | ||
| 339 | + } | ||
| 340 | + $result['language'] = $zh['chinese']; | ||
| 341 | + $result['lang'] = $v['lang']; | ||
| 342 | + $result['created_at'] = date('Y-m-d H:i:s'); | ||
| 343 | + $result['updated_at'] = date('Y-m-d H:i:s'); | ||
| 344 | + $result['project_id'] = $this->param['id']; | ||
| 345 | + $result['service_day'] = $v['service_day']; | ||
| 346 | + $result['type'] = $v['type']; | ||
| 347 | + $result['keywords'] = $v['keywords']; | ||
| 348 | + $data[] = $result; | ||
| 336 | } | 349 | } |
| 337 | } | 350 | } |
| 338 | if(!empty($data)){ | 351 | if(!empty($data)){ |
-
请 注册 或 登录 后发表评论