detail.wxml
9.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<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}}" />