$pwdData['password'], 'encryption' => $pwdData['encryption']]; $this->where('account_identity', $identity)->update($data); } //检测密码 function checkPassword($account_identity,$password){ $pwd=trim($password); if(empty($pwd)){ return -1010010122; } $userInfo=$this->where('account_identity',$account_identity)->first(); if(trim($userInfo->account_password)!=md5(md5($userInfo->encryption.$pwd))){ return -1010010222; } return 1; } //更新 function updateData($data,$account_identity){ $res=$this->where('account_identity',$account_identity)->update($data); if(!$res){ return -1050050122;//修改失败 } return 1; } }