Share-Based Compensation - Additional Information (Detail)
$ / shares in Units, ¥ in Thousands, $ in Thousands
12 Months Ended
Dec. 31, 2017
CNY (¥)
shares
Dec. 31, 2017
USD ($)
$ / shares
Dec. 31, 2016
CNY (¥)
Dec. 31, 2016
$ / shares
Nov. 30, 2016
CNY (¥)
Dec. 31, 2015
CNY (¥)
Dec. 31, 2015
$ / shares
Dec. 31, 2017
USD ($)
shares
Dec. 29, 2017
$ / shares
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Closing stock price | $ / shares                 $ 64.67
Aggregate intrinsic value of options exercised ¥ 257,025 $ 39,504 ¥ 246,754     ¥ 623,605      
Weighted average fair value per option granted | $ / shares   $ 30.23   $ 14.62     $ 0.00    
The total grant date fair value of options vested 64,334 $ 9,888 25,168     37,582      
Aggregate fair value of outstanding options at the grant date 203,146             $ 31,223  
Unrecognized share-based compensation expenses ¥ 148,513             $ 22,826  
Incremental compensation cost | ¥         ¥ 53,896        
Maximum [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Weighted average fair value per option granted | $ / shares   $ 33.73   15.26          
Stock Options [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Unvested options/restricted shares expected to be recognized over a weighted-average period 2 years 11 months 12 days 2 years 11 months 12 days              
Stock Options [Member] | Maximum [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Award vesting period For share options and restricted shares granted under the Plans, majority are subject to vesting schedules of approximately four years with 25% of the awards vesting each year and have a contractual term of ten years. For share options and restricted shares granted under the Plans, majority are subject to vesting schedules of approximately four years with 25% of the awards vesting each year and have a contractual term of ten years.              
Stock Options [Member] | 2011 Plan [Member] | Maximum [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Share based awards grant to employees, directors and consultants to purchase aggregate ordinary shares | shares 7,843,100             7,843,100  
Stock Options [Member] | 2013 Plan [Member] | Maximum [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Share based awards grant to employees, directors and consultants to purchase aggregate ordinary shares | shares 3,350,000             3,350,000  
Stock Options [Member] | 2016 Plan [Member] | Maximum [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Share based awards grant to employees, directors and consultants to purchase aggregate ordinary shares | shares 4,890,000             4,890,000  
Stock Options [Member] | 2016 Plan II [Member] | Maximum [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Share based awards grant to employees, directors and consultants to purchase aggregate ordinary shares | shares 3,000,000             3,000,000  
Options and Restricted Shares [Member] | Maximum [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Vesting period 4 years 4 years              
Original contractual term 10 years 10 years              
Options and Restricted Shares [Member] | Maximum [Member] | Awards Vesting Percentage Each Year [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Percentage of awards vesting 25.00% 25.00%              
Restricted Shares [Member]                  
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                  
Unvested options/restricted shares expected to be recognized over a weighted-average period 2 years 10 months 28 days 2 years 10 months 28 days              
Aggregate fair value of the outstanding restricted shares ¥ 321,724 $ 49,448              
Unrecognized compensation expense 241,950             $ 37,187  
Weighted average grant date fair value, Granted | $ / shares   $ 34.63   $ 22.30     $ 34.70    
Grant date fair value of restricted shares vested ¥ 140,887 $ 21,654 ¥ 131,861     ¥ 38,104