goodtail.wxml
7.2 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<import src="../../wxParse/wxParse.wxml" />
<!-- 转换箭头 -->
<view class="zhuanhuan" bindtap="gogift">
<image src="/img/jump.png"></image>
</view>
<view class="swiper_image">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange" circular="true">
<block wx:for="{{imgUrls}}" wx:key="doct">
<swiper-item>
<image src="{{item}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" />
</swiper-item>
</block>
</swiper>
<view class="bannerdot">
<text>{{currentSwiper+1}}</text>/
<text>{{imgUrls.length}}</text>
</view>
<!-- <view class="dots">
<block wx:for="{{imgUrls}}" wx:key="">
<view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>
</block>
</view> -->
</view>
<view class="goodname">
<view class="boxgoodrightop">
<view class="boxgoodrigtl">
<image src="/img/good.png"></image>
</view>
{{goodtail.goods_name}}
</view>
<view class="goodprice">
<view class="goodpriceleft">¥{{goodtail.price}}</view>
<view class="goodpriceright" wx:if="{{goodtail.freight=='0.00'}}">运费:免运费</view>
<view class="goodpriceright" wx:else>运费:{{goodtail.freight}}元</view>
</view>
</view>
<!--赠品 -->
<view class="zenggood" bindtap="gogift">
<view class="zenggoodleft">
<image src='{{goodtail.gift.image}}'></image>
</view>
<view class="zengright">
<view class="boxgoodrightop zengname">
<view class="boxgoodrigtl">
<image src="/img/zeng.png"></image>
</view>
{{goodtail.gift.goods_name}}
</view>
</view>
</view>
<!-- 详情和评论 -->
<view class="pingxiang">
<view class="pingxiangitem {{ping==1?'pingzctive':''}} " data-id="1" bindtap="comment">详情</view>
<view class="pingxiangitem {{ping==2?'pingzctive':''}}" data-id="2" bindtap="comment">评论({{totalping}})</view>
</view>
<view class="pingdetail" wx:if="{{ping==1}}">
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
<!-- <view class="pingdetailimg">
<image src="/img/changtu.png"></image>
</view> -->
</view>
<view class='commentdetail' wx:else>
<view class="nodata" wx:if="{{commentlist.length==0}}">暂无评论</view>
<view wx:else>
<view class="commentitem" wx:for="{{commentlist}}" wx:key="">
<view class="commentitemtop">
<view class="commentleft">
<view class="commentitemleft">
<image src="{{item.avatar}}"></image>
</view>
<view class="commentitemright">{{item.nickname}}</view>
</view>
<view class="commentright">{{item.createtime}}</view>
</view>
<view class="commenttext">
{{item.content}}
</view>
<view class="pingfen">
<view class="pingfenleft">
<view class="pingfenitem">
<image src="{{item.star>=1?'/img/shixing.png':'/img/kongxing.png'}}"></image>
</view>
<view class="pingfenitem">
<image src="{{item.star>=2?'/img/shixing.png':'/img/kongxing.png'}}"></image>
</view>
<view class="pingfenitem">
<image src="{{item.star>=3?'/img/shixing.png':'/img/kongxing.png'}}"></image>
</view>
<view class="pingfenitem">
<image src="{{item.star>=4?'/img/shixing.png':'/img/kongxing.png'}}"></image>
</view>
<view class="pingfenitem">
<image src="{{item.star>=5?'/img/shixing.png':'/img/kongxing.png'}}"></image>
</view>
</view>
<view class="pingfenname">{{item.star}}分</view>
</view>
<view class="pingimg">
<view class="pingimgitem" wx:for="{{item.images}}" wx:key="">
<image src="{{item}}"></image>
</view>
</view>
</view>
</view>
</view>
<view class="cartbottom">
<view class="cartbottomleft" bindtap="gocart">
<view class="cartbototmtopimg">
<image src="/img/shop.png"></image>
<view class="cartnum">{{count}}</view>
</view>
<view class="gouwucart">购物车</view>
</view>
<view class="cartright">
<view class="cartleftname" bindtap="addcart">加入购物车</view>
<view class="qianggou" bindtap="lijiqiang">立即抢购</view>
</view>
</view>
<!-- 选择商品属性 -->
<view class="registerk">
<view class="naturewrap">
<view class="naturebox">
<view class="naturetop flexone">
<view class="naturetopleft">
<image src="{{goodtail.image}}"></image>
</view>
<view class="naturetopright">
<view class="goodprice">¥{{goodtail.price}}</view>
<view class="naturestock">库存:{{goodtail.inventory}}件</view>
<view class="natureshu">{{standard}}</view>
</view>
</view>
<view class="sizebox">
<view class="size" wx:for='{{goodtail.standard}}' wx:key="" wx:for-item="standarditem" wx:if="{{goodtail.standard!=null}}" wx:for-index="bindex" >
<view class="sizetop">{{standarditem.name}}</view>
<view class="sizebox flexone">
<view class="coloritem {{standarditem.selindex==index?'itemactive':''}}" wx:for='{{standarditem.value}}' wx:key="" bindtap="selattr" data-index="{{index}}" data-bindex="{{bindex}}" data-name="{{item}}">{{item}}</view>
</view>
</view>
</view>
<view class="buynum flextwo">
<view class="buymumleft">购买数量</view>
<view class='buynumright flexone'>
<view class="buynumreduce" bindtap="reducenum">
<image src="/img/buyreduce.png"></image>
</view>
<view class="numname">{{buynum}}</view>
<view class="buynumreduce" bindtap="addnum">
<image src="/img/buyadd.png"></image>
</view>
</view>
</view>
<view class="naturetop flexone">
<view class="naturetopleft">
<image src="{{goodtail.gift.image}}"></image>
</view>
<view class="naturetopright">
<view class="goodprice">{{goodtail.gift.goods_name}}</view>
<view class="naturestock">库存:{{goodtail.gift.inventory}}件</view>
<view class="natureshu">{{giftstandard}}</view>
</view>
</view>
<view>
<view class="size" wx:for="{{goodtail.gift.standard}}" wx:if='{{goodtail.gift.standard!=null}}' wx:for-item="standarditem" wx:for-index="bindex">
<view class="sizetop">{{standarditem.name}}</view>
<view class="sizebox flexone">
<view class="coloritem {{standarditem.selindex==index?'itemactive':''}}" wx:for='{{standarditem.value}}' wx:key="" bindtap="selgiftattr" data-index="{{index}}" data-bindex="{{bindex}}" data-name="{{item}}">{{item}}</view>
</view>
</view>
</view>
</view>
<view class="cartbottom boxcartbot">
<view class="cartbottomleft" bindtap="gocart">
<view class="cartbototmtopimg">
<image src="/img/shop.png"></image>
<view class="cartnum">{{count}}</view>
</view>
<view class="gouwucart">购物车</view>
</view>
<view class="cartright">
<view class="cartleftname" bindtap="addcart">加入购物车</view>
<view class="qianggou" bindtap="lijiqiang">立即抢购</view>
</view>
</view>
</view>
</view>