예제 #1
0
 /**
  * 所有邮件数量
  *
  * @access public
  * @param 无
  * @return JsonView 响应json
  */
 public function getMailNum($user_id)
 {
     $friend_mail = MailModel::getFriendMail($user_id);
     $system_mail = MailModel::getSystemMail($user_id);
     $mail_num = count($friend_mail) + count($system_mail);
     return $mail_num;
 }
예제 #2
0
 /**
  * API:确定按钮
  *
  * @access public
  * @param 无
  * @return JsonView 响应json
  */
 public function exeConfigButton()
 {
     $requestParam = $this->getAllParameters();
     Logger::debug('requestParam:' . print_r($requestParam, true));
     $requestJsonParam = $this->getDecodedJsonRequest();
     Logger::debug('requestJsonParam:' . print_r($requestJsonParam, true));
     $user_id = $requestParam['user_id'];
     $mail_id = $requestJsonParam['mail_id'];
     $session_key = $requestParam['session_key'];
     $res = FriendModel::updateFriendMail(array('n_type' => 0, 't_update_time' => date("Y-m-d H:i:s")), array('n_id' => $mail_id));
     $messageArr['friend_mail'] = MailModel::getFriendMail($user_id);
     $messageArr['system_mail'] = MailModel::getSystemMail($user_id);
     //任务成就界面
     $messageArr['achieveInfo'] = TaskAndAchieveAction::getAchieveInfo($user_id);
     $messageArr['taskInfo'] = TaskAndAchieveAction::getTaskInfo($user_id);
     $messageArr['session_key'] = CharacterModel::setSessionKey($user_id, $session_key);
     $view = new JsonView();
     return $this->getViewByJson($view, $messageArr, 1, "friend/config_button");
 }