function enterNewsAction() { $request = $this->getRequest(); if ('POST' == $request->getMethod()) { $ssotoken = $this->post()->get("ssotoken"); $newsId = $this->post()->get("newsId"); } else { $ssotoken = $this->get("ssotoken"); $newsId = $this->get("newsId"); } if (!$ssotoken || !$newsId) { $this->displayJsonUdo(Common_Error::ERROR_PARAM); } //获取用户id $userModel = new UserModel(); $uid = $userModel->getUserId($ssotoken); if (is_array($uid)) { $this->displayJsonUdo(Common_Error::INVALID_TOKEN, "", $uid['msg']); } $schoolModel = new SchoolModel(); $schoolModel->newsLog($uid, $newsId); $this->displayJsonUdo(Common_Error::ERROR_SUCCESS); }