作者 lyh

gx

@@ -147,12 +147,13 @@ class ComController extends BaseController @@ -147,12 +147,13 @@ class ComController extends BaseController
147 } 147 }
148 148
149 public function ceshi(){ 149 public function ceshi(){
150 - $source_country = DB::table('gl_customer_visit')  
151 - ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))  
152 - ->groupBy('country')->where(['domain'=>'http://lxl.petuu.shop/'])  
153 - ->orderBy('ip','desc')->limit(15)->get()->toArray();  
154 - $arr['source_country'] = json_encode($source_country);  
155 - return $arr['source_country']; 150 + $referrer_url = DB::table('gl_customer_visit_item')
  151 + ->select('url',DB::raw('COUNT(*) as num'))
  152 + ->orderBy('num','desc')->where(['domain'=>'http://lxl.petuu.shop/'])
  153 + ->groupBy('url')
  154 + ->limit(15)->get()->toArray();
  155 + $arr['referrer_url'] = json_encode($referrer_url);
  156 + return $arr['referrer_url'];
156 } 157 }
157 158
158 /** 159 /**