From 5e798e7f05005fb0869c1cf30a4538e4f49644b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Fri, 15 Aug 2025 15:58:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=9B=B4=E6=8D=A2=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/UserData.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/api/model/UserData.php b/application/api/model/UserData.php index 5b60a02..4fe278b 100644 --- a/application/api/model/UserData.php +++ b/application/api/model/UserData.php @@ -260,7 +260,7 @@ class UserData extends Model db::startTrans(); //修改实名手机号 $red = db::name('user_auth')->where(['id' => $is_real['id']])->update(['mobile' => $new_mobile]); - $reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile]); + $reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile,'mobile' => $new_mobile]); if ($reslut && $red) { Db::commit(); return ['code' => 1, 'msg' => '修改成功','data' =>null]; @@ -269,7 +269,7 @@ class UserData extends Model return ['code' => 0, 'msg' => '修改失败','data' =>null]; } }else{ - $reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile]); + $reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile,'mobile' => $new_mobile]); if ($reslut) { return ['code' => 1, 'msg' => '修改成功','data' =>null]; }