China’s capital imposes major new restrictions in a bid to curb a spike in cases.