request->request('page'); $commentList = Comment:: with('archives') ->where(['user_id' => $this->auth->id]) ->order('id desc') ->page($page, 10) ->select(); foreach ($commentList as $index => $item) { $item->create_date = human_date($item->createtime); } $this->success('', ['commentList' => $commentList]); } /** * 关于我们 */ public function aboutus() { $pageInfo = Page::getByDiyname('aboutus'); if (!$pageInfo || $pageInfo['status'] == 'hidden') { $this->error(__('单页未找到')); } $this->success('', ['pageInfo' => $pageInfo]); } }