Commit 591e9efe authored by 杨培's avatar 杨培

添加了通用用户提示服务

parent ed2d01ef
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2018/12/11
* Time: 11:43
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
/**
* 通用用户提示服务
* @package internalApi\ucenter
*/
class Notice extends Client
{
/**
* 添加积分提示
*
* @param int $uid
* @param string $action 动作文字,如“发表帖子”
* @param int $creditType 积分类型,1扳手值,2扳手币,其它可扩展
* @param int $num 积分变动数量
*/
public static function addCredit($uid, $action, $creditType, $num)
{
self::call('notice.addCredit', compact('uid', 'action', 'creditType', 'num'));
}
/**
* 添加勋章提示
*
* @param int $uid
* @param string $icon
* @param string $name
* @param string $description
* @param $url
*/
public static function addMedal($uid, $icon, $name, $description, $url)
{
self::call('notice.addMedal', compact('uid', 'icon', 'name', 'description', 'url'));
}
/**
* 添加Toast提示
*
* @param int $uid
* @param string $text
* @param null|int $timeout 提示留存时间,毫秒单位,默认为 1500
*/
public static function addToast($uid, $text, $timeout=null)
{
self::call('notice.addToast', compact('uid', 'text', 'timeout'));
}
}
\ No newline at end of file
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