index.ttml
9.05 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
<template name='tipTitle'>
<view class='titleContainer'
style="border-bottom:{{no_line?'0.5rpx solid #ffffff':'0.5rpx solid #e0e0e0'}}">
<view class='titleLine'></view>
<view class='titleDesc'>{{desc}}</view>
<view class='titleMore' tt:if='{{more_url?true:false}}' data-jump_rule="{{more_url}}" bindtap="jumpByRuleEvent">
<image class="titleMoreIm" src="../../images/more_ic@2x.png" ></image>
</view>
</view>
</template>
<view class="container">
<view class='newtop'>
<view class='newsearch' bindtap="searchTapped">
<image class="serachIcon" src="../../images/home_search@2x.png"></image>
<view class="serach_view_show">潮流单品搜一下</view>
</view>
<view class='scanCodeIconView'>
<image class="scanCodeIcon" catchtap="scanCodeTapped" src="../../images/home_qr_new@3x.png"></image>
</view>
<image bindtap='selectChannel' class="channelIcon" src='../../images/ceb-ic@2x.png'></image>
</view>
<image class='newTopImg' src='../../images/home-top-bg2@2x.png'></image>
<image tt:if='{{channelSelect}}' class='channelBg' src='../../images/channel-bg@2x.png'></image>
<form bindsubmit='formSubmitFromSwitchGender' report-submit='true'>
<view class='channelContainer' tt:if='{{channelSelect}}'>
<view class='channelItem' data-type="boy" bindtap="channelSelected">
<view class='indicator' style="background-color:{{selectedChannel=='boy' ? 'white':'transparent'}}"></view>
<view class='channelText' data-type="boy">男生
</view>
<button class='channelButton' style='top: 0rpx;'
form-type='submit' data-type="boy"></button>
</view>
<view class='channelItem' style='border-top: 1rpx solid #ececec;' bindtap="channelSelected" data-type="girl">
<view class='indicator' style="background-color:{{selectedChannel=='girl' ? 'white':'transparent'}}" ></view>
<view class='channelText' data-type="girl">女生
</view>
<button class='channelButton' style='top: 100rpx'
form-type='submit' data-type="girl"></button>
</view>
<view class='channelItem' style='border-top: 1rpx solid #ececec;' bindtap="jumpToYohood">
<view class='channelText'>YOHOOD</view>
<button class='channelButton' style='top: 200rpx;' form-type='submit' data-type="yohood"></button>
</view>
</view>
<scroll-view id='fixedFilterViewCTop' scroll-y="true" class="mainContainer" style="height:{{windowHeight}};">
<block tt:for='{{homelist}}' tt:key='{{index}}'>
<block tt:if="{{item.template_name=='focus' || item.template_name=='newFocus'}}">
<home-banner data="{{item.data}}" bindjumpByRule="jumpByRuleEvent"></home-banner>
</block>
<block tt:elif="{{item.template_name=='image_list' && item.data.list.length == 4}}">
<home-four-images data="{{{data:item.data.list,f_id:item.template_id,f_index:index,f_name:item.template_name}}}" bindjumpByRule="jumpByRuleEvent"></home-four-images>
</block>
<block tt:elif="{{item.template_name == 'twoPicture'}}">
<block tt:if="{{item.title}}">
<template is='tipTitle' data="{{desc:item.title,more_url:item.moreUrl,no_line:false}}"/>
</block>
<home-two-images data="{{{data:item.data,f_id:item.template_id,f_index:index,f_name:item.template_name,ratio:item.ratio,title:item.title}}}" bindjumpByRule="jumpByRuleEvent"></home-two-images>
</block>
<block tt:elif="{{item.template_name=='newSingleImage'}}">
<block tt:if="{{item.title}}">
<template is='tipTitle' data="{{desc:item.title}}"/>
</block>
<home-single-image item="{{{data:item,f_id:item.template_id,f_index:index,f_name:item.template_name}}}" bindjumpByRule="jumpByRuleEvent"></home-single-image>
</block>
<!-- <block tt:elif="{{item.template_name=='sv_new_user_floor'}}">
<template is='newCustomerBanner' data="{{newCustomer: newCustomer, data:item.data.banner_image}}" />
</block> -->
<block tt:elif="{{item.template_name=='new_recommend_content_five'}}">
<block tt:if="{{item.title}}">
<template is='tipTitle' data="{{desc:item.title,more_url:item.moreUrl,no_line:true}}"/>
</block>
<home-hot-category data="{{item.list}}" bindjumpByRule="jumpByRuleEvent"></home-hot-category>
</block>
<block tt:elif="{{item.template_name=='3:4ImageListFloor'}}">
<block tt:if="{{item.title}}">
<template is='tipTitle' data="{{desc:item.title}}"/>
</block>
<home-brand data="{{item.list}}" bindjumpByRule="jumpByRuleEvent"></home-brand>
<view tt:if="{{!item.title}}" style='width:100%;height:16rpx;background-color:white'/><!--兼容空白 后期需优化调整-->
</block>
<!--拼团购商品列表-->
<block tt:elif="{{item.template_name=='collageBuyPrdList'}}">
<home-group-booking data="{{item.prdList}}" bindjumpByRule="jumpByRuleEvent"></home-group-booking>
</block>
<block tt:elif="{{item.template_name=='newProductListFloor'}}">
<home-hor-product-list data="{{item.data}}"></home-hor-product-list>
</block>
<block tt:elif="{{item.template_name=='popularListFloor'}}">
<home-hor-product-list data="{{item.data}}"></home-hor-product-list>
</block>
</block>
<!-- 商品推荐 -->
<!-- <block tt:if="{{newChannels[selectedChannel]['recommend']['data'].length > 0}}">
<template is='tipTitle' data="{{desc:'猜你喜欢'}}"/>
<view class="product-list">
<block tt:for="{{newChannels[selectedChannel]['recommend']['data']}}" tt:for-item="product" tt:key="{{index}}">
<productCell id="productCell" item="{{product}}"/>
</block>
</view>
</block> -->
<block tt:if="{{homeTabs.length > 0}}">
<view class="fixedFilterNormalBack {{fixedFilter ? 'fixedFilter' : ''}}" style="top:{{homelist.length==0?'96':'0'}}rpx">
<view class="fixedFilterNormalView">
<block tt:if="{{homeTabs.length == 2}}">
<view class="fixedFilterItem" data-type='0' bindtap='fixedFilterTapped'>
<view class="{{currentFixedFilterIndex==0 ? 'fixedFilterTextSelect' : 'fixedFilterTextNormal'}}" style='margin-left: 70rpx;'>{{homeTabs[0].content}}</view>
</view>
<view class="fixedFilterItem" data-type='1' bindtap='fixedFilterTapped'>
<view class="{{currentFixedFilterIndex==1 ? 'fixedFilterTextSelect' : 'fixedFilterTextNormal'}}" style='margin-right: 70rpx;'>{{homeTabs[1].content}}</view>
</view>
</block>
<block tt:elif='homeTabs.length == 1'>
<view class="fixedFilterItem" data-type='0' bindtap='fixedFilterTapped'>
<view class="fixedFilterTextSelect">{{homeTabs[0].content}}</view>
</view>
</block>
</view>
</view>
<view class='guang' style='padding-top:{{homelist.length==0?"96":"0"}}rpx'>
<view class='sLine' tt:if="{{fixedFilter}}"></view>
<view id='fixedFilterViewC' style='height: 1rpx;width: 100%;background-color: white;z-index: 1090;position: relative;'></view>
<block tt:if="{{homeTabs[currentFixedFilterIndex].type == 1}}">
<block tt:for="{{guangList.list}}" tt:key="{{index}}">
<form bindsubmit='formSubmitFromGuangArt' report-submit='true'>
<view class='guangArtContent' tt:if="{{item.type==1}}"
data-f_inindex='{{index}}' data-article-id='{{item.id}}'
bindtap='tappedGuangArtContent'>
<button class='guangItemButton'form-type='submit'></button>
<image class="artImage" src="{{item.src}}" ></image>
<text class="artTitle">{{item.title}}</text>
<text class='artType'># {{item.min_category_name}}</text>
</view>
<view class='space' tt:if="{{item.type==1}}"></view>
<view class='line' tt:if="{{item.type==1}}"></view>
</form>
</block>
</block>
<block tt:elif='{{homeTabs[currentFixedFilterIndex].type == 2}}'>
<view class="likeContainer">
<block tt:for="{{newChannels[selectedChannel]['recommend']['data']}}" tt:key="{{index}}">
<view class='suggestCell' data-f_inindex='{{index}}' catchtap="productCellTapped" data-product-item="{{item}}">
<view class='left'>
<image class="activityImage" src="{{item.default_images}}"></image>
</view>
<view class='right'>
<view class='titleView'>
<text class="title">{{item.product_name}}</text>
</view>
<view class='priceView'>
<text class="icon">¥</text>
<text class="price1">{{item.salePriceFixed2}}</text>
<text tt:if="{{item.showOriginPrice}}" class="price2">¥{{item.originPriceFixed2}}</text>
</view>
<view class='brandView' tt:if="{{item.shop_id}}" catchtap="brandCellTapped" data-product-item="{{item}}">
<image class="brandicon" src="../../images/dianpu@2x.png"></image>
<text class="brandTitle">{{item.shop_name}}</text>
<image class="brandArrowIcon" src="../../images/go@2x.png"></image>
</view>
</view>
</view>
<view class='spaceLine'/>
</block>
</view>
</block>
</view>
</block>
</scroll-view>