index.phtml 8.46 KB
{{>layout/header}}
<div class="guang-detail-page guang-page yoho-page">
    {{# guang}}
        <div id="wrapper">
            <div id="scroller">
                {{# author}}
                    <div class="author" data-id={{id}}>
                        <a class="clearfix" href={{url}}>
                            <img class="avatar" src={{avatar}}>
                            <span class="name">{{name}}</span>
                            <span class="intro">{{intro}}</span>
                        </a>
                    </div>
                {{/ author}}

                {{# detail}}
                    <div class="detail">
                        <div class="post-title">
                            <p class="title">{{title}}</p>
                            {{> guang/tvls}}
                        </div>
                        <div class="post-content">
                            {{# content}}
                                {{#if text}}
                                    <div class="post-block text-block">
                                        {{{text}}}
                                    </div>
                                {{/if}}

                                {{#if bigImage}}
                                    <div class="post-block big-img-block">
                                        <img class="lazy" data-original={{bigImage}}>
                                    </div>
                                {{/if}}

                                {{#if smallImage}}
                                    <div class="post-block small-img-block clearfix">
                                        {{# smallImage}}
                                            <img class="lazy" data-original={{src}}>
                                        {{/ smallImage}}
                                    </div>
                                {{/if}}

                                {{#if collocation}}
                                    <div class="post-block collocation-block">
                                        <ul class="thumb-container">
                                            {{#each collocation}}
                                                <li class="thumb {{#if @first}}focus{{/if}}">
                                                    <img class="thumb-img lazy" data-original={{thumb}}>
                                                    <span class="clothe-type {{type}}"></span>
                                                </li>
                                            {{/each}}
                                        </ul>
                                        <div class="good-list clearfix">
                                            {{#each collocation}}
                                                <div class="prod {{#unless @first}}hide{{/unless}}">
                                                    {{# goods}}
                                                        {{> good}}
                                                    {{/ goods}}
                                                </div>
                                            {{/each}}
                                        </div>
                                    </div>
                                {{/if}}

                                {{#if moreLink}}
                                    <a class="post-block link-block" href="{{moreLink}}">
                                        更多商品
                                        <span class="iconfont">&#xe604;</span>
                                    </a>
                                {{/if}}

                                {{#if relatedReco}}
                                    <div class="post-block related-reco-block clearfix">
                                        <h2>相关推荐</h2>
                                        {{#if relatedReco.id}}
                                            {{#with relatedReco}}
                                                <div class="one-good">
                                                    <img class="thumb lazy" data-original={{thumb}}>
                                                    <div class="content-container">
                                                        <p>
                                                            <span class="reco-name">{{name}}</span>
                                                        </p>
                                                        <p class="price">
                                                            <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
                                                            {{#price}}
                                                                <span class="market-price">¥{{.}}</span>
                                                            {{/price}}
                                                            <a class="check-detail" href={{url}}>
                                                                查看详情
                                                            </a>
                                                        </p>
                                                    </div>
                                                </div>
                                            {{/with}}
                                        {{^}}
                                            <div class="good-list clearfix">
                                                {{# relatedReco}}
                                                    {{> good}}
                                                {{/ relatedReco}}
                                            </div>
                                        {{/if}}
                                    </div>
                                {{/if}}
                            {{/ content}}
                        </div>
                    </div>
                {{/ detail}}

                {{#if relatedBrand}}
                    <div class="related-brand">
                        <h2>相关品牌</h2>
                        <ul class="brand-list clearfix">
                            {{# relatedBrand}}
                                <li class="brand">
                                    <a href={{url}}>
                                        <div class="brand-logo">
                                            <img class="lazy" data-original={{thumb}}>
                                        </div>
                                        <p class="brand-name">{{name}}</p>
                                    </a>
                                </li>
                            {{/ relatedBrand}}
                        </ul>
                    </div>
                {{/if}}

                {{#if relatedTag}}
                    <div class="related-tag">
                        <div class="tag-bg"></div>
                        <ul class="tag-list clearfix">
                            {{# relatedTag}}
                                <li>
                                    <a href={{url}}>{{name}}</a>
                                </li>
                            {{/ relatedTag}}
                        </ul>
                    </div>
                {{/if}}

                {{#if relatedInfo}}
                    <div class="related-info">
                        <h2>相关文章</h2>
                        <ul class="info-list">
                            {{# relatedInfo}}
                                <li>
                                    <a class="clearfix" href={{url}}>
                                        <img class="lazy {{#if squareThumb}}square{{/if}}" data-original={{thumb}}>
                                        <span class="title">{{title}}</span>
                                        <span class="publish-time">
                                            <i class="iconfont">&#xe603;</i> 
                                            {{publishTime}}
                                        </span>
                                    </a>
                                </li>
                            {{/ relatedInfo}}
                        </ul>
                    </div>
                {{/if}}
            </div>
        </div>

        {{!-- wx-share --}}
        <input id="shareLink" type="hidden" value="{{shareLink}}">
        <input id="shareImg" type="hidden" value="{{shareImg}}">
        <input id="shareTitle" type="hidden" value="{{shareTitle}}">
        <input id="shareDesc" type="hidden" value="{{shareDesc}}">
    {{/ guang}}
</div>
{{> layout/footer}}