comment.wxml
10.5 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
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<view class="container">
<!-- tabbar -->
<view class="type-navbar padding">
<view class="type-box fs28 type-navbar-item {{activeStatus==item.status?'type-item-on':''}}" data-status="{{item.status}}" wx:for="{{categories}}" wx:key="{{index}}">
<view class="title_width" bindtap="changeTab" data-status="{{item.status}}">{{item.name}}</view>
</view>
</view>
<!-- 无评价 -->
<!-- <view class="noCollection" wx:if="{{(!comments||comments.length==0) && isloaded}}"> -->
<view class="noCollection" wx:if="{{!comments}}" data-c="{{comments}}">
<view class="flex-level">
<image src="{{iurl}}/miniapp/images/comment.png"></image>
</view>
<view class="flex-level fs30 xc-ash">当前暂无评价</view>
<view class="flex-level">
<navigator bindtap="go_url" data-url="/pages/index/index/index">
<view class="flex-center fs28 white">去首页逛逛</view>
</navigator>
</view>
</view>
<!-- 待评价栏 -->
<view class="stay_evaluate" wx:if="{{comments && comments.length>0}}" wx:for="{{comments}}">
<!-- 商品编号和状态 -->
<view class="Commodity_number flex-vertical-between fs26 padding border_bottom">
<!--商品编号 -->
<block>
<!-- 卡项订单 -->
<view wx:if="{{options.card == 1}}">订单编号:{{item.service_sn}}</view>
<view wx:else>订单编号:{{item.order_sn}}</view>
</block>
<!-- 商品评价状态 -->
<view class="xc-wc">{{item.comment_id>0?'已评价':'待评价'}}</view>
</view>
<!-- 商品详情集合 - 卡项订单 -->
<view class="detail_commoditys" wx:if="{{options.card == 1}}">
<!-- 单个商品 -->
<view>
<navigator class="detail_commodity flex-vertical padding border_bottom" url="{{'/packageA/pages/goodsInfo/goodsInfo?goods_id='+item.goods_id}}">
<!-- 商品图片 -->
<image src="{{iurl + item.img_url}}" binderror="bind_bnerr2" data-errorimg="comments[{{index}}].original_img"></image>
<!-- 商品内容 -->
<view class="Commodity_content">
<view class="Commodity_goods">
<!-- 商品名称 -->
<view class="goods_name ellipsis-2 fs26">{{item.service_name}}</view>
<!-- 商品规格 -->
<!-- <view class="Commodity_spec fs20">
<view class="flex-center">{{item.goods_color+item.goods_spec.length>-1?item.goods_color+item.goods_spec:'规格1'}}</view>
</view> -->
</view>
<!-- 商品价格数量 -->
<view class="Commodity_money flex-vertical-between baseline">
<!-- 商品价格 -->
<view class="flex-vertical xc-wc baseline">
<view class="fs20">¥</view>
<view class="fs30">{{filter.toFix(item.price,2)}}</view>
</view>
<view class="fs26">x{{item.qty}}</view>
</view>
</view>
</navigator>
<!-- 评论信息 -->
<view class="Commodity_evaluation padding border_bottom" wx:if="{{item.comment_id>0}}">
<!-- 评价星级 -->
<view class="starss flex fs26">
<view class="commen">评价:</view>
<view class="stars">
<image src="{{imaitem>=item.deliver_rank?iurl+'/miniapp/images/StarswhiteUnCk.png':iurl+'/miniapp/images/StarsredCk.png'}}" data-ind="{{imaitem}}" data-oo="{{item.deliver_rank}}" wx:for="{{5}}" wx:for-index="imaitem" wx:for-item="{{item_start}}"></image>
</view>
</view>
<!-- 评价内容 -->
<view class="Comment_content ellipsis-2 fs24">{{item.content.length>0?item.content:'此用户没有填写评论'}}</view>
<view class="Comment_images flex">
<image src="{{aitem}}" wx:for-index="i" data-index="{{index}}" wx:for="{{item.weapp_img}}" wx:for-item="aitem" data-sindex="{{i}}" data-name="weapp_img"></image>
</view>
<!-- 商家回复 -->
<view class="reply rel" wx:if="{{item.replay_list}}">
<view class="line_bulge"></view>
<view class="shop-reply fs26">店家回复: </view>
<view class="shop-font fs24" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}">
{{r_item.content}}
</view>
</view>
<!-- 评价时间 -->
<view class="fs24 xc-ash comment_addtime flex-vertical">{{item.comment_addtime}}</view>
</view>
</view>
<!-- 去评价 -->
<view class="commodity_evaluate flex jc_sb padding baseline fs26">
<!-- 商品数量 -->
<view class="commodity_smy flex">
<view>共{{item.qty}}件商品</view>
<!-- 商品总价格 -->
<view class="flex commodity_money">
<view>合计:</view>
<view class="flex baseline xc-wc">
<view class="fs24">¥</view>
<view>{{filter.toFix(item.price,2)}}</view>
</view>
</view>
</view>
<view class="flex">
<!-- <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level View_evaluation fs24" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}">
<view>查看订单</view>
</navigator> -->
<navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level comment_go" url="/packageB/pages/user/view_comment/view_comment?card=1&goods_id={{item.card_id}}&order_id={{item.order_id}}">
<view>查看评价</view>
</navigator>
<navigator wx:if="{{!item.comment_id}}" bindtap="comment" data-recid="{{item.rec_id}}" class="commodity_To_evaluate flex-level comment_go" url="/packageB/pages/user/add_comment/add_comment?card=1&goods_id={{item.card_id}}&order_id={{item.order_id}}&price={{item.price}}">
<view class="fs24">去评价</view>
</navigator>
</view>
</view>
</view>
<!-- 商品详情集合 -->
<view class="detail_commoditys" wx:else>
<!-- 单个商品 -->
<view>
<navigator class="detail_commodity flex-vertical padding border_bottom" url="{{'/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id}}">
<!-- 商品图片 -->
<image src="{{item.original_img}}" binderror="bind_bnerr2" data-errorimg="comments[{{index}}].original_img"></image>
<!-- 商品内容 -->
<view class="Commodity_content">
<view class="Commodity_goods">
<!-- 商品名称 -->
<view class="goods_name ellipsis-2 fs26">{{item.goods_name}}</view>
<!-- 商品规格 -->
<view class="Commodity_spec fs20">
<view class="flex-center">{{item.goods_color+item.goods_spec.length>-1?item.goods_color+item.goods_spec:'规格1'}}</view>
</view>
</view>
<!-- 商品价格数量 -->
<view class="Commodity_money flex-vertical-between baseline">
<!-- 商品价格 -->
<view class="flex-vertical xc-wc baseline">
<view class="fs20">¥</view>
<view class="fs30">{{filter.toFix(item.goods_price,2)}}</view>
</view>
<view class="fs26">x{{item.goods_num}}</view>
</view>
</view>
</navigator>
<!-- 评论信息 -->
<view class="Commodity_evaluation padding border_bottom" wx:if="{{item.comment_id>0}}">
<!-- 评价星级 -->
<view class="starss flex fs26">
<view class="commen">评价:</view>
<view class="stars">
<image src="{{imaitem>=item.deliver_rank?iurl+'/miniapp/images/StarswhiteUnCk.png':iurl+'/miniapp/images/StarsredCk.png'}}" data-ind="{{imaitem}}" data-oo="{{item.deliver_rank}}" wx:for="{{5}}" wx:for-index="imaitem" wx:for-item="{{item_start}}"></image>
</view>
</view>
<!-- 评价内容 -->
<view class="Comment_content ellipsis-2 fs24">{{item.content.length>0?item.content:'此用户没有填写评论'}}</view>
<view class="Comment_images flex">
<image wx:if="{{item.source_type==0 && aitem.length>10}}" data-index="{{index}}" src="{{iurl+aitem}}" wx:for="{{item.img}}" wx:for-item="aitem" wx:for-index="i" data-sindex="{{i}}" data-name="img"></image>
<image wx:if="{{item.source_type==1 && aitem.length>10}}" src="{{iurl+aitem}}" wx:for-index="i" data-index="{{index}}" wx:for="{{item.weapp_img}}" wx:for-item="aitem" data-sindex="{{i}}" data-name="weapp_img"></image>
</view>
<!-- 商家回复 -->
<view class="reply rel" wx:if="{{item.replay_list}}">
<view class="line_bulge"></view>
<view class="shop-reply fs26">店家回复: </view>
<view class="shop-font fs24" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}">
{{r_item.content}}
</view>
</view>
<!-- 评价时间 -->
<view class="fs24 xc-ash comment_addtime flex-vertical">{{item.comment_addtime}}</view>
</view>
</view>
<!-- 去评价 -->
<view class="commodity_evaluate flex jc_sb padding baseline fs26">
<!-- 商品数量 -->
<view class="commodity_smy flex">
<view>共{{item.goods_num}}件商品</view>
<!-- 商品总价格 -->
<view class="flex commodity_money">
<view>合计:</view>
<view class="flex baseline xc-wc">
<view class="fs24">¥</view>
<view>{{filter.toFix(item.goods_price,2)}}</view>
</view>
</view>
</view>
<view class="flex">
<navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level View_evaluation fs24" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}">
<view>查看订单</view>
</navigator>
<navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level comment_go" url="/packageB/pages/user/view_comment/view_comment?goods_id={{item.goods_id}}&order_id={{item.order_id}}">
<view>查看评价</view>
</navigator>
<navigator wx:if="{{!item.comment_id}}" bindtap="comment" data-recid="{{item.rec_id}}" class="commodity_To_evaluate flex-level comment_go" url="{{item.comment_id>0?'/packageB/pages/user/add_comment/add_comment?goods_id={{item.goods_id}}&order_id={{item.order_id}}':''}}">
<view class="fs24">去评价</view>
</navigator>
</view>
</view>
</view>
</view>
<view class="get_bottom fs26" wx:if="{{comments.length>0 && is_no_more}}">已经加载到底部</view>
</view>