function getRecommendationAction() { $request = $this->getRequest(); if ('POST' == $request->getMethod()) { $ssotoken = $this->post()->get("ssotoken"); $actionId = $this->post()->get("actionId"); } else { $ssotoken = $this->get("ssotoken"); $actionId = $this->get("actionId"); } if (!$ssotoken || !$actionId) { $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(); $rec = $schoolModel->getRec($uid, $actionId); //print_r($rec); $schoolModel->recLog($uid, $actionId, $rec['rec'], $rec['page']); if ($rec) { $this->displayJsonUdo(Common_Error::ERROR_SUCCESS, $rec['rec']); } else { $this->displayJsonUdo(Common_Error::ERROR_FAIL); } }