chengwl 4 years ago
parent
commit
938c4ce6c9
2 changed files with 7 additions and 8 deletions
  1. 5 6
      controllers/IndexController.php
  2. 2 2
      lib/GA.php

+ 5 - 6
controllers/IndexController.php

@@ -26,13 +26,12 @@ class IndexController extends \app\controllers\HomeController
       try{
       try{
         $storeData=$ga->storeData($store,$start_day,$end_day);
         $storeData=$ga->storeData($store,$start_day,$end_day);
         $storeSellData=$ga->storeSellData($store,$start_day,$end_day,'week');
         $storeSellData=$ga->storeSellData($store,$start_day,$end_day,'week');
-        // foreach($storeSellData as $v){
-        //    $timestr=$v['year']."W".$v['week'];    
-        //    echo $v['week']."<br/>";
-        //    $time=date("Y-m-d",\strtotime($timestr));       
-        //    echo $time."<br/>";
+        foreach($storeSellData as $v){
+           $timestr=$v['year']."W".$v['week'];    
+           $time=date("Y-m-d",\strtotime($timestr));       
+           echo $time."<br/>";
           
           
-        // }
+        }
         echo "<pre>";
         echo "<pre>";
         print_r($storeSellData);exit;
         print_r($storeSellData);exit;
         
         

+ 2 - 2
lib/GA.php

@@ -665,8 +665,8 @@ class GA{
             break;
             break;
             case "week":
             case "week":
                 $dimensionArr=[
                 $dimensionArr=[
-                    // 'year'=>'ga:isoWee',
-                    'week'=>'ga:isoYearIsoWeek',
+                    'year'=>'ga:isoYear',
+                    'week'=>'ga:isoWeek',
                 ];
                 ];
             break;
             break;
             case "month":
             case "month":