Пример #1
0
 public function doDelComment($comment_id = 0)
 {
     //删除评论
     $result = $this->weiboApi->deleteComment($comment_id);
     //返回成功信息
     $this->ajaxReturn(apiToAjax($result));
 }
Пример #2
0
 public function sendRepost($content = '', $type = 'repost', $sourceId = 0, $weiboId = 0, $becomment = 0, $from = '手机客户端')
 {
     $this->api->requireLogin();
     $feed_data = '';
     $sourse = $this->weiboApi->getWeiboDetail($sourceId);
     $sourseweibo = $sourse['weibo'];
     $feed_data['sourse'] = $sourseweibo;
     $feed_data['sourseId'] = $sourceId;
     //发送微博
     $result = $this->weiboApi->sendWeibo($content, $type, $feed_data, $from);
     if ($result) {
         D('weibo')->where('id=' . $sourceId)->setInc('repost_count');
         $weiboId != $sourceId && D('weibo')->where('id=' . $weiboId)->setInc('repost_count');
     }
     $user = query_user(array('nickname'), is_login());
     $toUid = D('weibo')->where(array('id' => $weiboId))->getField('uid');
     D('Common/Message')->sendMessage($toUid, $user['nickname'] . '转发了您的微博!', '转发提醒', U('Weibo/Index/weiboDetail', array('id' => $result['weibo_id'])), is_login(), 1);
     if ($becomment == 'true') {
         $this->weiboApi->sendRepostComment($weiboId, $content);
     }
     $result['detail']['weibo'] = $this->preHandleWeibo($result['detail']['weibo']);
     //返回成功结果
     $this->ajaxReturn(apiToAjax($result));
 }
Пример #3
0
 public function doUploadAvatar()
 {
     //调用上传头像接口
     $result = callApi('User/uploadTempAvatar');
     $this->ensureApiSuccess($result);
     //显示成功消息
     $this->iframeReturn(apiToAjax($result));
 }
Пример #4
0
 /**
  * 喜欢还是不喜欢
  * 
  */
 function dolike($id, $type)
 {
     $likeCountArray = $this->atlasApi->dolike($id, $type);
     //返回成功结果
     $this->ajaxReturn(apiToAjax($likeCountArray));
 }