//去除掉密码
$db = new UserModel();
$result = $db->field('password',true)->where("username='{$params['username']}' AND password='{$params['password']}'")->find();
或者指定要的字段的数组
$db = new UserModel();
$result = $db->field(['username','create_time'])->where("username='{$params['username']}' AND password='{$params['password']}'")->find();