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
78b08abb
Commit
78b08abb
authored
Dec 31, 2019
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 TipService,从此之后服务添加 Service 后缀。
parent
440e7462
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
TipService.php
src/ucenter/TipService.php
+58
-0
No files found.
src/ucenter/TipService.php
0 → 100644
View file @
78b08abb
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2019/12/31
* Time: 15:47
*/
namespace
internalApi\ucenter
;
use
internalApi\base\Client
;
/**
* 用户中心消息服务
*
* @package internalApi\ucenter
*/
class
TipService
extends
Client
{
/**
* 检查指定键值是否已存在
*
* @param int $uid
* @param string $tip
* @return bool
*/
public
static
function
has
(
$uid
,
$tip
)
{
return
self
::
invoke
(
'/tip/has'
,
func_get_args
());
}
/**
* 设置指定键值为关闭
*
* @param int $uid
* @param string $tip
* @param string|int $valid 有效期,0代表永久有效
* 有效期支持三种格式<br>
* - 当天(自然天)有效,设置为 td 代表 this day,即过了今天失效<br>
* - 秒数,指定一个数字代表从当时往后的多少秒有效<br>
* - 混合标识,可用内置的一堆词组合时长,目前支持的有 ymwdhis(年月周日时分秒),如 1y1w2d3h 代表1年1周2天3小时,可自由组合<br>
* 如果传递了有效期不符合所有规定,则默认为8秒有效期
*/
public
static
function
set
(
$uid
,
$tip
,
$valid
=
0
)
{
self
::
invoke
(
'/tip/set'
,
func_get_args
());
}
/**
* 移除指定键的标记
*
* @param int|null $uid
* @param string $tip
*/
public
static
function
remove
(
$uid
,
$tip
)
{
self
::
invoke
(
'/tip/remove'
,
func_get_args
());
}
}
\ 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