From dc5eba281e9bce35a1c870aed738b987e466db68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 13 Jan 2026 15:04:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=AE=9E=E5=90=8D=20?= =?UTF-8?q?=E5=92=8C=20cp=E5=9B=9E=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/UserCp.php | 8 ++------ application/api/model/Login.php | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/application/api/controller/UserCp.php b/application/api/controller/UserCp.php index d7ed72d9..426b4538 100644 --- a/application/api/controller/UserCp.php +++ b/application/api/controller/UserCp.php @@ -13,12 +13,8 @@ class UserCp extends BaseCom $user_id = input('user_id', 0); $gift_id = input('gift_id', 0); $room_id = input('room_id', 0); - if($room_id){ - $from_type = 2; - }else{ - $from_type = 1; - } - $reslut = model('GiveGift')->give_gift($this->uid, $user_id, $gift_id, 1,$from_type,1,$room_id); + + $reslut = model('SendGift')->send_gift($this->uid, $user_id, $gift_id, 1,1,$room_id); return V($reslut['code'], $reslut['msg'], $reslut['data']); } diff --git a/application/api/model/Login.php b/application/api/model/Login.php index 2a5714b4..d21e5850 100644 --- a/application/api/model/Login.php +++ b/application/api/model/Login.php @@ -71,19 +71,18 @@ class Login extends Model } //预测版块 上线前注释掉 ======👇====== - //虚拟实名 - $data_auth['mobile'] = $user_name; - $data_auth['real_name'] = '游客'.$user_code; - //随机生成后六位 - $idcard_last = rand(100000,999999); - $data_auth['card_id'] = '110101199001'.$idcard_last; - $data_auth['is_real'] = 1; - $res = db::name('user_auth')->insert($data_auth); - + if($user_name){ + //虚拟实名 + $data_auth['mobile'] = $user_name; + $data_auth['real_name'] = '游客'.$user_code; + //随机生成后六位 + $idcard_last = rand(100000,999999); + $data_auth['card_id'] = '110101199001'.$idcard_last; + $data_auth['is_real'] = 1; + $res = db::name('user_auth')->insert($data_auth); + } //预测版块 上线前注释掉======👆====== - - //注册即奖励金币【完成任务】 model('DailyTasks')->tasks_complete($user_id,11);