Property and equipment, net (Details)
¥ in Thousands, $ in Thousands
12 Months Ended
Dec. 31, 2017
CNY (¥)
Dec. 31, 2016
CNY (¥)
Dec. 31, 2015
CNY (¥)
Dec. 31, 2017
USD ($)
Property, Plant and Equipment [Line Items]        
Total ¥ 1,846,506 ¥ 1,840,250    
Less: Accumulated depreciation (494,825) (359,329)    
Net book value 1,351,681 1,480,921   $ 206,863
Depreciation expenses 211,200 175,600 ¥ 91,500  
Buildings [Member]        
Property, Plant and Equipment [Line Items]        
Total 1,172,239 1,172,236    
Computers and equipment [Member]        
Property, Plant and Equipment [Line Items]        
Total 466,595 463,461    
Motor vehicles [Member]        
Property, Plant and Equipment [Line Items]        
Total 6,356 7,173    
Furniture and fixtures [Member]        
Property, Plant and Equipment [Line Items]        
Total 20,254 19,008    
Leasehold improvements [Member]        
Property, Plant and Equipment [Line Items]        
Total 142,827 138,463    
Software [Member]        
Property, Plant and Equipment [Line Items]        
Total ¥ 38,235 ¥ 39,909