From fd55825f523abbfb2aa3df79ca8955227397180f Mon Sep 17 00:00:00 2001 From: JerryYan <792602257@qq.com> Date: Sat, 22 Aug 2020 21:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E6=AC=BE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hyhproject/app/controller/Users.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hyhproject/app/controller/Users.php b/hyhproject/app/controller/Users.php index cdd074c..e061074 100755 --- a/hyhproject/app/controller/Users.php +++ b/hyhproject/app/controller/Users.php @@ -840,6 +840,29 @@ public function forgetPasss(){ return $m->getShareInfo(); } + + public function setting_recive() { + $userId = $this->getUserId(); + if ($this->request->isPost()) { + $data = [ + 'realname'=>input('post.realname'), + 'bankName'=>input('post.bankName'), + 'bankNo'=>input('post.bankNo'), + 'alipayRecive'=>input('post.alipayRecive'), + 'wechatRecive'=>input('post.wechatRecive'), + ]; + if(Db::name('user_recive')->where('userId', '=', $userId)->count() > 0) { + Db::name('user_recive')->where('userId', '=', $userId)->update($data); + } else { + $data['userId'] = $userId; + Db::name('user_recive')->insert($data); + } + return WSTReturn("成功", 1, $data); + } else { + $data = Db::name('user_recive')->where('userId', '=', $userId)->find(); + return WSTReturn("成功", 1, $data); + } + } /** * 注销 */