|
@@ -7,6 +7,7 @@ use App\Helper\FormGlobalsoApi; |
|
@@ -7,6 +7,7 @@ use App\Helper\FormGlobalsoApi; |
|
7
|
use App\Helper\Translate;
|
7
|
use App\Helper\Translate;
|
|
8
|
use App\Http\Logic\Aside\Project\ProjectLogic;
|
8
|
use App\Http\Logic\Aside\Project\ProjectLogic;
|
|
9
|
use App\Http\Logic\Bside\BaseLogic;
|
9
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
10
|
+use App\Models\Com\WordCountry;
|
|
10
|
use App\Models\Domain\DomainInfo;
|
11
|
use App\Models\Domain\DomainInfo;
|
|
11
|
use App\Models\Inquiry\InquiryForm;
|
12
|
use App\Models\Inquiry\InquiryForm;
|
|
12
|
use App\Models\Inquiry\InquiryFormData;
|
13
|
use App\Models\Inquiry\InquiryFormData;
|
|
@@ -212,8 +213,12 @@ class InquiryLogic extends BaseLogic |
|
@@ -212,8 +213,12 @@ class InquiryLogic extends BaseLogic |
|
212
|
'country_code'=>$data['country_code'] ?? '',
|
213
|
'country_code'=>$data['country_code'] ?? '',
|
|
213
|
'phone_region'=>$data['phone_region'] ?? '',
|
214
|
'phone_region'=>$data['phone_region'] ?? '',
|
|
214
|
];
|
215
|
];
|
|
215
|
- if(!empty($param['phone_region'])){
|
|
|
|
216
|
- $param['country'] = Translate::tran($param['phone_region'], 'zh') ?? '';
|
216
|
+ if(!empty($param['country_code'])){
|
|
|
|
217
|
+ $wordCountryModel = new WordCountry();
|
|
|
|
218
|
+ $info = $wordCountryModel->read(['pid'=>0,'iso2'=>$this->param['country_code']],['chinese_name']);
|
|
|
|
219
|
+ if($info !== false){
|
|
|
|
220
|
+ $param['country'] = $info['chinese_name'];
|
|
|
|
221
|
+ }
|
|
217
|
}
|
222
|
}
|
|
218
|
(new PhoneData())->addReturnId($param);
|
223
|
(new PhoneData())->addReturnId($param);
|
|
219
|
return $this->success($param);
|
224
|
return $this->success($param);
|
|
@@ -228,13 +233,18 @@ class InquiryLogic extends BaseLogic |
|
@@ -228,13 +233,18 @@ class InquiryLogic extends BaseLogic |
|
228
|
* @author :lyh
|
233
|
* @author :lyh
|
|
229
|
* @method :post
|
234
|
* @method :post
|
|
230
|
* @time :2025/3/11 14:11
|
235
|
* @time :2025/3/11 14:11
|
|
|
|
236
|
+ * @param :pid:0->国家
|
|
231
|
*/
|
237
|
*/
|
|
232
|
public function tranCountry(){
|
238
|
public function tranCountry(){
|
|
233
|
- $country = Translate::tran($this->param['phone_region'], 'zh') ?? '';
|
|
|
|
234
|
- if(!empty($country)){
|
|
|
|
235
|
- $phoneDataModel = new PhoneData();
|
|
|
|
236
|
- $phoneDataModel->edit(['country'=>$country],['phone_region'=>$this->param['phone_region']]);
|
239
|
+ $wordCountryModel = new WordCountry();
|
|
|
|
240
|
+ $info = $wordCountryModel->read(['pid'=>0,'iso2'=>$this->param['country_code']],['chinese_name']);
|
|
|
|
241
|
+ if($info !== false){
|
|
|
|
242
|
+ $chinese_name = $info['chinese_name'];
|
|
|
|
243
|
+ }else{
|
|
|
|
244
|
+ $chinese_name = $this->param['country_code'];
|
|
237
|
}
|
245
|
}
|
|
238
|
- return $this->success(['country'=>$country]);
|
246
|
+ $phoneDataModel = new PhoneData();
|
|
|
|
247
|
+ $phoneDataModel->edit(['country'=>$info['chinese_name']],['country_code'=>$this->param['country_code']]);
|
|
|
|
248
|
+ return $this->success(['country'=>$chinese_name]);
|
|
239
|
}
|
249
|
}
|
|
240
|
} |
250
|
} |