|
@@ -15,6 +15,7 @@ use bonus_helper;
|
|
|
use member_info;
|
|
|
use Log;
|
|
|
use Exception;
|
|
|
+use account_helper;
|
|
|
|
|
|
class register extends IAsync
|
|
|
{
|
|
@@ -146,24 +147,28 @@ class register extends IAsync
|
|
|
|
|
|
private function reward_user()
|
|
|
{
|
|
|
- if($this->last_inviter > 0) {
|
|
|
+ if($this->last_inviter > 0)
|
|
|
+ {
|
|
|
$params = bonus\parameters::user_reigster_fixed();
|
|
|
- } else {
|
|
|
- $item = bonus\parameters::invite(0);
|
|
|
- $params[] = $item;
|
|
|
+ foreach ($params as $param) {
|
|
|
+ $type = bonus_helper::create_type_input($param);
|
|
|
+ $money = $type->getTotal_amount();
|
|
|
+ $ret = bonus_helper::make_bonus($param, $param['rate_money']);
|
|
|
+
|
|
|
+ if ($ret != false) {
|
|
|
+ $type_sn = $ret['type_sn'];
|
|
|
+ bonus_helper::send($type_sn, [$this->cur_user]);
|
|
|
+ push_helper::register_bonus($this->cur_user, $money, $type_sn);
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- foreach ($params as $param) {
|
|
|
- $type = bonus_helper::create_type_input($param);
|
|
|
- $money = $type->getTotal_amount();
|
|
|
- $ret = bonus_helper::make_bonus($param, $param['rate_money']);
|
|
|
-
|
|
|
- if ($ret != false) {
|
|
|
- $type_sn = $ret['type_sn'];
|
|
|
+ else {
|
|
|
+ $type_sn = account_helper::invite_bonus(0);
|
|
|
+ if($type_sn != false) {
|
|
|
bonus_helper::send($type_sn, [$this->cur_user]);
|
|
|
- push_helper::register_bonus($this->cur_user, $money, $type_sn);
|
|
|
- } else {
|
|
|
- return false;
|
|
|
+ push_helper::register_bonus($this->cur_user, 100, $type_sn);
|
|
|
}
|
|
|
}
|
|
|
|