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); + } + } /** * 注销 */