Commit c17a95c1 authored by 杨培's avatar 杨培

Merge remote-tracking branch 'origin/master'

parents eee02faf de4a0bac
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 11/09/2017
* Time: 11:54 AM
*/
use internalApi\bbs\User;
require __DIR__.'/_init.php';
User::setDebug(true);
$uid = 42;
$data = User::getGoldCoin($uid);
print_r($data);
\ No newline at end of file
......@@ -19,8 +19,8 @@ Message::setDebug();
//print_r($info);
//
$info = \internalApi\ucenter\Message::addComment(1,0,0,'bbs','theme',0,0,'','123123');
print_r($info);
//$info = \internalApi\ucenter\Message::addComment(1,0,0,'bbs','theme',0,0,'','123123');
//print_r($info);
//$info = \internalApi\ucenter\Message::addLike(1,0,0,'bbs','theme',0,0,'');
......@@ -30,4 +30,8 @@ print_r($info);
//print_r($info);
//$info = \internalApi\ucenter\Message::deleteLiked(1,'bbs','theme',0);
//print_r($info);
\ No newline at end of file
//print_r($info);
//
$info = \internalApi\ucenter\Message::pushMsg(1,0,0,'bbs','theme',0);
print_r($info);
......@@ -13,16 +13,26 @@ use internalApi\base\Client;
class User extends Client
{
/**
* 同步更新用户基本信息
*
* @param int $uid
* @param array $data
* @return bool
*/
public static function updateSync($uid, $data)
{
return self::call('user.updateSync', compact('uid', 'data'));
}
/**
* 同步更新用户基本信息
*
* @param int $uid
* @param array $data
* @return bool
*/
public static function updateSync($uid, $data)
{
return self::call('user.updateSync', compact('uid', 'data'));
}
/**
* 获取金币
* @param $uid
* @return mixed
*/
public static function getGoldCoin($uid)
{
return self::call('user.getGoldCoin', compact('uid'));
}
}
\ No newline at end of file
......@@ -57,9 +57,9 @@ class Message extends Client
* @param string $extra
* @return mixed
*/
public static function addComment($userId, $title, $sourceUrl, $from, $type, $commentId, $replyUserId, $replyedComment = '',$extra = '')
public static function addComment($userId, $title, $sourceUrl, $from, $type, $commentId, $replyUserId, $replyedComment = '', $extra = '')
{
return self::call('message.addComment', compact('userId', 'title', 'sourceUrl', 'from', 'type', 'commentId', 'replyUserId', 'replyedComment','extra'));
return self::call('message.addComment', compact('userId', 'title', 'sourceUrl', 'from', 'type', 'commentId', 'replyUserId', 'replyedComment', 'extra'));
}
/**
......@@ -118,4 +118,19 @@ class Message extends Client
{
return self::call('message.deleteLiked', compact('userId', 'from', 'type', 'sourceId'));
}
}
\ No newline at end of file
/**
* @param $title 消息标题
* @param $url url地址
* @param $desc 描述
* @param int $userId 用户id 0=>代表全部
* @param int $from 来自
* @param int $type 类型 0 早报 1 求助 2 系统推送
* @return mixed
*/
public static function pushMsg($title, $url, $desc, $userId = 0, $from = 4, $type = 0)
{
return self::call('message.pushMsg', compact('title', 'url', 'desc', 'userId','from','type'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment