作者 lyh

gx

... ... @@ -147,12 +147,13 @@ class ComController extends BaseController
}
public function ceshi(){
$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/'])
->orderBy('ip','desc')->limit(15)->get()->toArray();
$arr['source_country'] = json_encode($source_country);
return $arr['source_country'];
$referrer_url = DB::table('gl_customer_visit_item')
->select('url',DB::raw('COUNT(*) as num'))
->orderBy('num','desc')->where(['domain'=>'http://lxl.petuu.shop/'])
->groupBy('url')
->limit(15)->get()->toArray();
$arr['referrer_url'] = json_encode($referrer_url);
return $arr['referrer_url'];
}
/**
... ...