作者 赵彬吉
... ... @@ -40,7 +40,6 @@ class ProjectCountryLogic extends BaseLogic
if(!isset($this->param['country_lists']) || empty($this->param['country_lists'])){
$this->param['country_lists'] = '';
}
$this->param['country_lists'] = $this->countryListsFormat($this->param['country_lists']);
$info = $this->model->read(['project_id'=>$this->user['project_id']]);
if($info === false){
... ... @@ -57,8 +56,12 @@ class ProjectCountryLogic extends BaseLogic
protected function countryListsFormat($country_lists)
{
//默认选中主语种
$country_lists = explode(',', $country_lists);
if(empty($country_lists)){
$country_lists = [];
}else{
//默认选中主语种
$country_lists = explode(',', $country_lists);
}
$main_lang_id = $this->project['main_lang_id'] ?? 1;
if (!in_array($main_lang_id, $country_lists)) {
$country_lists[] = $main_lang_id;
... ...