|
@@ -572,21 +572,7 @@ class User extends Api
|
|
|
$this->success(__('success'),$info);
|
|
|
}
|
|
|
|
|
|
- //用户邀请信息
|
|
|
- public function userintroinfo(){
|
|
|
- $intro_num = Db::name('user')->where('intro_uid',$this->auth->id)->count();
|
|
|
- $money_sum = Db::name('user_money_log')->where(['user_id'=>$this->auth->id,'log_type'=>63])->sum('change_value');
|
|
|
-
|
|
|
- $user_list = Db::name('user')->field('id,avatar,nickname,createtime')->where('intro_uid',$this->auth->id)->autopage()->select();
|
|
|
-
|
|
|
- $rs = [
|
|
|
- 'intro_num' => $intro_num,
|
|
|
- 'money_sum' => $money_sum,
|
|
|
- 'user_list' => $user_list,
|
|
|
- ];
|
|
|
-
|
|
|
- $this->success('success',$rs);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
public function testhaibao(){
|
|
|
$haibao = $this->haibao($this->auth->id,['introcode'=>$this->auth->introcode]);
|
|
@@ -706,52 +692,7 @@ class User extends Api
|
|
|
}
|
|
|
|
|
|
|
|
|
- //申请真人认证
|
|
|
- public function apply_real_confirm(){
|
|
|
- $avatar = input('avatar', '', 'trim,strip_tags,htmlspecialchars');
|
|
|
- if(!$avatar){
|
|
|
- $this->error('请上传真人头像');
|
|
|
- }
|
|
|
-
|
|
|
- Db::startTrans();
|
|
|
-
|
|
|
- $data = [
|
|
|
- 'avatar' => $avatar,
|
|
|
- 'real_status' => 1,
|
|
|
- ];
|
|
|
- $rs = Db::name('user')->where('id',$this->auth->id)->update($data);
|
|
|
- if($rs === false){
|
|
|
- Db::rollback();
|
|
|
- $this->error('认证失败');
|
|
|
- }
|
|
|
- //tag任务赠送金币
|
|
|
- //完成本人基本资料 +15金币《所有资料完善,包括真人认证和实名认证》
|
|
|
- $task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,5);
|
|
|
- if($task_rs === false){
|
|
|
- Db::rollback();
|
|
|
- $this->error('完成任务赠送奖励失败');
|
|
|
- }
|
|
|
- //完成真人头像 +5金币
|
|
|
- $task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,7);
|
|
|
- if($task_rs === false){
|
|
|
- Db::rollback();
|
|
|
- $this->error('完成任务赠送奖励失败');
|
|
|
- }
|
|
|
- //邀请人拿奖励,男性3元
|
|
|
- $intro_money = $this->auth->gender == 1 ? config('site.intro_man_money') : config('site.intro_woman_money');
|
|
|
- if($this->auth->idcard_status == 1 && !empty($this->auth->intro_uid) && $intro_money > 0){
|
|
|
- $task_rs = model('wallet')->lockChangeAccountRemain($this->auth->intro_uid,$this->auth->id,'money',$intro_money,63,$remark='邀请人拿奖励');
|
|
|
- if($task_rs['status'] === false){
|
|
|
- Db::rollback();
|
|
|
- $this->error($task_rs['msg']);
|
|
|
- }
|
|
|
- }
|
|
|
- //系统消息
|
|
|
- $msg_id = \app\common\model\Message::addMessage($this->auth->id,'真人认证','真人认证已经审核通过');
|
|
|
|
|
|
- Db::commit();
|
|
|
- $this->success();
|
|
|
- }
|
|
|
|
|
|
//实名认证信息
|
|
|
public function idcard_confirm_info(){
|