作者 lyh

gx

... ... @@ -154,13 +154,13 @@ class ComController extends BaseController
$arr['source_country'] = DB::table('gl_customer_visit')
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
->groupBy('country')->where(['domain'=>'http://lxl.petuu.shop/'])
->where('updated_date','>=',$startTime)
->where('updated_date','<=',$endTime)
// ->where('updated_date','>=',$startTime)
// ->where('updated_date','<=',$endTime)
->orderBy('ip','desc')->limit(15)->get()->toArray();
if(!empty($data)){
$data = json_encode($arr['source_country']);
if(!empty($arr['source_country'])){
$arr['source_country'] = json_encode($arr['source_country']);
}
return $data;
return $arr['source_country'];
}
/**
... ...