Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
591e9efe
Commit
591e9efe
authored
Dec 11, 2018
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了通用用户提示服务
parent
ed2d01ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
Notice.php
src/ucenter/Notice.php
+59
-0
No files found.
src/ucenter/Notice.php
0 → 100644
View file @
591e9efe
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment