ZxcZxc123 2 years ago
parent
commit
5747243d2f
1 changed files with 21 additions and 3 deletions
  1. 21 3
      app/api/controller/Pub.php

+ 21 - 3
app/api/controller/Pub.php

@@ -373,10 +373,29 @@ class Pub extends BaseController
     /**
      * 课程列表页面
      */
+//    public function index()
+//    {
+//        $userInfo = Db::name("document_user")->where('gr_id', $this->$gr_id)->find();
+//
+//        $EducationModel = new Education();
+//        $where["audit"] = 1;
+//        $type1 = input("type1", "");
+//        if ($type1 !== "") {
+//            $where["type1"] = $type1;
+//        }
+//        $grlist = $EducationModel->getEducationGrList($where, 20, "od asc,recommend desc,gr_id desc");
+//
+//        $recommendList = $EducationModel->getRecommendEducationGrList(9, "od asc,recommend desc,gr_id desc");
+//
+//        $result = [
+//            'userInfo' => $userInfo,
+//            'grlist' => $grlist,
+//            'recommendList' => $recommendList,
+//        ];
+//        return json($result);
+//    }
     public function index()
     {
-        $userInfo = Db::name("document_user")->where('uid', $this->uid)->find();
-
         $EducationModel = new Education();
         $where["audit"] = 1;
         $type1 = input("type1", "");
@@ -388,7 +407,6 @@ class Pub extends BaseController
         $recommendList = $EducationModel->getRecommendEducationGrList(9, "od asc,recommend desc,gr_id desc");
 
         $result = [
-            'userInfo' => $userInfo,
             'grlist' => $grlist,
             'recommendList' => $recommendList,
         ];