正在显示
1 个修改的文件
包含
4 行增加
和
7 行删除
| @@ -62,7 +62,7 @@ class AdsController extends BaseController | @@ -62,7 +62,7 @@ class AdsController extends BaseController | ||
| 62 | foreach ($result as &$item){ | 62 | foreach ($result as &$item){ |
| 63 | $relay_site_total += count($item->target); | 63 | $relay_site_total += count($item->target); |
| 64 | $item->requiry_num = ReInquiryDetail::where('task_id', $item->id)->where('status', ReInquiryDetail::STATUS_SUCCESS)->count(); | 64 | $item->requiry_num = ReInquiryDetail::where('task_id', $item->id)->where('status', ReInquiryDetail::STATUS_SUCCESS)->count(); |
| 65 | - $item->form_num = ReInquiryForm::where('ad_id', $item->ad_id)->count(); | 65 | + $item->form_num = ReInquiryForm::whereIn('ad_id', explode(',', $item->ad_id))->count(); |
| 66 | } | 66 | } |
| 67 | $result = $result->toArray(); | 67 | $result = $result->toArray(); |
| 68 | $result['relay_site_total'] = $relay_site_total; | 68 | $result['relay_site_total'] = $relay_site_total; |
| @@ -169,7 +169,8 @@ class AdsController extends BaseController | @@ -169,7 +169,8 @@ class AdsController extends BaseController | ||
| 169 | if($channel){ | 169 | if($channel){ |
| 170 | $data = [ | 170 | $data = [ |
| 171 | 'is_v6' => 1, | 171 | 'is_v6' => 1, |
| 172 | - 'agent' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]), | 172 | + 'agent' => Channel::getChannelText($channel['user_id']??0), |
| 173 | + 'agent_group' => trim(explode('-', Channel::getChannelText($channel['user_id']??0))[0]), | ||
| 173 | 'domain' => $domain, | 174 | 'domain' => $domain, |
| 174 | ]; | 175 | ]; |
| 175 | return $this->response('success', Code::SUCCESS, $data); | 176 | return $this->response('success', Code::SUCCESS, $data); |
| @@ -180,14 +181,10 @@ class AdsController extends BaseController | @@ -180,14 +181,10 @@ class AdsController extends BaseController | ||
| 180 | return $this->response($res['msg'] ?? '验证失败,请稍后再试!', Code::USER_ERROR, []); | 181 | return $this->response($res['msg'] ?? '验证失败,请稍后再试!', Code::USER_ERROR, []); |
| 181 | } | 182 | } |
| 182 | 183 | ||
| 183 | -// $agent = implode(',', array_map(function ($v){ | ||
| 184 | -// return trim(explode('-', $v)[0]); | ||
| 185 | -// }, explode(',', $res['data'] ?? ''))); | ||
| 186 | - | ||
| 187 | $data = [ | 184 | $data = [ |
| 188 | 'is_v6' => 0, | 185 | 'is_v6' => 0, |
| 189 | 'agent' => $res['data'], | 186 | 'agent' => $res['data'], |
| 190 | - 'agent_group' => trim(explode('-', $res['data'])[0]), | 187 | + 'agent_group' => trim(explode('-', explode(',', $res['data'] ?? '')[0])[0]), |
| 191 | 'domain' => $domain, | 188 | 'domain' => $domain, |
| 192 | ]; | 189 | ]; |
| 193 | return $this->response('success', Code::SUCCESS, $data); | 190 | return $this->response('success', Code::SUCCESS, $data); |
-
请 注册 或 登录 后发表评论