The mayor got his press conference, the union chief got his revenge — and the city’s schoolchildren got nothing.

Last week’s press conference celebrating the new teachers’ contract was full of smiles and hugs — but very few details. Now we’re getting them, and now we know: The contract is a sweetheart deal for the United Federation of Teachers.

Union boss Mike Mulgrew went to his delegates on Wednesday and ’fessed up to his goal: revenge.

He admitted his intention to “gum up the works” and undermine teacher evaluation so that it would be harder to identify and reward great teachers and improve low performing ones.

He wanted a pilot program for innovative schools, but only as a way to undermine the good work that charter schools are doing. “We are at war with the reformers,” he warned his members.

And he wanted to slap ex-Mayor Michael Bloomberg. “By working with this mayor,” the UFT chief said, “we have come up with a creative way to one more time wink at Bloomberg and say, ‘Gotcha.’”

The stark differences between the flowery rhetoric of the press conference and the actual substance of the deal raise real questions about Mayor de Blasio’s intentions. The city gave considerable raises without getting much in return.

Increasing teacher pay is worthwhile, but a nine-year deal with pay hikes totaling 18 percent should come with union concessions that improve the quality of classroom instruction and help turn around failing schools.

Management entered the talks with a strong bargaining position yet it wound up paying significantly more while giving employees the right to work less: The contract reduces instructional time for children by 2½ hours a week.

This, when research shows that the 300 hours a year of added instructional time (combined with high-dosage tutoring) are two of the strongest predictors of success in New York City charter schools.

And this contract is a bad deal for kids in other ways:

Despite claims that the contract would make it easier to remove bad teachers from the system, the fine print tells us the opposite: Ineffective teachers from the Absent Teacher Reserve are headed back into the classroom. And, according to a leaked e-mail from Mulgrew to teachers now in the ATR, they’ll continue to have indefinite job rights and many of them won’t even be subject to the expedited termination process.

Bonuses for serving at failing, “hard-to-staff” schools will go to teachers who are not effective. The contract language clearly states that teachers who are rated as “developing” — that is, who are getting help in hopes they become effective — will qualify for the bonuses.

For all the mayor’s talk of encouraging innovation, the new PROSE schools turn out to be nothing more than a repackaged version of the decades-old policy that allows School Based Options. PROSE schools aren’t free from the most restrictive parts of the union contract: They can’t make changes to how they attract and retain teachers through compensation, they can’t adjust class size to adapt to new models or to afford added teachers in other subjects, they can’t exit low-performing teachers and they can’t keep their highest performers if they need to reduce positions.

The contract waters down the rigorous teacher-evaluation system that the union had previously agreed to. The deal replaces independent validators of teacher-evaluation observations with “peer validators” appointed jointly by the union and Department of Education. The union’s role in picking them will give these evaluators strong (and perverse) incentives to keep low-performing teachers in the classroom. It’s one more sweetheart gift to the union at the expense of classroom instruction.

After last week’s press conference hit the right themes, we hoped that the contract was at least a step in the right direction. The details tell us otherwise: This contract is a lost opportunity that fails New York City students.

It’s disappointing that a mayor who has spent so much time talking about fighting inequality would agree to a contract that delivers so little for the children he swore to represent.