作者 赵彬吉

update

@@ -219,7 +219,7 @@ class Test extends Command @@ -219,7 +219,7 @@ class Test extends Command
219 ->get(); 219 ->get();
220 //其他地方在引流的域名 220 //其他地方在引流的域名
221 $other = DB::connection('projects_mysql')->table('projects')->where('switch', 1)->pluck('domain')->toArray(); 221 $other = DB::connection('projects_mysql')->table('projects')->where('switch', 1)->pluck('domain')->toArray();
222 - 222 + $data = [];
223 foreach ($list as $project) { 223 foreach ($list as $project) {
224 $lang = WebLanguage::getLangById($project['main_lang_id']??1)['short']; 224 $lang = WebLanguage::getLangById($project['main_lang_id']??1)['short'];
225 if(empty($project->domainInfo['domain'])){ 225 if(empty($project->domainInfo['domain'])){
@@ -229,15 +229,13 @@ class Test extends Command @@ -229,15 +229,13 @@ class Test extends Command
229 if(in_array($project->domainInfo['domain'], $other)){ 229 if(in_array($project->domainInfo['domain'], $other)){
230 continue; 230 continue;
231 } 231 }
232 - $data = [ 232 + $data[] = [
233 'project_id' => $project['project_id'], 233 'project_id' => $project['project_id'],
234 'domain' => 'https://' . $project->domainInfo['domain'] . '/', 234 'domain' => 'https://' . $project->domainInfo['domain'] . '/',
235 'lang' => $lang 235 'lang' => $lang
236 ]; 236 ];
237 -  
238 - Redis::lpush('web_traffic_fix', json_encode($data));  
239 } 237 }
240 - return true; 238 + return $data;
241 } 239 }
242 /** 240 /**
243 * @name :(统计pv)pv_num 241 * @name :(统计pv)pv_num