detail.phtml 9.6 KB
{{> layout/header}}

{{# detail}}
<div class="guang-detail-page guang-page yoho-page clearfix" data-id="{{id}}"> 
    <div class="left-side detail-body">
        {{# header}}
        <div class="detail-title">{{title}}</div>
        <div class="article-info clearfix">
            <div class="article-author">
                <div class="author-avatar">
                    <img src="{{avatar}}" alt="">
                </div>
            </div>
            <div class="author-info">
                <a class="author-name" href="{{authorUrl}}">{{name}}</a>
            </div>
            <div class="article-status clearfix">
                <span class="article-time">{{time}}</span>
                <span class="article-click">点击:{{click}}</span>
                <span id="article-comment" class="article-comment"><em class="comment-num">{{commentNum}}</em>条评论</span>
            </div>
        </div>
        {{/ header}}
        
        <div class="article-main">
        {{# content}}
            {{# pic}}
                <div class="article-pic block">
                    <img class="lazy" data-original="{{.}}">
                </div>
            {{/ pic}}
            {{# text}}
                <div class="article-text block">
                    <p>{{.}}</p>
                </div>
            {{/ text}}
            {{#if smallPic}}
                <div class="article-small-pic block clearfix"> 
                    {{# smallPic}}
                        <img class="lazy" data-original="{{.}}">
                    {{/ smallPic}}
                </div>
            {{/if}}
            {{# relatedReco}}
                <div class="related-reco block clearfix">
                <div class="block-header">
                    相关推荐
                    {{# moreReco}}
                    <a class="more-reco" href="{{.}}">MORE ></a>
                    {{/ moreReco}}
                </div>
                <div class="recos clearfix">
                    {{# recos}}
                    <div class="commodity-info">
                        {{#withInfo}}
                            <div class="tag-container clearfix">
                                {{# tags}}
                                    {{# isNew}}
                                        <p class="good-tag new-tag">NEW</p>
                                    {{/ isNew}}
                                    {{# isReNew}}
                                        <p class="good-tag renew-tag">再到着</p>
                                    {{/ isReNew}}
                                    {{# isSale}}
                                        <p class="good-tag sale-tag">SALE</p>
                                    {{/ isSale}}
                                    {{# isYohood}}
                                        <div class="good-tag yohood-tag"></div>
                                    {{/ isYohood}}
                                    {{# isLimit}}
                                        <p class="good-tag limit-tag">限量商品</p>
                                    {{/ isLimit}}
                                    {{# isYearEndPromotion}}
                                        <p class="good-tag yep-tag">年终大促</p>
                                    {{/ isYearEndPromotion}}
                                    {{# isYearMidPromotion}}
                                        <p class="good-tag ymp-tag">年中热促</p>
                                    {{/ isYearMidPromotion}}
                                {{/ tags}}
                            </div>
                            <div class="info-img">
                                <a class="thumb" href="{{url}}">
                                    <img class="lazy" data-original="{{thumb}}">
                                </a>
                                {{# isFew}}
                                    <p class="few-tag">即将售罄</p>
                                {{/ isFew}}
                            </div>
                            <a class="name" href="{{url}}">{{name}}</a>
                            <p class="price">
                                {{# price}}
                                    <span class="market-price">¥{{.}}</span> 
                                {{/ price}}
                                <span class="sale-price">¥{{salePrice}}</span>
                            </p>
                        {{/ withInfo}}
                    </div>
                    {{/ recos}}
                </div>
            </div>
            {{/ relatedReco}}
        {{/ content}}
        </div>
        <div class="related-brand block clearfix">
            <div class="block-header">相关品牌</div>
            <div class="brands">
                {{# brands}}
                    <div class="brand">
                        <a class="thumb" href="{{url}}">
                            <img class="lazy" data-original="{{thumb}}">
                        </a>
                        <p class="brand-name">{{name}}</p>
                    </div>
                {{/ brands}}
            </div>
        </div>
        {{# userInfo}}
        <div class="user-handle">
            <ul class="clearfix">
                <li id="prise-btn" class="like-status{{#isLike}} liked{{/isLike}}">
                    <a href="javascript:;">
                        <i></i>
                        <span class="like-num">{{likeNum}}</span>
                    </a>
                </li>
                <li id="collect-btn" class="sort-collect{{#isCollected}} collected{{/isCollected}}">
                    <a href="javascript:;">
                        <i></i>
                        <span>收藏</span>
                        <span class="cancel-collect">取消收藏</span>
                    </a>
                </li>
            </ul>
        </div>
        {{/ userInfo}}
        <div class="article-bottom-info clearfix">
            {{#if tag}}
                <div class="article-tag">
                    <ul class="clearfix">
                        {{# tag}}
                        <li>
                            <a href="{{url}}">{{name}}</a>
                        </li>
                        {{/ tag}}
                    </ul>
                </div>
            {{/if}}
            <div class="article-share">
                <span class="share-to">
                    分享至:
                    <a class="share-a share-sina" data-type="weibo" title="分享到新浪微博"></a>
                    <a class="share-a share-weixin" data-type="weixin" title="分享到微信朋友圈"></a>
                    <a class="share-a share-tencent" data-type="tqq" title="分享到腾讯微博"></a>
                    <a class="share-a share-qzone" data-type="qzone" title="分享到QQ空间"></a>
                    <a class="share-a share-qq" data-type="qq" title="分享到QQ好友"></a>
                    <a class="share-a share-renren" data-type="renren" title="分享到人人网"></a>
                    <a class="share-a share-douban" data-type="douban" title="分享到豆瓣"></a>
                    <div class="shareWeixin"></div>
                </span>
                <input id="share-img" type="hidden" value="{{sharedImg}}">
                <input id="share-title" type="hidden" value="{{title}}">
                <input id="weixin-url" type="hidden" value="{{weixinUrl}}">
            </div>
        </div>
        {{#if relatedPost}}
        <div class="detail-related-posts">
            <ul class="clearfix">
                {{# relatedPost}}
                <li>
                    <a href="{{url}}">
                        <span class="bg-img" style="background-image:url({{imgUrl}})"></span>
                        <div class="post-title">
                            <h2>{{title}}</h2>
                        </div>
                    </a>
                </li>
                {{/ relatedPost}}
            </ul>
        </div>
        {{/if}}

        <div id="comment-area" class="comment-area">
            <div class="comment-textarea">
                <textarea id="comment-info" placeholder="我有话要说。。。">{{commentInfo}}</textarea>
            </div>
            <div class="comment-publish clearfix">
                <span id="word-count-tip" class="word-count-tip"></span>
                <a id="comment-btn" class="publish-btn disable">评论</a>
            </div>
            <div id="pjax-container" class="comments-wrap">
                {{# comment}}
                <h4>
                    <span class="comment-num">{{commentNum}}</span>
                    条评论 <i></i>
                </h4>
                <p class="comments-empty">还没有评论,快抢沙发吧</p>
                <div class="commnets-resultwrapper">
                    <ul class="comments-list">
                        {{# list}}
                        <li class="clearfix">
                            <div class="avatar">
                                <img class="comment-user-avatar" src="{{avatar}}" alt=""></div>
                            <div class="comment-info">
                                    <p class="comment-user-name">{{name}}</p>
                                    <p class="comment-content">{{content}}</p>
                                    <p class="comment-time">{{time}}</p>
                            </div>
                        </li>
                        {{/ list}}
                    </ul>
                    <div class="comment-pager pager">{{{commentPager}}}</div>
                </div>
                {{/ comment}}
            </div>
        </div>
    </div>
    <div class="right-side detail-side">
        {{> guang/right-side}}
    </div>
</div>
{{/ detail}}

{{> layout/footer}}