The novel coronavirus, named SARS-Cov-2, has raged in mainland China for more than three months, and it causes a huge threat to people's health and economic development. In order to curb the SARS-Cov-2 prevalence, the Chinese government enacted a series of containment strategies including household quarantine, traffic restriction, city lockdowns etc. Indeed, the pandemic has been effectively mitigated, but the global transmission is not still optimistic. Evaluating such control measures in detail plays an important role in limiting SARS-Cov-2 spread for public health decision and policymakers. In this paper, based on the cumulative numbers of confirmed cases and deaths of SARS-Cov-2 infection, from January 31st to March 31st, announced by the National Health Commission of the People's Republic of China, we established a mean-field model, considering the substantial contact change under some restrictive measures, to study the dynamics of SARS-Cov-2 infection in mainland China. By the Metropolis-Hastings (M-H) algorithm of Markov Chain Monte Carlo numerical method, our model provided a good fitting to the overall trends of SARS-Cov-2 infections and discovers the transmission heterogeneities by some extreme containment strategies to some extent. The basic reproduction number was approximated to be 2.05 (95% CI [1.35,2.87]); the hospitalized cases arrived at the peak of 29766 (95% CI [29743,29868]) on February 7th (95% CI [Feb.6th, Feb.8th]). Importantly, we identified that the highest risk group of SARS-Cov-2 was the family of four, which has the biggest probability of degree distributions at such node, suggesting that contact patterns play an important role in curtailing the disease spread.