chengwl 4 年之前
父节点
当前提交
938c4ce6c9
共有 2 个文件被更改,包括 7 次插入8 次删除
  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{
         $storeData=$ga->storeData($store,$start_day,$end_day);
         $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>";
         print_r($storeSellData);exit;
         

+ 2 - 2
lib/GA.php

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