Earnings/(loss) per share (Computation of Basic and Diluted Net Loss Per Share) (Details)
¥ / shares in Units, $ / shares in Units, ¥ in Thousands, $ in Thousands
12 Months Ended
Dec. 31, 2017
CNY (¥)
¥ / shares
shares
Dec. 31, 2017
USD ($)
$ / shares
shares
Dec. 31, 2016
CNY (¥)
¥ / shares
shares
Dec. 31, 2015
CNY (¥)
¥ / shares
shares
Numerator:        
Net income/(loss) ¥ 1,389,242 $ 212,612 ¥ (772,963) ¥ (1,648,583)
Add: Net loss/(income) attributable to noncontrolling interests (4,667) $ (714) 4,916 80,705
Less: Deemed dividend to mezzanine classified noncontrolling interests | ¥ (99,507)   (15,717) (5,762)
Numerator for basic and diluted net earnings/(loss) per share | ¥ ¥ 1,285,068   ¥ (783,764) ¥ (1,573,640)
Denominator:        
Weighted average number of ordinary shares used in computing net earnings/(loss) per share—basic | shares 291,475,725 291,475,725 286,975,068 234,811,986
Weighted average number of ordinary shares used in computing net earnings/(loss) per share—diluted | shares 295,304,995 295,304,995 286,975,068 234,811,986
Net earnings/(loss) per ordinary share attributable to ordinary shareholders - basic | (per share) ¥ 4.41 $ 0.67 ¥ (2.73) ¥ (6.7)
Net earnings/(loss) per ordinary share attributable to ordinary shareholders - diluted | (per share) 4.35 0.67 (2.73) (6.7)
Net earnings/(loss) per ADS attributable to ordinary shareholders-basic (1 ADS represents 2 ordinary shares) | (per share) 8.82 1.35 (5.46) (13.4)
Net earnings/(loss) per ADS attributable to ordinary shareholders -diluted (1 ADS represents 2 ordinary shares) | (per share) ¥ 8.7 $ 1.33 ¥ (5.46) ¥ (13.4)