|
...
|
...
|
@@ -7,6 +7,7 @@ use App\Helper\FormGlobalsoApi; |
|
|
|
use App\Helper\Translate;
|
|
|
|
use App\Http\Logic\Aside\Project\ProjectLogic;
|
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\Com\WordCountry;
|
|
|
|
use App\Models\Domain\DomainInfo;
|
|
|
|
use App\Models\Inquiry\InquiryForm;
|
|
|
|
use App\Models\Inquiry\InquiryFormData;
|
|
...
|
...
|
@@ -212,8 +213,12 @@ class InquiryLogic extends BaseLogic |
|
|
|
'country_code'=>$data['country_code'] ?? '',
|
|
|
|
'phone_region'=>$data['phone_region'] ?? '',
|
|
|
|
];
|
|
|
|
if(!empty($param['phone_region'])){
|
|
|
|
$param['country'] = Translate::tran($param['phone_region'], 'zh') ?? '';
|
|
|
|
if(!empty($param['country_code'])){
|
|
|
|
$wordCountryModel = new WordCountry();
|
|
|
|
$info = $wordCountryModel->read(['pid'=>0,'iso2'=>$this->param['country_code']],['chinese_name']);
|
|
|
|
if($info !== false){
|
|
|
|
$param['country'] = $info['chinese_name'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(new PhoneData())->addReturnId($param);
|
|
|
|
return $this->success($param);
|
|
...
|
...
|
@@ -228,13 +233,18 @@ class InquiryLogic extends BaseLogic |
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/3/11 14:11
|
|
|
|
* @param :pid:0->国家
|
|
|
|
*/
|
|
|
|
public function tranCountry(){
|
|
|
|
$country = Translate::tran($this->param['phone_region'], 'zh') ?? '';
|
|
|
|
if(!empty($country)){
|
|
|
|
$phoneDataModel = new PhoneData();
|
|
|
|
$phoneDataModel->edit(['country'=>$country],['phone_region'=>$this->param['phone_region']]);
|
|
|
|
$wordCountryModel = new WordCountry();
|
|
|
|
$info = $wordCountryModel->read(['pid'=>0,'iso2'=>$this->param['country_code']],['chinese_name']);
|
|
|
|
if($info !== false){
|
|
|
|
$chinese_name = $info['chinese_name'];
|
|
|
|
}else{
|
|
|
|
$chinese_name = $this->param['country_code'];
|
|
|
|
}
|
|
|
|
return $this->success(['country'=>$country]);
|
|
|
|
$phoneDataModel = new PhoneData();
|
|
|
|
$phoneDataModel->edit(['country'=>$info['chinese_name']],['country_code'=>$this->param['country_code']]);
|
|
|
|
return $this->success(['country'=>$chinese_name]);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|