protected function checkPassword($password, $rule, $data)
{
$email = $data[‘email’];
$user = new User();
$passwordHash = $user->getFieldByEmail($email, ‘password’);
return (!Str::checkPassword(md5($password), $passwordHash)) ? ‘账户信息错误’ : true;
}
// 检验密码
public static function checkPassword($password, $passwordHash)
{
return password_verify(md5($password), $passwordHash);
}
去掉Str::checkPassword(md5($password), $passwordHash) 中的md5() 接口失败