| | |
| | | background-color: #dedede; |
| | | } |
| | | |
| | | /* 主体卡片 */ |
| | | .box-item { |
| | | /* 主体 */ |
| | | |
| | | /* 归类标签 */ |
| | | .box-tag-item { |
| | | height: 100px; |
| | | border-bottom: 1px solid #dedede; |
| | | background-color: #fff; |
| | |
| | | box-shadow: 0 0 3px rgba(0,0,0,.3); |
| | | margin-top: 2px; |
| | | } |
| | | .box-item:hover { |
| | | .box-tag-item:hover { |
| | | background-color: #eaeaea; |
| | | } |
| | | .box-item-label { |
| | | .box-tag-item-label { |
| | | font-size: x-large; |
| | | font-weight: bold; |
| | | padding: 10px 0 0 20px; |
| | | } |
| | | |
| | | /* 商品标签 */ |
| | | .box-mat-item { |
| | | height: 100px; |
| | | border-bottom: 1px solid #dedede; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | box-shadow: 0 0 3px rgba(0,0,0,.3); |
| | | margin-top: 2px; |
| | | } |
| | | .box-mat-item:hover { |
| | | background-color: #eaeaea; |
| | | } |
| | | .box-mat-item-label { |
| | | font-size: x-large; |
| | | font-weight: bold; |
| | | padding: 10px 0 0 20px; |
| | |
| | | showTag(); |
| | | }) |
| | | |
| | | $(document).on('click','.box-item', function () { |
| | | // 归类点击 |
| | | $(document).on('click','.box-tag-item', function () { |
| | | var tagId = $(this).children('input').get(0).value; |
| | | showTag(tagId); |
| | | }) |
| | | |
| | | // 商品点击 |
| | | $(document).on('click','.box-mat-item', function () { |
| | | var tagId = $(this).children('input').get(0).value; |
| | | }) |
| | | |
| | | // 展示归类 |
| | |
| | | var html = template(res); |
| | | $('#main-contain').html(html); |
| | | } else { |
| | | |
| | | $('#main-contain').html('<div style="text-align: center; margin-top: 15px"><span style="font-size: large">暂无商品</span></div>'); |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | |
| | | </script> |
| | | <script type="text/template" id="tagTpl"> |
| | | {{#each data}} |
| | | <div class="box-item"> |
| | | <div class="box-tag-item"> |
| | | <input name="tagId" type="hidden" value="{{this.id}}"> |
| | | <div class="box-item-label">{{this.name}}</div> |
| | | <div class="box-tag-item-label">{{this.name}}</div> |
| | | </div> |
| | | {{/each}} |
| | | </script> |
| | | <script type="text/template" id="matTpl"> |
| | | {{#each data}} |
| | | <div class="box-item"> |
| | | <div class="box-mat-item"> |
| | | <input name="matId" type="hidden" value="{{this.id}}"> |
| | | <div class="box-item-label">{{this.maktx}}</div> |
| | | <div class="box-mat-item-label">{{this.maktx}}</div> |
| | | </div> |
| | | {{/each}} |
| | | </script> |