Authored by 514335620@qq.com

增加模板

... ... @@ -217,7 +217,40 @@ exports.saleIndex = () => {
exports.discount = () => {
return {
module: 'product',
page: 'sale',
page: 'discount',
saleBanner:
{
bannerHeight: 170,
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/13/19/0144078a008a5dc2be52a6ec65c74c1f2c.jpg?imageView2/1/w/378/h/500'
},
saleList:
{
saleTitle: {
title: 'stage 精品上装店',
up: true,
time: '12313'
},
sort: [
{
name: '全部',
number: 10
},
{
name: '上装',
number: 20
},
{
name: '夏装',
number: 5
},
{
name: '衣服',
number: 20
}
]
}
};
... ...
... ... @@ -24,4 +24,3 @@
</div>
{{/ saleList}}
</div>
{{> layout/f
... ...
{{# saleBanner}}
<div class="sale-list-banner" style="height: {{bannerHeight}}px;">
<ul style="height: {{bannerHeight}}px;">
{{# list}}
... ... @@ -5,3 +6,4 @@
{{/ list}}
</ul>
</div>
{{/ saleBanner}}
... ...
{{# leftContent}}
{{!-- 全部折扣 --}}
{{# allDiscount}}
<div class="sort-container">
<ul class="sort-child-list new-sale">
{{#each list}}
<li {{#if active}}class="active"{{/if}}>
<a href="{{href}}" title="{{name}}">
{{name}}
<span>{{num}}</span>
</a>
</li>
{{/each}}
</ul>
</div>
{{/ allDiscount}}
{{!-- 新品上架 --}}
{{# newSales}}
<div class="sort-container">
<h2 title="{{name}}">
一周新品上架
<span>{{updateNum}}</span>
</h2>
<ul class="sort-child-list new-sale">
{{#each list}}
<li {{#if active}}class="active"{{/if}}>
<a href="{{href}}" title="{{name}}">
{{name}}
<span>{{num}}</span>
</a>
</li>
{{/each}}
</ul>
</div>
{{/ newSales}}
{{!-- 全部品类--}}
{{# allSort}}
<div class="sort-container">
<ul>
{{#all}}
<li>
<h2>
<a href="{{href}}" title="{{name}}">
{{name}}
<span>{{updateNum}}</span>
</a>
</h2>
</li>
{{/all}}
{{#each list}}
<li class="product-list-nav {{#if active}}active{{/if}}">
<h3 title="{{name}}">
<span class="icon-triangle"></span>
{{name}}
<span>{{num}}</span>
</h3>
<ul class="sort-child-list">
{{#each childList}}
<li class="{{#if childActive}}active{{/if}}">
<a href="{{href}}" title="{{name}}">
{{name}}
<span>{{num}}</span>
</a>
</li>
{{/each}}
</ul>
</li>
{{/each}}
</ul>
</div>
{{/ allSort}}
{{!-- 图片链接 --}}
{{# picLink}}
{{#if picTitle}}
<h2 class="nav-pic-title">{{picTitle}}</h2>
{{/if}}
<ul class="pic-nav">
{{#each list}}
<li>
<a href="{{href}}">
<img src="{{src}}">
</a>
</li>
{{/each}}
</ul>
{{/ picLink}}
{{/ leftContent}}
{{#if brandBanner.dataId}}
<script id="pic-link-tpl" type="text/html">
\{{# picLink}}
\{{#if picTitle}}
<h2 class="nav-pic-title">\{{picTitle}}</h2>
\{{/if}}
<ul class="pic-nav">
\{{#each list}}
<li>
<a href="\{{href}}">
<img src="\{{src}}">
</a>
</li>
\{{/each}}
</ul>
\{{/ picLink}}
</script>
<div id="brand-ad" class="brand-ad"></div>
{{/if}}
{{!-- 水牌广告 --}}
{{#if node}}
<div id="brand-card" class="brand-card" data-node="{{node}}"></div>
{{/if}}
... ...
<div class="no-result">
<p class="no-title">
抱歉!没有找到{{#if keyWord}}与"<b class="keyword">{{keyWord}}</b>"{{/if}}相关的商品
</p>
<div class="search-again clearfix">
<form method="GET" action="{{searchActionUrl}}">
<input id="no-result-input" name="query" type="text" placeholder="换个关键词试试">
<button class="search-again-btn" type="submit">
<i class="iconfont">&#xe611;</i>
</button>
</form>
</div>
<p class="no-tip">建议您:看看输入的文字是否有误 / 减少分类条件限制 / 重新搜索</p>
</div>
... ...
{{!-- 搜索页、列表页、NEW/SALE页标准内容--}}
{{# filters}}
{{> product/filter-box}}
{{/ filters}}
{{# opts}}
<div class="sort-pager">
{{# sortType}}
<a class="sort-type{{#if active}} active{{/if}}" href="{{href}}">
{{name}}
{{#if hasSortOrient}}
{{#if active}}
{{#if desc}}
<span class="active-icon iconfont">&#xe603;</span>
{{^}}
<span class="active-icon iconfont">&#xe604;</span>
{{/if}}
{{^}}
<span class="iconfont">&#xe614;</span>
{{/if}}
{{^}}
<span class="iconfont">&#xe604;</span>
{{/if}}
</a>
{{/ sortType}}
{{# checks}}
{{#if this}}
<a class="checks{{#if checked}} checked{{/if}}" href="{{href}}">
{{#if checked}}
<span class="iconfont">&#xe636;</span>
{{^}}
<span class="iconfont">&#xe635;</span>
{{/if}}
{{name}}
</a>
{{/if}}
{{/ checks}}
{{#if ../goods}}
<div class="pager-wrap">
<div class="page-count">
<span id="count-per-page">
{{countPerPage}}
<i class="iconfont">&#xe604;</i>
</span>
每页
<ul>
{{# pageCounts}}
<li>
<a href="{{href}}">{{count}}</a>
</li>
{{/ pageCounts}}
</ul>
</div>
<p class="page-orient">
{{#if preHref}}
<a href="{{preHref}}">
<span class="iconfont">&#xe615;</span>
</a>
{{^}}
<span class="dis-icon iconfont">&#xe615;</span>
{{/if}}
<span>
<i>{{curPage}}</i>/{{pageCount}}
</span>
{{#if nextHref}}
<a href="{{nextHref}}">
<span class="iconfont">&#xe601;</span>
</a>
{{^}}
<span class="dis-icon iconfont">&#xe601;</span>
{{/if}}
</p>
</div>
{{/if}}
</div>
{{/ opts}}
{{#if goods}}
<div class="goods-container clearfix">
{{#each goods}}
{{> product/good}}
{{/each}}
{{# hasNextPage}}
<div class="block-next-page">
<a href="{{href}}">
<img src="{{src}}" alt=""/>
</a>
</div>
{{/ hasNextPage}}
<div class="good-item-wrapper">
<div class="good-info-main"></div>
<div class="good-select-color"></div>
</div>
</div>
<div class="product-pager clearfix">
<span class="total">{{opts.start}} - {{opts.end}} / 共{{totalCount}}件商品</span>
<div class="pager">
{{{pager}}}
</div>
</div>
{{^}}
{{> product/no-result}}
{{/if}}
... ...