zxhxx 3 年之前
父节点
当前提交
dc647bdd7d
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      app/api/controller/activity/WholeController.php

+ 7 - 1
app/api/controller/activity/WholeController.php

@@ -230,7 +230,13 @@ class WholeController
      */
     public function news(Request $request)
     {
-        return app('json')->successful(StoreWholesale::where('is_news',1)->where('is_del',0)->where('is_show',1)->select()->toArray());
+        $time_id = input('time_id',0);
+        $where = null;
+        if($time_id>0)
+        {
+            $where['time_id'] = $time_id;
+        }
+        return app('json')->successful(StoreWholesale::where('is_del',0)->where($where)->where('is_show',1)->select()->toArray());
     }
 
     /**