request->isAjax()) { $get = $this->request->get(); $this->_success('', CommentHelperLogic::lists($get)); } $this->assign('category_list', GoodsCategoryLogic::categoryTreeeTree()); $this->assign('status_list', Goods::getStatusDesc(true)); return $this->fetch(); } /** * @notes 添加虚拟评论 * @return mixed * @author 段誉 * @date 2022/1/12 11:00 */ public function add() { $goods_id = $this->request->get('id'); if ($this->request->isAjax()) { $post = $this->request->post(); $check = $this->validate($post, 'app\admin\validate\CommentHelper'); if ($check !== true) { $this->_error($check); } $result = CommentHelperLogic::addComment($post); if (true === $result) { $this->_success('操作成功'); } $this->_error($result); } $this->assign('user_level', UserLogic::getLevelList()); $this->assign('goods_id', $goods_id); return $this->fetch(); } }