The country’s leading financial center, Shanghai, has taken up new virus measures as COVID-19 cases rise.