浏览代码

fix:首页推荐信息

super-yimizi 3 月之前
父节点
当前提交
92de8bd81d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      application/api/controller/Common.php

+ 2 - 2
application/api/controller/Common.php

@@ -248,14 +248,14 @@ class Common extends Api
         //  首页推荐的分类
         $indexCategoryList = Category::where('status', StatusEnum::NORMAL)
         ->field('id,name,image')
-        ->where("FIND_IN_SET('index',`flag`)")
+        ->where('is_recommend',StatusEnum::YES)
         ->order('weigh desc')
         ->limit(8)
         ->select();
         //热门分类
         $indexHotCategoryList = Category::where('status', StatusEnum::NORMAL)
         ->field('id,name,image')
-        ->where("FIND_IN_SET('hot',`flag`)")
+        ->where('is_hot',StatusEnum::YES)
         ->order('weigh desc')
         ->limit(4)
         ->select();