作者 lyh

gx

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