ProjectCountryLogic.php
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace App\Http\Logic\Bside\Setting;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\Project\Country as CountryModel;
class ProjectCountryLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new CountryModel();
$this->param = $this->requestAll;
}
/**
* @name :(获取当前项目关联的多语言)get_country_info
* @author :lyh
* @method :post
* @time :2023/4/28 17:03
*/
public function country_info(){
$lists = $this->model->read(['project_id'=>$this->user['project_id']]);
if (empty($lists)){
$this->fail('当前数据不存在');
}
return $this->success($lists);
}
/**
* @name :(更新多语言设置)country_edit
* @author :lyh
* @method :post
* @time :2023/4/28 17:42
*/
public function country_edit(){
$rs = $this->model->edit($this->param,['project_id'=>$this->user['project_id']]);
if($rs === false){
$this->fail('当前数据不存在');
}
//TODO::配置多语言翻译api接口
return $this->success();
}
}