Browse Source

fix:首页推荐信息

super-yimizi 1 month ago
parent
commit
92de8bd81d
1 changed files with 2 additions and 2 deletions
  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)
         $indexCategoryList = Category::where('status', StatusEnum::NORMAL)
         ->field('id,name,image')
         ->field('id,name,image')
-        ->where("FIND_IN_SET('index',`flag`)")
+        ->where('is_recommend',StatusEnum::YES)
         ->order('weigh desc')
         ->order('weigh desc')
         ->limit(8)
         ->limit(8)
         ->select();
         ->select();
         //热门分类
         //热门分类
         $indexHotCategoryList = Category::where('status', StatusEnum::NORMAL)
         $indexHotCategoryList = Category::where('status', StatusEnum::NORMAL)
         ->field('id,name,image')
         ->field('id,name,image')
-        ->where("FIND_IN_SET('hot',`flag`)")
+        ->where('is_hot',StatusEnum::YES)
         ->order('weigh desc')
         ->order('weigh desc')
         ->limit(4)
         ->limit(4)
         ->select();
         ->select();