|
@@ -775,6 +775,18 @@ class User extends Api
|
|
|
$this->error('修改资料失败');
|
|
|
}
|
|
|
|
|
|
+ //给上级发放钻石
|
|
|
+ if(isset($data['intro_uid'])){
|
|
|
+ $intro_jewel = config('site.new_user_intro_jewel');
|
|
|
+ if($intro_jewel > 0){
|
|
|
+ $rs_wallet = model('wallet')->lockChangeAccountRemain($data['intro_uid'], 0,'jewel',$intro_jewel,34,'邀请'.$this->auth->username.'注册奖励');
|
|
|
+ if($rs_wallet['status'] === false){
|
|
|
+ Db::rollback();
|
|
|
+ $this->error('邀请新人奖励赠送失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//tag任务赠送金币
|
|
|
//上传头像加5金币
|
|
|
if(isset($data['avatar'])){
|
|
@@ -1267,6 +1279,18 @@ class User extends Api
|
|
|
$this->error('修改失败');
|
|
|
}
|
|
|
|
|
|
+ //给上级发放钻石
|
|
|
+ if(isset($data['intro_uid'])){
|
|
|
+ $intro_jewel = config('site.new_user_intro_jewel');
|
|
|
+ if($intro_jewel > 0){
|
|
|
+ $rs_wallet = model('wallet')->lockChangeAccountRemain($data['intro_uid'], 0,'jewel',$intro_jewel,34,'邀请'.$this->auth->username.'注册奖励');
|
|
|
+ if($rs_wallet['status'] === false){
|
|
|
+ Db::rollback();
|
|
|
+ $this->error('邀请新人奖励赠送失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//上传头像加5金币
|
|
|
if(isset($data['avatar'])){
|
|
|
$task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,19);
|