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
69f0bd63
Commit
69f0bd63
authored
Oct 24, 2018
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加积分相关接口
parent
82a24101
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
bbs_credit.php
example/bbs_credit.php
+2
-3
Credit.php
src/bbs/Credit.php
+39
-0
No files found.
example/bbs_credit.php
View file @
69f0bd63
...
...
@@ -14,6 +14,5 @@ Credit::setDebug(true);
//$kk = Credit::updateExp(12, 1, '', 0, '测试加分RuleText', '测试加分Title', '测试加分Memo');
//$kk = Credit::updateCoin(12, 1, '', 0, '测试加分RuleText', '测试加分Title', '测试加分Memo');
$kk
=
Credit
::
updateExp
(
12
,
1
,
'watch_video'
,
15
,
'测试加分RuleText'
,
'测试加分Title'
,
'看视频'
);
//
//$kk = Credit::updateExp(12, 1, 'watch_video', 15, '测试加分RuleText', '测试加分Title', '看视频');
Credit
::
updateCreditByAction
(
'reply'
,
12
);
\ No newline at end of file
src/bbs/Credit.php
View file @
69f0bd63
...
...
@@ -13,14 +13,53 @@ use internalApi\base\Client;
class
Credit
extends
Client
{
/**
* 更新扳手币
*
* @param int $ucid 用户中心UID
* @param int $paycredits 扳手币更新数量,正数为加,负数为减
* @param string $operation 操作标识,三位字符串,请在论坛中进行定义,否则保留为空
* @param int $relatedid 对应操作标识的ID
* @param string $ruletxt 提醒文字,默认为空即可
* @param string $customtitle 记录标题
* @param string $custommemo 记录备注
* @return bool
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
*/
public
static
function
updateCoin
(
$ucid
,
$paycredits
,
$operation
=
''
,
$relatedid
=
0
,
$ruletxt
=
''
,
$customtitle
=
''
,
$custommemo
=
''
)
{
return
self
::
call
(
'credit.updateCoin'
,
compact
(
'ucid'
,
'paycredits'
,
'operation'
,
'relatedid'
,
'ruletxt'
,
'customtitle'
,
'custommemo'
));
}
/**
* 更新扳手值
*
* @param int $ucid 用户中心UID
* @param int $paycredits 扳手值更新数量,正数为加,负数为减
* @param string $operation 操作标识,三位字符串,请在论坛中进行定义,否则保留为空
* @param int $relatedid 对应操作标识的ID
* @param string $ruletxt 提醒文字,默认为空即可
* @param string $customtitle 记录标题
* @param string $custommemo 记录备注
* @return bool
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
*/
public
static
function
updateExp
(
$ucid
,
$paycredits
,
$operation
=
''
,
$relatedid
=
0
,
$ruletxt
=
''
,
$customtitle
=
''
,
$custommemo
=
''
)
{
return
self
::
call
(
'credit.updateExp'
,
compact
(
'ucid'
,
'paycredits'
,
'operation'
,
'relatedid'
,
'ruletxt'
,
'customtitle'
,
'custommemo'
));
}
/**
* 执行积分策略
*
* @param string $action 策略标识
* @param int $uid 执行策略的用户
* @return bool
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
*/
public
static
function
updateCreditByAction
(
$action
,
$uid
)
{
return
self
::
call
(
'credit.updateCreditByAction'
,
[
'action'
=>
$action
,
'ucid'
=>
$uid
]);
}
}
\ 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