/** * ajaxGet 接收消息 * 接收用户消息,系统消息,todo 群组消息 */ public function ajaxGet() { $con = new Controller(); $current_user = $con->current_user(); $not = $this->model('notification')->where("is_read = 0 and receiver = 'ALL_USER' or receiver = '{$current_user}' ")->select(); if (!$not) { echo jet_JSON(array('notNum' => 0, 'has' => false)); } else { $notNum = count($not); echo jet_JSON(array('not' => $not, 'msg' => "got {$notNum} new message", 'has' => true, 'notNum' => $notNum)); } }