作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into lyh-server

@@ -831,7 +831,7 @@ if (!function_exists('curlGet')) { @@ -831,7 +831,7 @@ if (!function_exists('curlGet')) {
831 function curlGet($url) 831 function curlGet($url)
832 { 832 {
833 $ch1 = curl_init(); 833 $ch1 = curl_init();
834 - $timeout = 60; 834 + $timeout = 10;
835 curl_setopt($ch1, CURLOPT_URL, $url); 835 curl_setopt($ch1, CURLOPT_URL, $url);
836 curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); 836 curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
837 curl_setopt($ch1, CURLOPT_ENCODING, ''); 837 curl_setopt($ch1, CURLOPT_ENCODING, '');
@@ -19,6 +19,7 @@ use App\Models\Inquiry\ReInquiryCount; @@ -19,6 +19,7 @@ use App\Models\Inquiry\ReInquiryCount;
19 use App\Models\Inquiry\ReInquiryDetail; 19 use App\Models\Inquiry\ReInquiryDetail;
20 use App\Models\Inquiry\ReInquiryForm; 20 use App\Models\Inquiry\ReInquiryForm;
21 use App\Models\Inquiry\ReInquiryTask; 21 use App\Models\Inquiry\ReInquiryTask;
  22 +use App\Models\Project\Payment;
22 use App\Models\Project\Project; 23 use App\Models\Project\Project;
23 use App\Utils\HttpUtils; 24 use App\Utils\HttpUtils;
24 use App\Utils\LogUtils; 25 use App\Utils\LogUtils;
@@ -101,6 +102,11 @@ class AdsController extends BaseController @@ -101,6 +102,11 @@ class AdsController extends BaseController
101 $item['target'][$k]['is_ad_fee'] = $project->deploy_build->ads_price ? 1 : 0; 102 $item['target'][$k]['is_ad_fee'] = $project->deploy_build->ads_price ? 1 : 0;
102 } 103 }
103 } 104 }
  105 + $item['target'][$k]['mark'] = [];
  106 + !$item['target'][$k]['is_ad_fee'] && $item['target'][$k]['mark'][] = 'green';
  107 + $item['target'][$k]['is_ad_fee'] && $item['target'][$k]['mark'][] = 'black';
  108 + $item['target'][$k]['is_repeat'] && $item['target'][$k]['mark'][] = 'red';
  109 + $item['target'][$k]['price'] > 90000 && $item['target'][$k]['mark'][] = 'blue';
104 } 110 }
105 $item['cost'] = ReInquiryCost::getCostByAdIds($item['ad_id']); 111 $item['cost'] = ReInquiryCost::getCostByAdIds($item['ad_id']);
106 } 112 }
@@ -265,6 +271,7 @@ class AdsController extends BaseController @@ -265,6 +271,7 @@ class AdsController extends BaseController
265 'agent' => Channel::getChannelText($channel['user_id']??0), 271 'agent' => Channel::getChannelText($channel['user_id']??0),
266 'agent_group' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]), 272 'agent_group' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]),
267 'domain' => $domain, 273 'domain' => $domain,
  274 + 'price' => Payment::where('project_id', $domain_info['project_id'])->value('amount') ?: 0
268 ]; 275 ];
269 return $this->response('success', Code::SUCCESS, $data); 276 return $this->response('success', Code::SUCCESS, $data);
270 } 277 }
@@ -279,6 +286,7 @@ class AdsController extends BaseController @@ -279,6 +286,7 @@ class AdsController extends BaseController
279 'agent' => $res['data'], 286 'agent' => $res['data'],
280 'agent_group' => trim(explode('-', explode(',', $res['data'] ?? '')[0])[0]), 287 'agent_group' => trim(explode('-', explode(',', $res['data'] ?? '')[0])[0]),
281 'domain' => $domain, 288 'domain' => $domain,
  289 + 'price' => $res['price'] ?? 0,
282 ]; 290 ];
283 return $this->response('success', Code::SUCCESS, $data); 291 return $this->response('success', Code::SUCCESS, $data);
284 } 292 }
@@ -280,14 +280,9 @@ class DomainInfoLogic extends BaseLogic @@ -280,14 +280,9 @@ class DomainInfoLogic extends BaseLogic
280 continue; 280 continue;
281 } 281 }
282 282
283 - $origin_array = parse_url($v['origin']);  
284 - $origin_url = isset($origin_array['path']) && $origin_array['path'] ? $origin_array['path'] : $origin_array['host'];  
285 -  
286 - $target_array = parse_url($v['target']);  
287 - $target_url = isset($target_array['path']) && $target_array['path'] ? $target_array['path'] : $target_array['host'];  
288 - if((!in_array($origin_url,$unique_extend))){  
289 - $unique_extend[] = $origin_url;  
290 - $extend_config[] = ['origin'=>$origin_url,'target'=>$target_url]; 283 + if((!in_array($v['origin'],$unique_extend))){
  284 + $unique_extend[] = $v['origin'];
  285 + $extend_config[] = ['origin'=>$v['origin'],'target'=>$v['target']];
291 } 286 }
292 } 287 }
293 } 288 }
@@ -303,14 +298,9 @@ class DomainInfoLogic extends BaseLogic @@ -303,14 +298,9 @@ class DomainInfoLogic extends BaseLogic
303 continue; 298 continue;
304 } 299 }
305 300
306 - $amp_origin_array = parse_url($va['origin']);  
307 - $amp_origin_url = isset($amp_origin_array['path']) && $amp_origin_array['path'] ? $amp_origin_array['path'] : $amp_origin_array['host'];  
308 -  
309 - $amp_target_array = parse_url($va['target']);  
310 - $amp_target_url = isset($amp_target_array['path']) && $amp_target_array['path'] ? $amp_target_array['path'] : $amp_target_array['host'];  
311 - if((!in_array($amp_origin_url,$amp_unique_extend))){  
312 - $amp_unique_extend[] = $amp_origin_url;  
313 - $amp_extend_config[] = ['origin'=>$amp_origin_url,'target'=>$amp_target_url]; 301 + if((!in_array($va['origin'],$amp_unique_extend))){
  302 + $amp_unique_extend[] = $va['origin'];
  303 + $amp_extend_config[] = ['origin'=>$va['origin'],'target'=>$va['target']];
314 } 304 }
315 } 305 }
316 } 306 }
@@ -72,6 +72,7 @@ class ReInquiryTask extends Base @@ -72,6 +72,7 @@ class ReInquiryTask extends Base
72 $item['agent'] = $item['agent'] ?? ''; 72 $item['agent'] = $item['agent'] ?? '';
73 $item['agent_group'] = $item['agent_group'] ?? ''; 73 $item['agent_group'] = $item['agent_group'] ?? '';
74 $item['is_require'] = $item['is_require'] ?? 0; 74 $item['is_require'] = $item['is_require'] ?? 0;
  75 + $item['price'] = $item['price'] ?? 0;
75 } 76 }
76 return $value; 77 return $value;
77 } 78 }