public function dislike_get()
 {
     if (!$this->uid) {
         $this->responseError(new CommonException('200102'));
     }
     $uid = I('get.uid', 0, 'intval');
     if (!$uid || $uid == $this->uid) {
         $this->responseError(new CommonException('200201'));
     }
     $user_infos = Privilege::canIntereact($this->uid, $uid);
     //除了权限还要判断是否是介绍人,介绍人身份无法给其他人点赞
     if (!$user_infos || $user_infos[0]['user_info']['is_single'] != 1) {
         $this->responseError(new CommonException('200101'));
     }
     D('Like')->where(array('from_uid' => $this->uid, 'to_uid' => $uid))->save(array('like_status' => 0, 'like_time' => time()));
     $this->responseSuccess(array('result' => 1));
 }
 private function others_profile($uid)
 {
     /*
     $myUser = D('User')->find($this->uid);
     //非验证用户无法访问
     if($myUser['verified'] != 1)
         $this->responseError(new CommonException('200101'));
     $myUserInfo = D('UserInfo')->find($this->uid);
     //未选择身份无法访问
     if($myUserInfo['is_single'] == -1)
         $this->responseError(new CommonException('200101'));
     //介绍人身份
     if($myUserInfo['is_single'] == 0){
         //只能访问自己邀请的人的信息
         $myInvites = D('InviteCode')->where(array('from_uid'=>$this->uid))->select();
         $myInviteUids = array();
         foreach ($myInvites as $value)
             if($value['to_uid'])
                 $myInviteUids[] = $value['to_uid'];
         if(!in_array($uid, $myInviteUids))
             $this->responseError(new CommonException('200101'));
     }
     
     $result = D('User')->where(array('verified'=>1))->find($uid);
     //不允许访问错误的uid,或者未认证的uid
     if(!$result) $this->responseError(new CommonException('200101'));
     unset($result['openid']);
     $result['user_info'] = D('UserInfo')->where(array('uid'=>$uid))->find();
     if(!$result['user_info']){
         D('User')->createUserInfoItem($uid);
         $result['user_info'] = D('UserInfo')->where(array('uid'=>$uid))->find();
     }
     //不允许访问介绍人或未选身份人的信息
     if($result['user_info']['is_single'] != 1){
         $this->responseError(new CommonException('200101'));
     }
     */
     $userInfos = Privilege::canIntereact($this->uid, $uid);
     if (!$userInfos) {
         $this->responseError(new CommonException('200101'));
     }
     $fromUserInfo = $userInfos[0];
     $toUserInfo = $userInfos[1];
     //不允许单身访问同性的信息
     if ($fromUserInfo['is_single'] == 1 && $toUserInfo['user_info']['gender'] == $fromUserInfo['user_info']['gender']) {
         $this->responseError(new CommonException('200101'));
     }
     unset($toUserInfo['openid']);
     $toUserInfo['relation_text'] = Degree::getRelationText($this->uid, $uid);
     $toUserInfo['photo'] = D('Photo')->where(array('uid' => $uid, 'status' => 1))->select();
     $toUserInfo['photo'] = $toUserInfo['photo'] ? $toUserInfo['photo'] : array();
     D('ViewLog')->add(array('from_uid' => $this->uid, 'to_uid' => $uid, 'view_time' => time()));
     $this->responseSuccess($toUserInfo);
 }