sunhao 5 年之前
父节点
当前提交
a601821220
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Http/Controllers/Admin/StatisticsController.php

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

3970
         $offset = ($page-1) * $pageSize;
3970
         $offset = ($page-1) * $pageSize;
3971
         $city = $request->input('city');
3971
         $city = $request->input('city');
3972
 
3972
 
3973
-        if($city !== null){
3973
+        if($city){
3974
             $city = str_replace('市', '', $city); //单独搜城市不走redis 不用排序
3974
             $city = str_replace('市', '', $city); //单独搜城市不走redis 不用排序
3975
         }else{
3975
         }else{
3976
             //从redis取数据
3976
             //从redis取数据
4095
         }
4095
         }
4096
 
4096
 
4097
         $count = count($result);
4097
         $count = count($result);
4098
-        if($city == null){
4098
+        if(!$city){
4099
             Redis::set($redis_key, json_encode($result));
4099
             Redis::set($redis_key, json_encode($result));
4100
             //计算今日剩余时间
4100
             //计算今日剩余时间
4101
             $_time = strtotime(date('Y-m-d'). '23:59:59') - time();
4101
             $_time = strtotime(date('Y-m-d'). '23:59:59') - time();