index.hbs 12.5 KB
<div class="guang-detail-page guang-page yoho-page {{#if guangDetail}}guang-detail{{/if}} {{#if guangEzine}}guang-ezine{{/if}}" id="guangDetail" data-id={{id}}>
    {{# 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">
                            <h1 class="title">{{title}}</h1>
                            {{> 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}} alt="{{@root.guang.detail.title}}">
                                        {{else}}
                                            <img class="lazy" data-original={{image2 bigImage q=60}} alt="{{@root.guang.detail.title}}">
                                        {{/if}}
                                        {{#if tagList}}
                                        <div class="tag-list-box">
                                            {{#each tagList}}
                                                {{> detail/img-label}}
                                            {{/each}}
                                        </div>
                                        {{/if}}
                                    </div>
                                {{/if}}

                                {{#if smallImage}}
                                    <div class="post-block small-img-block clearfix">
                                    {{#if noLazy}}
                                        {{# smallImage}}
                                            <img src={{image2 src q=60}} alt="{{@root.guang.detail.title}}">
                                        {{/ smallImage}}
                                    {{else}}
                                        {{# smallImage}}
                                            <img class="lazy" data-original={{image2 src q=60}} alt="{{@root.guang.detail.title}}">
                                        {{/ smallImage}}
                                    {{/if}}

                                    {{#tagList}}
                                        {{> detail/img-label}}
                                    {{/tagList}}
                                    </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="{{image2 src q=60}}">
                                    </a>
                                    {{/each}}
                                </div>
                                {{/if}}

                                {{#if shareCode}}
                                <div class="share-code">
                                    {{# shareCode}}
                                    <img class="wei-share" src="{{image2 codeShare q=60}}"></img>
                                    {{/ shareCode}}
                                </div>
                                {{/if}}

                                {{#video}}
                                    <video src="{{src}}" controls="controls" poster="{{image2 cover_image q=60}}" preload="none">不好意思,您的浏览器不支持此视频!</video>
                                {{/video}}

                                {{#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="{{image2 thumb q=60}}">
                                                    <span class="clothe-type {{type}}"></span>
                                                </li>
                                            {{/each}}
                                        </ul>
                                        <div class="good-list clearfix">
                                            {{#each collocation}}
                                                <div class="prod {{#unless @first}}hide{{/unless}}">
                                                    {{# goods}}
                                                        {{> common/goods}}
                                                    {{/ 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 clearfix{{#if relatedReco.changeDisplayType}} change-display{{/if}}">
                                    <div class="related-reco-block related-reco-hide">
                                        {{#each relatedReco.goods}}
                                            {{> detail/related-reco isApp=../relatedReco/isApp}}
                                        {{/each}}
                                    </div>
                                    {{#if relatedReco.moreNum}}
                                    <div class="related-reco-more">
                                        展开剩余{{relatedReco.moreNum}}个商品<span class="iconfont">&#xe609;</span>
                                    </div>
                                    {{/if}}
                                </div>
                                {{/if}}
                            {{/ content}}
                        </div>
                    </div>
                {{/ detail}}


                {{#detail.content}}
                    {{#if recommendProducts}}
                    <div class="recommend-products-box">
                        <div class="recommend-products-content">
                            {{#each recommendProducts}}
                                {{> detail/recommend-products}}
                            {{/each}}
                        </div>
                    </div>
                    {{/if}}
                {{/detail.content}}

                {{#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="{{image2 thumb q=60}}" alt="{{name}}">
                                        </div>
                                        <p class="brand-name">{{name}}</p>
                                    </a>
                                </li>
                            {{/ relatedBrand}}
                        </ul>
                    </div>
                {{/if}}

                {{#if relatedInfo}}
                    <div class="related-info">
                        <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="{{image2 thumb q=60}}">
                                        <span class="title">{{title}}</span>
                                        <span class="publish-time">
                                            <i class="iconfont">&#xe603;</i>
                                            {{publishTime}}
                                        </span>
                                    </a>
                                </li>
                            {{/ relatedInfo}}
                        </ul>
                    </div>
                {{/if}}

                {{#if relatedTag}}
                    <div class="related-tag">
                        <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 isShare}}
                <div class="down-bottom"></div>
                {{/if}}
            </div>
            {{# wxFooter}}
            <div class="wx-footer-c">
                {{> wx-footer}}
            </div>
            {{/ wxFooter}}
            <div class="comments" id="comments">
                <div class="comments-title clearfix">
                    <div class="avatar-list">
                        {{#each detail.praiseHeadIco}}
                        <img src="{{image2 . q=60}}" alt="">
                        {{/each}}
                    </div>
                    <div class="agree">{{detail.praise}}人点赞</div>
                    <div class="seenum"><span>{{detail.pageView}}</span>人看过</div>
                </div>
                <div class="comments-num"><span>评论{{detail.commentsTotal}}</span></div>
            </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}}

    {{#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>