index.hbs 11.7 KB
<div class="guang-detail-page guang-page yoho-page {{#if guangDetail}}guang-detail{{/if}} {{#if guangEzine}}guang-ezine{{/if}}">
    {{# guang}}
        <div id="wrapper" >
            <div id="scroller" class="{{channel}}">
                {{!-- {{#if isShare}} --}}
                    {{> wei-guang/guang-header}}
                {{!-- {{/if}} --}}
                {{# author}}
                    <div class="author" data-id={{id}}>
                        <a class="clearfix" href={{url}}>
                            <img class="avatar" src={{image2 avatar mode=2 q=60}}>
                            <span class="name">{{name}}</span>
                            <span class="intro">{{intro}}</span>
                        </a>
                    </div>
                {{/ author}}
                {{# detail}}
                    <div class="detail" data-id="{{id}}">
                        <div class="post-title">
                            <p class="title">{{title}}</p>
                            {{> index/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">
                                        {{#if noLazy}}
                                            <img src={{image2 bigImage q=60}}>
                                        {{else}}
                                            <img class="lazy" data-original={{image2 bigImage q=60}}>
                                        {{/if}}
                                    </div>
                                {{/if}}

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

                                {{#if weixinPublic}}
                                <div class="weixin post-block">
                                    {{#each weixinPublic}}
                                    <a href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{wechat_id}}"}}' class="ems-cnpl">
                                        <img class="weixin-img" src="{{src}}">
                                    </a>
                                    {{/each}}
                                </div>
                                {{/if}}

                                {{#if shareCode}}
                                <div class="share-code">
                                    {{# shareCode}}
                                    <img class="wei-share" src="{{codeShare}}"></img>
                                    {{/ shareCode}}
                                </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}}">&yen;{{salePrice}}</span>
                                                            {{#price}}
                                                                <span class="market-price">&yen;{{.}}</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 buriedpoint" data-bp-id="guang_brand_{{name}}_0">
                                    <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 class="buriedpoint" data-bp-id="guang_tab_{{name}}_0">
                                    <a href={{url}}>{{name}}</a>
                                </li>
                            {{/ relatedTag}}
                        </ul>
                    </div>
                {{/if}}

                {{#if relatedInfo}}
                    <div class="related-info">
                        <h2>相关文章</h2>
                        <ul class="info-list">
                            {{# relatedInfo}}
                                <li data-bp-id="guang_article_{{title}}_0" class="buriedpoint">
                                    <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}}

                {{#if isShare}}
                <div class="down-bottom"></div>
                {{/if}}
            </div>
            {{# wxFooter}}
            <div class="wx-footer-c">
                {{> wx-footer}}
            </div>
            {{/ wxFooter}}
        </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}}

    {{#if isShare}}
    <div class="float-layer" id="float-layer-app">
        <div class="float-layer-left">
            <span class="yoho-icon iconfont">&#xe60d;</span>
            <p><span>Yoho!buy有货</span><br>潮流有货逛不停</p>
        </div>
        <a href="javascript:void(0);" id="float-layer-close" >
            <i class="close-icon iconfont">&#xe623;</i>
            <div class="circle-rightbottom"></div>
        </a>
        <a href="javascript:void(0);" id="float-layer-btn">
            前往下载
        </a>
    </div>
    {{/if}}

    {{> common/suspend-home}}

    <div class="overlay"></div>
</div>

{{#if isShare}}
    {{> wei-guang/side-nav}}
{{/if}}

<script type="text/javascript">
    var isWechat = /micromessenger/i.test(navigator.userAgent || ''),
        isqq = /MQQBrowser/i.test(navigator.userAgent || ''),
        isWeibo = navigator.userAgent.toLowerCase().indexOf('weibo') !== -1;

    if (isWechat || isqq || isWeibo) {
        document.getElementById('guang-header').classList.remove('hide');
        document.getElementById('yoho-header').classList.add('hide');
    }
</script>