From 77f4ecfcdf694c04afff405ef998206069728693 Mon Sep 17 00:00:00 2001 From: limu <610543851@qq.com> Date: Fri, 19 Jan 2024 17:28:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E4=BA=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/User.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/controller/api/user/User.php b/app/controller/api/user/User.php index 4dbbf0d..f6d0c6b 100644 --- a/app/controller/api/user/User.php +++ b/app/controller/api/user/User.php @@ -360,6 +360,7 @@ class User extends BaseController $card = $this->request->param('card') ?? ''; $spread_phone = $this->request->param('spread_phone') ?? ''; $real_name = $this->request->param('real_name') ?? ''; + $spread_uid2 = $this->request->param('spread_uid2') ?? ''; $user = userModel::getDB()->where('uid',$this->user->uid)->find(); if(!empty($age)){ @@ -378,10 +379,17 @@ class User extends BaseController if(!empty($spread_phone)){ $a = userModel::getDB()->where('phone',$spread_phone)->find(); if(!$a){ - return app('json')->fail('查无此推荐人'); + return app('json')->fail('查无此辅导员'); } $user->spread_uid = $a->uid; } + if(!empty($spread_uid2)){ + $a = userModel::getDB()->where('uid',$spread_uid2)->find(); + if(!$a){ + return app('json')->fail('查无此推荐人'); + } + $user->spread_uid2 = $spread_uid2; + } $user->save(); return app('json')->success('更新成功');