detail.wxml 9.63 KB
<import src="./template/authorEdit.wxml"/>
<import src="/page/subPackage/pages/guang/template/guangDeps.wxml"/>
<import src="../../../../vendors/wxParse/wxParse.wxml"/>
<view class="guang-detail-page">
    <view class="guang-container">
        <navigator url="/page/subPackage/pages/guang/author?author_id={{authorInfo.author_id}}{{yasParam}}"
            open-type="navigate"
            tt:if="{{authorInfo.author_id}}"
            hover-class="none">
            <template is="authorEdit" data="{{authorInfo}}"/>
        </navigator>
        <view class="ellipsis guang-title">{{articleInfo.article_title}}</view>
        <template is="guangDeps" data="{{publish_time: articleInfo.publishTime, views_num: articleInfo.pageViews}}"/>

        <view class="guang-content">
            <block tt:for="{{articleContent.finalDetail}}" tt:key="detailKey" tt:for-index="findex" tt:for-item="detail">
               <view class="item-block text-block" tt:if="{{detail.text}}">
                    <template is="wxParse" data="{{wxParseData:detail.wxText}}"/>
                </view>
               
               <view class="item-block big-img-block" tt:if="{{detail.bigImage}}">
                   <image src="{{detail.bigImage}}" mode="widthFix"></image>
                   <view class="tag-list-box" tt:if="{{detail.tagList.length}}">
                        <view class="tag-list-box-item"
                            bindtap="productCellTapped"
                            data-skn="{{tagItem.product_skn}}"
                            tt:for="{{detail.tagList}}"
                            tt:key="bigTagKey"
                            tt:for-item="tagItem">
                            <image src="/page/subPackage/pages/guang/images/cart@2x.png"></image>
                            <text class="ellipsis name">{{tagItem.tagName}}</text>
                        </view>
                   </view>
               </view>
               
               <view class="item-block small-img-block" tt:if="{{detail.smallImage.length}}">
                   <image src="{{sitem.src}}" tt:for="{{detail.smallImage}}" tt:key="skey" tt:for-item="sitem"></image>
               </view>
               
               <view class="item-block video-block" tt:if="{{detail.video}}">
                    <video src="{{detail.video.src}}"
                        controls="{{true}}"
                        custom-cache="{{false}}"
                        show-play-btn="{{true}}"
                        poster="{{detail.video.cover_image}}"
                        preload="none">不好意思,您的浏览器不支持此视频!</video>
               </view>               

                <view class="item-block related-reco" tt:if="{{detail.relatedReco.goods.length}}">
                    <block tt:for="{{detail.relatedReco.goods}}" tt:key="goodsKey" tt:for-index="gindex" tt:for-item="goods">
                        <view class="goods-more" tt:if="{{detail.relatedReco.changeDisplayType}}"
                            bindtap="productCellTapped"
                            data-skn="{{goods.product_skn}}">
                            <image src="{{goods.default_images}}"></image>
                            <view class="ellipsis title">{{goods.product_name}}</view>
                            <view class="goods-deps">
                                <text class="price">{{goods.salePriceStr}}</text>
                                <view class="show-info" tt:if="{{goods.isLimit}}">
                                    <text>查看详情</text>
                                    <image src="/page/subPackage/pages/guang/images/more@2x.png"></image>
                                </view>
                                <image src="/page/subPackage/pages/guang/images/cart2@3x.png"
                                    tt:else></image>
                            </view>
                        </view>
                        <view class="one-goods {{gindex >= detail.relatedReco.moreNum ? 'hidden' : ''}}"
                            bindtap="productCellTapped"
                            data-skn="{{goods.product_skn}}"
                            tt:else>
                            <image src="{{goods.default_images}}"></image>
                            <view class="goods-deps">
                                <view class="ellipsis title">{{goods.product_name}}</view>
                                <text class="price">{{goods.salePriceStr}}</text>
                                <view class="cart-icon">
                                    <view class="show-info" tt:if="{{goods.isLimit}}">
                                        <text>查看详情</text>
                                        <image src="/page/subPackage/pages/guang/images/more@2x.png"></image>
                                    </view>
                                    <image src="/page/subPackage/pages/guang/images/cart2@3x.png"
                                        tt:else></image>
                                </view>
                            </view>
                        </view>
                    </block>
                    <view class="more-deps" tt:if="{{detail.relatedReco.changeDisplayType === false && (detail.relatedReco.goods.length - detail.relatedReco.moreNum) > 0}}"
                        bindtap="setGoodsMore"
                        data-findex="{{findex}}"
                        data-flen="{{detail.relatedReco.goods.length}}">
                        <view class="more-text">
                            <text>展开剩余{{detail.relatedReco.goods.length - detail.relatedReco.moreNum}}个商品</text>
                            <image class="more-down-icon" src="/page/subPackage/pages/guang/images/more_unfold@2x.png"></image>
                        </view>
                    </view>
                </view>

            </block>
        </view>

        <view class="tags-block" tt:if="{{articleInfo && articleInfo.tags.length}}">
            <navigator url="/page/subPackage/pages/guang/tags?query={{item.name}}{{yasParam}}" 
                class="tags-item"
                hover-class="none"
                open-type="navigate"
                tt:for="{{articleInfo.tags}}" tt:key="index" tt:for-item="item">
                <text>{{item.name}}</text>
            </navigator>
        </view>

        <block tt:for="{{articleContent.finalDetail}}" tt:key="dindex" tt:for-item="ditem">
            <view class="container-block" tt:if="{{ditem.recommendProducts.length}}">
                <view class="title">为您优选</view>
                <scroll-view class="nav-scroll" scroll-x scroll-with-animation>
                    <view class="products-box"
                        bindtap="productCellTapped"
                        data-skn="{{goods.product_skn}}"        
                        tt:for="{{ditem.recommendProducts}}"
                        tt:key="goodsKey"
                        tt:for-item="goods">
                        <image class="img" src="{{goods.pic_url}}"></image>
                        <view class="footer">
                            <text class="price">¥{{goods.price}}</text>
                        </view>
                    </view>
                </scroll-view>
            </view><!--/container-block-->
        </block>

        <view class="container-block" tt:if="{{brands.length}}">
            <view class="title block-brand">相关品牌</view>
            <scroll-view class="nav-scroll" scroll-x
            scroll-with-animation>
                <navigator  class="item brand-block"
                    open-type="navigate"
                    url="/pages/goodsList/brand?brandId={{item.id}}&brandName={{item.name}}{{yasParam}}"
                    hover-class="none"
                    tt:for="{{brands}}"
                    tt:key="index"
                    tt:for-item="item"
                    tt:if="{{item.isGlobal==='N'}}">
                    <view>
                        <view class="brand-box">
                            <image class="img" src="{{item.thumb}}"></image>
                            <view class="ellipsis title">{{item.name}}</view>
                        </view>
                    </view>
                </navigator>
            </scroll-view>
        </view><!--/container-block-->

        <view class="container-block" tt:if="{{otherArticles.length}}">
            <view class="title">相关推荐</view>
            <view class="related-container">
            <navigator url="/page/subPackage/pages/guang/detail?id={{item.id}}{{yasParam}}"
                open-type="navigate"
                hover-class="none"
                tt:for="{{otherArticles}}" tt:key="index" tt:for-item="item">
                <view class="item" >
                    <image class="img" src="{{item.thumb}}"></image>
                    <view class="info">
                        <view class="ellipsis title">{{item.title}}</view>
                        <view class="time">
                            <image src="/page/subPackage/pages/guang/images/time@3x.png"></image>
                            <text>{{item.publishTime}}</text>
                        </view>
                    </view>
                </view>
            </navigator>
            </view>
        </view><!--/container-block-->
    </view>
</view>
<quickNavigation id="quickNavigation" isShowIndicator="{{isShowIndicator}}"
    isShowShopCart="{{false}}"
    isGuangShare="{{true}}"
    bind:backToTop="backToTop"
    bind:share="share"></quickNavigation>
<snapshootShare id="snapshootShare" isShow="{{isShowSnapshoot}}" sourceType="guang" shareData="{{snapshootShareData}}" bind:hiddenSheet="hiddenSheet"></snapshootShare>   
<import src="../../../../vendors/zanui/actionsheet/index.wxml" />
<template is="zan-actionsheet" data="{{...actionsheet}}" />