|
@@ -16,39 +16,7 @@ class Userauth extends Api
|
|
|
protected $noNeedRight = '*';
|
|
|
|
|
|
|
|
|
- //申请真人认证,留着写任务用
|
|
|
- public function apply_real_confirm(){
|
|
|
|
|
|
- Db::startTrans();
|
|
|
-
|
|
|
- //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,'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_info(){
|
|
@@ -129,6 +97,17 @@ class Userauth extends Api
|
|
|
$rs = Db::name('user_idconfirm')->insertGetId($data);
|
|
|
}
|
|
|
|
|
|
+ //tag任务赠送金币
|
|
|
+ //完成本人基本资料 +15金币《所有资料完善,包括真人认证和实名认证》
|
|
|
+ $task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,4);
|
|
|
+ if($task_rs === false){
|
|
|
+ Db::rollback();
|
|
|
+ $this->error('完成任务赠送奖励失败');
|
|
|
+ }
|
|
|
+
|
|
|
+ //系统消息
|
|
|
+ $msg_id = \app\common\model\Message::addMessage($this->auth->id,'实名认证','实名认证已经审核通过');
|
|
|
+
|
|
|
if(!$rs || !$update_rs){
|
|
|
Db::rollback();
|
|
|
$this->error('提交失败');
|