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
3b8137c4
Commit
3b8137c4
authored
Dec 11, 2018
by
jianglin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
f1d1f52e
495f9e22
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
4 deletions
+70
-4
bbs_credit.php
example/bbs_credit.php
+7
-2
Credit.php
src/bbs/Credit.php
+2
-2
MemberRedpack.php
src/ucenter/MemberRedpack.php
+1
-0
Notice.php
src/ucenter/Notice.php
+59
-0
Timeline.php
src/ucenter/Timeline.php
+1
-0
No files found.
example/bbs_credit.php
View file @
3b8137c4
...
@@ -11,7 +11,7 @@ use internalApi\bbs\Task;
...
@@ -11,7 +11,7 @@ use internalApi\bbs\Task;
require
__DIR__
.
'/_init.php'
;
require
__DIR__
.
'/_init.php'
;
Credit
::
setDebug
(
true
);
//
Credit::setDebug(true);
Task
::
setDebug
(
true
);
Task
::
setDebug
(
true
);
//$kk = Credit::updateExp(12, 1, '', 0, '测试加分RuleText', '测试加分Title', '测试加分Memo');
//$kk = Credit::updateExp(12, 1, '', 0, '测试加分RuleText', '测试加分Title', '测试加分Memo');
...
@@ -19,4 +19,9 @@ Task::setDebug(true);
...
@@ -19,4 +19,9 @@ Task::setDebug(true);
//$kk = Credit::updateExp(12, 1, 'watch_video', 15, '测试加分RuleText', '测试加分Title', '看视频');
//$kk = Credit::updateExp(12, 1, 'watch_video', 15, '测试加分RuleText', '测试加分Title', '看视频');
//Credit::updateCreditByAction('reply', 12);
//Credit::updateCreditByAction('reply', 12);
Task
::
trigger
(
'wxh_medal_task:share'
,
12
);
$ret
=
Credit
::
updateCoin
(
12
,
10
,
''
,
0
,
''
,
'抽奖奖励扳手币'
,
'抽奖奖励扳手币'
);
var_dump
(
$ret
);
//$ret = Task::trigger('wxh_medal_task:share', 12);
//var_dump($ret);
\ No newline at end of file
src/bbs/Credit.php
View file @
3b8137c4
...
@@ -23,7 +23,7 @@ class Credit extends Client
...
@@ -23,7 +23,7 @@ class Credit extends Client
* @param string $ruletxt 提醒文字,默认为空即可
* @param string $ruletxt 提醒文字,默认为空即可
* @param string $customtitle 记录标题
* @param string $customtitle 记录标题
* @param string $custommemo 记录备注
* @param string $custommemo 记录备注
* @return bool
* @return bool
返回 false 代表更新失败,否则视为成功
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
*/
*/
public
static
function
updateCoin
(
$ucid
,
$paycredits
,
$operation
=
''
,
$relatedid
=
0
,
$ruletxt
=
''
,
$customtitle
=
''
,
$custommemo
=
''
)
public
static
function
updateCoin
(
$ucid
,
$paycredits
,
$operation
=
''
,
$relatedid
=
0
,
$ruletxt
=
''
,
$customtitle
=
''
,
$custommemo
=
''
)
...
@@ -41,7 +41,7 @@ class Credit extends Client
...
@@ -41,7 +41,7 @@ class Credit extends Client
* @param string $ruletxt 提醒文字,默认为空即可
* @param string $ruletxt 提醒文字,默认为空即可
* @param string $customtitle 记录标题
* @param string $customtitle 记录标题
* @param string $custommemo 记录备注
* @param string $custommemo 记录备注
* @return bool
* @return bool
返回 false 代表更新失败,否则视为成功
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
*/
*/
public
static
function
updateExp
(
$ucid
,
$paycredits
,
$operation
=
''
,
$relatedid
=
0
,
$ruletxt
=
''
,
$customtitle
=
''
,
$custommemo
=
''
)
public
static
function
updateExp
(
$ucid
,
$paycredits
,
$operation
=
''
,
$relatedid
=
0
,
$ruletxt
=
''
,
$customtitle
=
''
,
$custommemo
=
''
)
...
...
src/ucenter/MemberRedpack.php
View file @
3b8137c4
...
@@ -15,4 +15,5 @@ class MemberRedpack extends Client
...
@@ -15,4 +15,5 @@ class MemberRedpack extends Client
{
{
return
self
::
call
(
'memberRedpack.firstRedpack'
,
compact
(
'userId'
));
return
self
::
call
(
'memberRedpack.firstRedpack'
,
compact
(
'userId'
));
}
}
}
}
\ No newline at end of file
src/ucenter/Notice.php
0 → 100644
View file @
3b8137c4
<?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
src/ucenter/Timeline.php
View file @
3b8137c4
...
@@ -38,4 +38,5 @@ class Timeline extends Client
...
@@ -38,4 +38,5 @@ class Timeline extends Client
{
{
return
self
::
call
(
'Timeline.removeTimeline'
,
compact
(
'key'
));
return
self
::
call
(
'Timeline.removeTimeline'
,
compact
(
'key'
));
}
}
}
}
\ 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