Browse Source

邀请新人注册,获得奖励金币改成余额

lizhen_gitee 1 năm trước cách đây
mục cha
commit
15b218389e

+ 3 - 3
application/api/controller/User.php

@@ -431,9 +431,9 @@ class User extends Api
 
             //邀请用户注册,给邀请人奖励
             if(isset($data['intro_uid']) && !empty($data['intro_uid'])){
-                $intro_gold = config('site.intro_newuser_gift_goldnum') ?: 0;
-                if($intro_gold > 0){
-                    $wallet_rs = model('wallet')->lockChangeAccountRemain($data['intro_uid'],'gold',$intro_gold,63,'邀请'.$this->auth->username);
+                $intro_money = config('site.intro_newuser_gift_moneynum') ?: 0;
+                if($intro_money > 0){
+                    $wallet_rs = model('wallet')->lockChangeAccountRemain($data['intro_uid'],'money',$intro_money,63,'邀请'.$this->auth->username);
                     if($wallet_rs['status'] === false){
                         Db::rollback();
                         $this->setError($wallet_rs['msg']);

+ 0 - 12
application/common/library/Auth.php

@@ -267,18 +267,6 @@ class Auth
             //注册用户权限
             Db::name('user_power')->insertGetId(['user_id'=>$user->id]);
 
-            //邀请用户注册,给邀请人奖励
-            if(isset($extend['intro_uid']) && !empty($extend['intro_uid'])){
-                $intro_gold = config('site.intro_newuser_gift_goldnum') ?: 0;
-                if($intro_gold > 0){
-                    $wallet_rs = model('wallet')->lockChangeAccountRemain($extend['intro_uid'],'gold',$intro_gold,63,'邀请'.$this->_user->username);
-                    if($wallet_rs['status'] === false){
-                        Db::rollback();
-                        $this->setError($wallet_rs['msg']);
-                        return false;
-                    }
-                }
-            }
 
             //注册成功的事件
             Hook::listen("user_register_successed", $this->_user, $data);

+ 1 - 1
application/extra/site.php

@@ -68,7 +68,7 @@ return array (
 2、每个提现额度,每日可提现3次
 3、提现扣除手续费1%
 4、相关额度会在1个工作日内审核发放,请注意查收',
-  'intro_newuser_gift_goldnum' => '5',
+  'intro_newuser_gift_moneynum' => '5',
   'android_is_force' => '1',
   'android_apkUrl' => 'https://oss.tken.vip/apk/app-release.apk',
   'android_apkName' => 'TKEN1.0.6',

+ 1 - 1
application/extra/wallet.php

@@ -27,7 +27,7 @@ return [
 
 
         61 => '完成个人任务',//gold +
-        63 => '邀请注册奖励',//gold +
+        63 => '邀请注册奖励',//money +
 
     ],
     'moneyname' => [