chengwl 4 years ago
parent
commit
e7d0e7cbae
1 changed files with 4 additions and 3 deletions
  1. 4 3
      controllers/IndexController.php

+ 4 - 3
controllers/IndexController.php

@@ -185,9 +185,10 @@ class IndexController extends Controller
       $ga=new GA();
       $store="supernova";
       $request = Yii::$app->request;
-      $start_day = $request->get('start', date('Y-m-d'),time()-24*3600);
-      $end_day=$start_day;
-      $data=$ga->trafficsource($store,$start_day,$end_day);
+      $start_day = $request->get('start', date('Y-m-d'));
+      $end_day=$request->get('end', date('Y-m-d',time()-3600*24*7));
+      $data=$ga->visitors_geo($store,$start_day,$end_day);
+      dd($data);
 
     }