From cbda35e257270c1c95831191df60a7360c182a5c Mon Sep 17 00:00:00 2001 From: lwh <2679599887@qq.com> Date: Thu, 24 Aug 2023 21:42:04 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=B7=BB=E5=8A=A0=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Home/Home.php | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 app/api/controller/Home/Home.php diff --git a/app/api/controller/Home/Home.php b/app/api/controller/Home/Home.php new file mode 100644 index 0000000..f4c6e93 --- /dev/null +++ b/app/api/controller/Home/Home.php @@ -0,0 +1,63 @@ +param(); + $con = []; + + $loveStoryList = ModelLoveStory::where($con) + ->field([ + 'love_story_id', + 'love_story_title', + 'love_story_author', + 'love_story_place', + 'love_story_date', + 'love_story_cover', + ]) + ->order('love_story_sort', 'asc') + ->limit(4) + ->select(); + + + $wishList = ModelWishList::where($con) + ->field([ + 'wish_list_id', + 'wish_list_name', + 'wish_list_author', + 'wish_list_status', + 'wish_list_create_time', + 'wish_list_sort' + ]) + ->order('wish_list_sort', 'desc') + ->limit(3) + ->select(); + + return msg(0, "获取心愿单列表成功!", [ + 'data' => [ + 'wishList' => $wishList, + 'loveStoryList' => $loveStoryList + ] + ]); + } +}