| | |
| | | 'getUserInfo' => array( |
| | | 'phone' => array('name' => 'phone', 'type' => 'string', 'require' => true, 'desc' => '用户电话'), |
| | | ), |
| | | 'resetPwd' => array( |
| | | 'phone' => array('name' => 'phone', 'type' => 'string', 'require' => true, 'desc' => '用户电话'), |
| | | 'password' => array('name' => 'password', 'type' => 'string', 'require' => true, 'desc' => '密码'), |
| | | ) |
| | | ); |
| | | } |
| | | |
| | |
| | | */ |
| | | public function getUserInfo(){ |
| | | $rs = array('code' => 0, 'msg' => '', 'info' => array()); |
| | | |
| | | $user_service = new Domain_User(); |
| | | $user = $user_service->getUserInfoByPhone($this->phone); |
| | | |
| | |
| | | return $rs; |
| | | } |
| | | |
| | | /** |
| | | * 重置密码 |
| | | * @desc 重置密码 |
| | | * @return bool code 操作码,0表示成功, 1表示失败 |
| | | * @return string msg 返回提示 |
| | | */ |
| | | public function resetPwd(){ |
| | | $rs = array('code' => 0, 'msg' => ''); |
| | | $user_service = new Domain_User(); |
| | | $result = $user_service->resetPwd($this->phone, $this->password); |
| | | if($reslt == 0){ |
| | | $rs['msg'] = '密码重置成功'; |
| | | } |
| | | elseif($result == 1){ |
| | | $rs['code'] = 1; |
| | | $rs['msg'] = '用户不存在或已禁用'; |
| | | } |
| | | else{ |
| | | $rs['code'] = 1; |
| | | $rs['msg'] = '密码重置失败'; |
| | | } |
| | | |
| | | return $rs; |
| | | } |
| | | |
| | | } |