sunhao 5 years ago
parent
commit
43de881f71

+ 2 - 2
app/Http/Controllers/Admin/StatisticsController.php

@@ -1215,7 +1215,7 @@ class StatisticsController extends Controller
1215 1215
         $columns = array();
1216 1216
         $i_max = floor($day_count/$_day) > 20 ? 20 : floor($day_count/$_day);
1217 1217
         for($i=0; $i<$i_max; $i++){
1218
-            $columns[] = $i*$_day + 1;
1218
+            $columns[] = $i*$_day;
1219 1219
         }
1220 1220
 
1221 1221
         #数据整合
@@ -1233,7 +1233,7 @@ class StatisticsController extends Controller
1233 1233
             $fan_add = DB::table('cust_day_detail')->where('dtime', $k)->where('is_del',0)->sum('fan_add');
1234 1234
             $new_data[$k]['fan_add'] = $fan_add;
1235 1235
             foreach($columns as $val){
1236
-                $n = $val - 1;
1236
+                $n = $val;
1237 1237
                 $new_data[$k]['rate'][] = isset($v[$n]['rate']) ? $v[$n]['rate'].'%' : '';
1238 1238
             }
1239 1239
         }

+ 1 - 1
resources/views/statistics/orderRateList.blade.php

@@ -17,7 +17,7 @@
17 17
                     <th width="8%">时间</th>
18 18
                     <th width="8%">新增用户</th>
19 19
                     @foreach($columns as $v)
20
-                    <th width="8%">{{$v}}天后</th>
20
+                    <th width="8%">@if($v==0) 当天 @else {{$v}}天后@endif</th>
21 21
                     @endforeach                          
22 22
                 </tr>
23 23
                 </thead>