|  |  | 
 |  |  |             background-color: #f1f1f1; | 
 |  |  |             padding: 5px; | 
 |  |  |             position: relative; | 
 |  |  |             /*overflow: hidden;*/ | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /*header {*/ | 
 |  |  |         /*    position: absolute;*/ | 
 |  |  |         /*}*/ | 
 |  |  |         /*main {*/ | 
 |  |  |         /*    padding-top: 30px;*/ | 
 |  |  |         /*}*/ | 
 |  |  |         main { | 
 |  |  |             padding-bottom: 5px; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /* 头部搜索栏 */ | 
 |  |  |         .search-box { | 
 |  |  | 
 |  |  |                         var template = Handlebars.compile(tpl); | 
 |  |  |                         var html = template(res); | 
 |  |  |                         $('#main-contain').html(html); | 
 |  |  |                         toTop(); | 
 |  |  |                     } else { | 
 |  |  |                         var tagId = parentId; | 
 |  |  |                         showMat(tagId); | 
 |  |  | 
 |  |  |                         var template = Handlebars.compile(tpl); | 
 |  |  |                         var html = template(res); | 
 |  |  |                         $('#main-contain').html(html); | 
 |  |  |                         toTop(); | 
 |  |  |                     } else { | 
 |  |  |                         $('#main-contain').html('<div style="text-align: center; margin-top: 15px"><span style="font-size: large">暂无商品</span></div>'); | 
 |  |  |                     } | 
 |  |  | 
 |  |  |         }) | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     function toTop() { | 
 |  |  |         window.scrollTo({ | 
 |  |  |             left: 0, | 
 |  |  |             top: 0, | 
 |  |  |             behavior: 'smooth' | 
 |  |  |         }) | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | </script> | 
 |  |  | <script type="text/template" id="tagTpl"> |