public function userMailWeidu()
 {
     //        $userID = Verif::canshu(I('userID'), 'userID', true, 'int');
     $userID = session("userID");
     //方法1 ,只获未读邮件
     $mailList = Db::dbSelect("UserMailList", ['shouxin_user_id' => $userID, 'shouxin_time_int' => 0]);
     $count = count($mailList);
     //获取未读邮件数量
     //获取发信人的用户信息
     foreach ($mailList as $key => $val) {
         //获取发信人信息 ,把用户资料加到新的字段里
         $mailList[$key]['faxin_user'] = Qita::findUser($mailList[$key]['faxin_user_id']);
         $mailList[$key]['mail_neirong'] = strip_tags($mailList[$key]['mail_neirong']);
         //dump($mailAll);
     }
     $this->ajaxReturn(['zhuangtai' => 1, 'tishi' => '获取用户未读邮件成功', 'data' => ['count' => $count, 'mailList' => $mailList]]);
 }
Exemple #2
0
 public static function getFriendList($userID, $limit = null)
 {
     Verif::canshu($userID, "userID", true, 'int');
     //验证
     $list = Db::dbSelect("UserList", ['user_id' => $userID]);
     foreach ($list as $key => $listVal) {
         $list[$key]['shouxin_user'] = Qita::findUser($listVal['shouxin_user_id']);
     }
     //dump($list);
     return $list;
 }