request->isAjax()) { $post = $this->request->post(); $result = FootprintLogic::edit($post); if ($result === false) { $message = FootprintLogic::getError() ?: '编辑失败'; return JsonServer::error($message); } return JsonServer::success('编辑成功'); } $id = $this->request->get('id'); View::assign('detail', FootprintLogic::detail($id)); return view(); } /** * @Notes: 设置足迹 * @Author: 张无忌 */ public function set() { if ($this->request->isAjax()) { $post = $this->request->post(); $result = FootprintLogic::set($post); if ($result === false) { $message = FootprintLogic::getError() ?: '设置失败'; return JsonServer::error($message); } return JsonServer::success('设置成功'); } return JsonServer::error('请求异常'); } }