Commit 3b8137c4 authored by jianglin's avatar jianglin

Merge remote-tracking branch 'origin/master'

parents f1d1f52e 495f9e22
......@@ -11,7 +11,7 @@ use internalApi\bbs\Task;
require __DIR__.'/_init.php';
Credit::setDebug(true);
//Credit::setDebug(true);
Task::setDebug(true);
//$kk = Credit::updateExp(12, 1, '', 0, '测试加分RuleText', '测试加分Title', '测试加分Memo');
......@@ -19,4 +19,9 @@ Task::setDebug(true);
//$kk = Credit::updateExp(12, 1, 'watch_video', 15, '测试加分RuleText', '测试加分Title', '看视频');
//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
......@@ -23,7 +23,7 @@ class Credit extends Client
* @param string $ruletxt 提醒文字,默认为空即可
* @param string $customtitle 记录标题
* @param string $custommemo 记录备注
* @return bool
* @return bool 返回 false 代表更新失败,否则视为成功
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
*/
public static function updateCoin($ucid, $paycredits, $operation = '', $relatedid = 0, $ruletxt = '', $customtitle = '', $custommemo = '')
......@@ -41,7 +41,7 @@ class Credit extends Client
* @param string $ruletxt 提醒文字,默认为空即可
* @param string $customtitle 记录标题
* @param string $custommemo 记录备注
* @return bool
* @return bool 返回 false 代表更新失败,否则视为成功
* @throws \internalApi\base\ApiException|\internalApi\base\ClientException
*/
public static function updateExp($ucid, $paycredits, $operation = '', $relatedid = 0, $ruletxt = '', $customtitle = '', $custommemo = '')
......
......@@ -15,4 +15,5 @@ class MemberRedpack extends Client
{
return self::call('memberRedpack.firstRedpack',compact('userId'));
}
}
\ No newline at end of file
<?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
......@@ -38,4 +38,5 @@ class Timeline extends Client
{
return self::call('Timeline.removeTimeline', compact('key'));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment