|
...
|
...
|
@@ -62,7 +62,7 @@ class AdsController extends BaseController |
|
|
|
foreach ($result as &$item){
|
|
|
|
$relay_site_total += count($item->target);
|
|
|
|
$item->requiry_num = ReInquiryDetail::where('task_id', $item->id)->where('status', ReInquiryDetail::STATUS_SUCCESS)->count();
|
|
|
|
$item->form_num = ReInquiryForm::where('ad_id', $item->ad_id)->count();
|
|
|
|
$item->form_num = ReInquiryForm::whereIn('ad_id', explode(',', $item->ad_id))->count();
|
|
|
|
}
|
|
|
|
$result = $result->toArray();
|
|
|
|
$result['relay_site_total'] = $relay_site_total;
|
|
...
|
...
|
@@ -169,7 +169,8 @@ class AdsController extends BaseController |
|
|
|
if($channel){
|
|
|
|
$data = [
|
|
|
|
'is_v6' => 1,
|
|
|
|
'agent' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]),
|
|
|
|
'agent' => Channel::getChannelText($channel['user_id']??0),
|
|
|
|
'agent_group' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]),
|
|
|
|
'domain' => $domain,
|
|
|
|
];
|
|
|
|
return $this->response('success', Code::SUCCESS, $data);
|
|
...
|
...
|
@@ -180,14 +181,10 @@ class AdsController extends BaseController |
|
|
|
return $this->response($res['msg'] ?? '验证失败,请稍后再试!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
|
|
|
|
// $agent = implode(',', array_map(function ($v){
|
|
|
|
// return trim(explode('-', $v)[0]);
|
|
|
|
// }, explode(',', $res['data'] ?? '')));
|
|
|
|
|
|
|
|
$data = [
|
|
|
|
'is_v6' => 0,
|
|
|
|
'agent' => $res['data'],
|
|
|
|
'agent_group' => trim(explode('-', $res['data'])[0]),
|
|
|
|
'agent_group' => trim(explode('-', explode(',', $res['data'] ?? '')[0])[0]),
|
|
|
|
'domain' => $domain,
|
|
|
|
];
|
|
|
|
return $this->response('success', Code::SUCCESS, $data);
|
...
|
...
|
|