China’s most populous megacity is tightening up public control. In Shanghai, anyone who stays in the city for more than 24 hours must report to authorities. Experts believe Shanghai is being used as a pilot city—and that the measures may spread to other big cities.