This commit is contained in:
Your Name
2026-05-29 09:28:27 +08:00
parent 0f974be7a1
commit 7b46204454
7 changed files with 1037 additions and 39 deletions
+7 -3
View File
@@ -255,10 +255,14 @@ class UserLogic extends BaseLogic
}
// 绑定手机号
User::update([
$update = [
'id' => $params['user_id'],
'mobile' => $phoneNumber
]);
'mobile' => $phoneNumber,
];
if (isset($params['sex']) && in_array((int) $params['sex'], [1, 2], true)) {
$update['sex'] = (int) $params['sex'];
}
User::update($update);
return true;
} catch (\Exception $e) {