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
c67c7329
Commit
c67c7329
authored
Oct 25, 2018
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加触发任务接口
parent
69f0bd63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletion
+39
-1
bbs_credit.php
example/bbs_credit.php
+5
-1
Task.php
src/bbs/Task.php
+34
-0
No files found.
example/bbs_credit.php
View file @
c67c7329
...
...
@@ -7,12 +7,16 @@
*/
use
internalApi\bbs\Credit
;
use
internalApi\bbs\Task
;
require
__DIR__
.
'/_init.php'
;
Credit
::
setDebug
(
true
);
Task
::
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', '看视频');
Credit
::
updateCreditByAction
(
'reply'
,
12
);
\ No newline at end of file
//Credit::updateCreditByAction('reply', 12);
Task
::
trigger
(
'wxh_medal_task:share'
,
12
);
src/bbs/Task.php
0 → 100644
View file @
c67c7329
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2018/10/25
* Time: 18:39
*/
namespace
internalApi\bbs
;
use
internalApi\base\Client
;
class
Task
extends
Client
{
/**
* 触发及检查任务完成状态
*
* @param string $scriptName 任务脚本名称
* @param int $uid
* @param bool $autoApply 未申请的任务是否自动申请
* @return bool
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
*/
public
static
function
trigger
(
$scriptName
,
$uid
,
$autoApply
=
false
)
{
return
self
::
call
(
'task.trigger'
,
[
'scriptname'
=>
$scriptName
,
'ucid'
=>
$uid
,
'autoApply'
=>
$autoApply
]);
}
}
\ 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