request->isAjax()) { $get = $this->request->get(); $data = CommentLogic::lists($get); return JsonServer::success('', $data); } return view(); } /** * 显示/隐藏商品评价 */ public function changeStatus() { $post = $this->request->post(); $result = CommentLogic::changeStatus($post); if($result === true) { return JsonServer::success('操作成功'); } return JsonServer::error(CommentLogic::getError()); } /** * 删除 */ public function del() { $post = $this->request->post(); $result = CommentLogic::del($post); if($result === true) { return JsonServer::success('删除成功'); } return JsonServer::error(CommentLogic::getError()); } }