couponCell.ttml
4.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
<view class='couponCell' catchtap='selectCouponTap'>
<view class='couponCellLeftView'>
<block tt:if="{{item.catalog == 100}}">
<image class="couponCellLeftBackImage" src="{{itemAvailableed==1 ? './images/bgyellow@3x.png' : './images/bggrey@3x.png'}}"/>
</block>
<block tt:if="{{item.catalog == 200}}">
<image class="couponCellLeftBackImage" src="{{itemAvailableed==1 ? './images/bgred@3x.png' : './images/bggrey@3x.png'}}"/>
</block>
<block tt:if="{{item.catalog == 300}}">
<image class="couponCellLeftBackImage" src="{{itemAvailableed==1 ? './images/bgblack@3x.png' : './images/bggrey@3x.png'}}"/>
</block>
<view class='couponCellLeft' style="box-shadow:{{!showComment ? '0 0 0 0 #E0E0E0;' : '0 4px 5px -3px #E0E0E0;'}}" >
<block tt:if="{{item.catalog == 100}}">
<view class='priceView'>
<text class='price' style="color: {{itemAvailableed==1 ? '#FFA72E' : '#B0B0B0'}};">{{item.coupon_value_str}}</text>
</view>
<text class='priceDetail' style="color: {{itemAvailableed==1 ? '#FFA72E' : '#B0B0B0'}};">{{item.use_rule}}</text>
</block>
<block tt:if="{{item.catalog == 200}}">
<view class='priceView'>
<text class='price' style="color: {{itemAvailableed==1 ? '#FC5960' : '#B0B0B0'}};">{{item.coupon_value_str}}</text>
</view>
<text class='priceDetail' style="color: {{itemAvailableed==1 ? '#FC5960' : '#B0B0B0'}};">{{item.use_rule}}</text>
</block>
<block tt:if="{{item.catalog == 300}}">
<text class='yunfeiName' style="color: {{itemAvailableed==1 ? '#222222': '#B0B0B0'}};">{{item.coupon_value_str}}</text>
</block>
</view>
</view>
<view class='couponCellRightView' style="box-shadow:{{!showComment ? '0 0 0 0 #E0E0E0;' : '0 4px 5px -3px #E0E0E0;'}}" >
<image class="couponCellRightViewBackImage" src="./images/bg@3x.png"/>
<view class='couponCellRight'>
<view class='couponCellRightTop' style="color: {{itemAvailableed==1 ? '#444444' : '#B0B0B0'}};">
<block tt:if="{{item.catalog == 100}}">
<text class='couponIcon' style="color: {{itemAvailableed==1 ? '#FFA72E' : '#B0B0B0'}};">[{{item.catalog_name}}]</text>
</block>
<block tt:if="{{item.catalog == 200}}">
<text class='couponIcon' style="color: {{itemAvailableed==1 ? '#FC5960' : '#B0B0B0'}};">[{{item.catalog_name}}]</text>
</block>
<block tt:if="{{item.catalog == 300}}">
<text class='couponIcon' style="color: {{itemAvailableed==1 ? '#222222' : '#B0B0B0'}};">[{{item.catalog_name}}]</text>
</block>
{{item.coupon_name}}
</view>
<view class='couponCellRightMiddle'>
<text class='time' style='color: #B0B0B0;'>{{item.coupon_validity}}</text>
</view>
<view class='couponCellRightBottom'>
<block tt:if="{{itemType==5 || itemType==6}}">
<view class='commentViewButton'>
<text class='commentDesText' style="color: {{itemType==5 ? '#444444;':'#B0B0B0'}}">{{item.desc}}</text>
</view>
</block>
<block tt:else>
<view class='commentViewButton' catchtap='showCommentTap'>
<text class='commentButtonText' style='color: #B0B0B0;'>使用说明</text>
<image class="arrowIcon" style="transform: rotate({{!showComment ? '0':'180'}}deg);" src="./images/down@3x.png"/>
</view>
<text class='useButton' catchtap='useButtonTap' tt:if="{{itemType==2 && item.is_online_avail}}">立即使用</text>
</block>
<image class="rightIcon" tt:if="{{itemType==3 || itemType==4}}" src="{{itemType==3 ? './images/yishiyong@3x.png' : './images/guoqi@3x.png'}}"/>
<block tt:if="{{itemType==5 && item.is_selected_support == 'N'}}">
<view class='selectIconView'>
<image class="selectIcon" src="{{'./images/grey@3x.png'}}"/>
</view>
</block>
<block tt:if="{{itemType==5 && item.is_selected_support == 'Y'}}">
<view class='selectIconView'>
<image class="selectIcon" src="{{item.selected == 'Y' ? './images/gou@3x.png' : './images/Oval@3x.png'}}"/>
</view>
</block>
</view>
</view>
</view>
<block tt:if="{{item.is_overdue_soon == 'Y'}}">
<image class="overduSoonIcon" src="./images/tip@3x.png"/>
</block>
</view>
<view class='commentView' tt:if="{{showComment}}">
<view style="background: rgba(255, 255, 255, 0.7);width: 100%;height: 22rpx "/>
<block tt:for='{{item.notes}}' tt:key='{{index}}'>
<text class='commentText1' style="color: {{itemAvailableed==1 ? '#444444' : '#B0B0B0'}};">{{item}}</text>
</block>
</view>