Authored by 李奇

首页修改

@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <view class='titleLine'></view> 7 <view class='titleLine'></view>
8 <view class='titleDesc'>{{desc}}</view> 8 <view class='titleDesc'>{{desc}}</view>
9 <view class='titleMore' wx:if='{{more_url?true:false}}' data-jump_rule="{{more_url}}" bindtap="jumpByRule"> 9 <view class='titleMore' wx:if='{{more_url?true:false}}' data-jump_rule="{{more_url}}" bindtap="jumpByRule">
10 - <image class="titleMoreIm" src="./images/more_ic@2x.png" ></image> 10 + <image class="titleMoreIm" src="./images/more_ic@2x.png"></image>
11 </view> 11 </view>
12 </view> 12 </view>
13 </template> 13 </template>
@@ -16,63 +16,69 @@ @@ -16,63 +16,69 @@
16 <view class='newtop'> 16 <view class='newtop'>
17 <view class="search-section" bindtap="searchTapped"> 17 <view class="search-section" bindtap="searchTapped">
18 <view class="tip"> 18 <view class="tip">
19 - <span class="tip-text">搜索品牌名称<image  
20 - class="image-icon" src="./images/search@2x.png"></image> 19 + <span class="tip-text">潮流单品搜一下<image class="image-icon" src="./images/search@2x.png"></image>
21 </span> 20 </span>
22 </view> 21 </view>
23 </view> 22 </view>
24 </view> 23 </view>
25 - <image class='newTopImg' src='images/home-top-bg2@2x.png'></image>  
26 - <image wx:if='{{channelSelect}}' class='channelBg' src='images/channel-bg@2x.png'></image>  
27 - <!-- <image wx:if='{{channelSelect}}' class='channelBg-girl' src='images/channel-bg@2x.png'></image> -->  
28 <view class='channelContainer' wx:if='{{channelSelect}}'> 24 <view class='channelContainer' wx:if='{{channelSelect}}'>
29 <view class='channelItem' bindtap="channelSelected" data-type="boy"> 25 <view class='channelItem' bindtap="channelSelected" data-type="boy">
30 <view class='indicator' style="background-color:{{selectedChannel=='boy' ? 'white':'transparent'}}"></view> 26 <view class='indicator' style="background-color:{{selectedChannel=='boy' ? 'white':'transparent'}}"></view>
31 <view class='channelText' bindtap="channelSelected" data-type="boy">男生</view> 27 <view class='channelText' bindtap="channelSelected" data-type="boy">男生</view>
32 </view> 28 </view>
33 <view class='channelItem' style='border-top: 1rpx solid #ececec;' bindtap="channelSelected" data-type="girl"> 29 <view class='channelItem' style='border-top: 1rpx solid #ececec;' bindtap="channelSelected" data-type="girl">
34 - <view class='indicator' style="background-color:{{selectedChannel=='girl' ? 'white':'transparent'}}" ></view> 30 + <view class='indicator' style="background-color:{{selectedChannel=='girl' ? 'white':'transparent'}}"></view>
35 <view class='channelText' bindtap="channelSelected" data-type="girl">女生</view> 31 <view class='channelText' bindtap="channelSelected" data-type="girl">女生</view>
36 </view> 32 </view>
37 </view> 33 </view>
38 -<view class='scrollview' id='touchContainer'> 34 + <view class='scrollview' id='touchContainer'>
39 35
40 <block wx:for='{{homelist}}' wx:key='{{index}}'> 36 <block wx:for='{{homelist}}' wx:key='{{index}}'>
41 37
42 <block wx:if="{{item.template_name=='focus' || item.template_name=='newFocus'}}"> 38 <block wx:if="{{item.template_name=='focus' || item.template_name=='newFocus'}}">
43 - <template is='newFocus' data='{{data:item.data,f_id:item.template_id,f_index:index,f_name:item.template_name}}'/> 39 + <template is='newFocus'
  40 + data='{{data:item.data,f_id:item.template_id,f_index:index,f_name:item.template_name}}'/>
44 </block> 41 </block>
45 42
46 <block wx:elif="{{item.template_name=='newSingleImage'}}"> 43 <block wx:elif="{{item.template_name=='newSingleImage'}}">
47 <block wx:if="{{item.title}}"> 44 <block wx:if="{{item.title}}">
48 <template is='tipTitle' data="{{desc:item.title}}"/> 45 <template is='tipTitle' data="{{desc:item.title}}"/>
49 </block> 46 </block>
50 - <template is='singleImg' data='{{data:item,f_id:item.template_id,f_index:index,f_name:item.template_name}}'/> 47 + <template is='singleImg'
  48 + data='{{data:item,f_id:item.template_id,f_index:index,f_name:item.template_name}}'/>
51 </block> 49 </block>
52 50
53 <block wx:elif="{{item.template_name=='new_recommend_content_five'}}"> 51 <block wx:elif="{{item.template_name=='new_recommend_content_five'}}">
54 <block wx:if="{{item.title}}"> 52 <block wx:if="{{item.title}}">
55 <template is='tipTitle' data="{{desc:item.title,more_url:item.moreUrl,no_line:true}}"/> 53 <template is='tipTitle' data="{{desc:item.title,more_url:item.moreUrl,no_line:true}}"/>
56 </block> 54 </block>
57 - <template is='category' data="{{windowWidth:windowWidth,data:item.list,f_id:item.template_id,f_index:index,f_name:item.template_name}}"/> 55 + <template is='category'
  56 + data="{{windowWidth:windowWidth,data:item.list,f_id:item.template_id,f_index:index,f_name:item.template_name}}"/>
58 </block> 57 </block>
59 58
60 <block wx:elif="{{item.template_name=='3:4ImageListFloor'}}"> 59 <block wx:elif="{{item.template_name=='3:4ImageListFloor'}}">
61 <block wx:if="{{item.title}}"> 60 <block wx:if="{{item.title}}">
62 <template is='tipTitle' data="{{desc:item.title}}"/> 61 <template is='tipTitle' data="{{desc:item.title}}"/>
63 </block> 62 </block>
64 - <template is='newHorizontalImg' data="{{data:item.list,title:item.title,f_id:item.template_id,f_index:index,f_name:item.template_name,f_name:item.template_name}}"/>  
65 - <view wx:if="{{!item.title}}" style='width:100%;height:16rpx;background-color:white'/><!--兼容空白 后期需优化调整--> 63 + <template is='newHorizontalImg'
  64 + data="{{data:item.list,title:item.title,f_id:item.template_id,f_index:index,f_name:item.template_name,f_name:item.template_name}}"/>
  65 + <view wx:if="{{!item.title}}" style='width:100%;height:16rpx;background-color:white'/>
  66 + <!--兼容空白 后期需优化调整-->
66 </block> 67 </block>
67 68
68 <block wx:elif="{{item.template_name=='popularListFloor'}}"> 69 <block wx:elif="{{item.template_name=='popularListFloor'}}">
69 <scroll-view class="activity-container-footer" scroll-x="true"> 70 <scroll-view class="activity-container-footer" scroll-x="true">
70 <block wx:for="{{item.data.list}}" wx:key="{{index}}" wx:for-item="item"> 71 <block wx:for="{{item.data.list}}" wx:key="{{index}}" wx:for-item="item">
71 <view class="activity-item" bindtap="activityItemTapped" data-skn="{{item.product_skn}}" 72 <view class="activity-item" bindtap="activityItemTapped" data-skn="{{item.product_skn}}"
72 - data-f_id="{{item.template_id}}" data-f_index='{{item.index}}' data-f_inindex='{{index}}' data-f_name='popularListFloor'> 73 + data-f_id="{{item.template_id}}" data-f_index='{{item.index}}' data-f_inindex='{{index}}'
  74 + data-f_name='popularListFloor'>
73 <image src="{{item.default_images}}" class="activity-item-img"></image> 75 <image src="{{item.default_images}}" class="activity-item-img"></image>
74 - <view class="activity-item-price" wx:if="{{item.shop_name && item.display_type == 2}}">{{item.shop_name}}</view>  
75 - <view class="activity-item-price" wx:if="{{item.sales_price && item.display_type == 1}}">¥{{item.sales_price}}</view> 76 + <view class="activity-item-price" wx:if="{{item.shop_name && item.display_type == 2}}">
  77 + {{item.shop_name}}
  78 + </view>
  79 + <view class="activity-item-price" wx:if="{{item.sales_price && item.display_type == 1}}">
  80 + ¥{{item.sales_price}}
  81 + </view>
76 </view> 82 </view>
77 </block> 83 </block>
78 </scroll-view> 84 </scroll-view>
@@ -84,7 +90,8 @@ @@ -84,7 +90,8 @@
84 <scroll-view class="activity-container-footer" scroll-x="true"> 90 <scroll-view class="activity-container-footer" scroll-x="true">
85 <block wx:for="{{item.data.list}}" wx:key="{{index}}" wx:for-item="item"> 91 <block wx:for="{{item.data.list}}" wx:key="{{index}}" wx:for-item="item">
86 <view class="activity-item" bindtap="activityItemTapped" data-skn="{{item.product_skn}}" 92 <view class="activity-item" bindtap="activityItemTapped" data-skn="{{item.product_skn}}"
87 - data-f_id="{{item.template_id}}" data-f_index='{{item.index}}' data-f_inindex='{{index}}' data-f_name='newProductListFloor'> 93 + data-f_id="{{item.template_id}}" data-f_index='{{item.index}}' data-f_inindex='{{index}}'
  94 + data-f_name='newProductListFloor'>
88 <image src="{{item.default_images}}" class="activity-item-img"></image> 95 <image src="{{item.default_images}}" class="activity-item-img"></image>
89 <view class="activity-item-price">{{item.shop_name}}</view> 96 <view class="activity-item-price">{{item.shop_name}}</view>
90 </view> 97 </view>
@@ -94,22 +101,23 @@ @@ -94,22 +101,23 @@
94 </block> 101 </block>
95 102
96 </block> 103 </block>
97 -  
98 -  
99 - <template is='tipTitle' wx:if="{{newChannels[selectedChannel]['recommend']['data']}}" data="{{desc:'猜你喜欢'}}"></template> 104 + <template is='tipTitle' wx:if="{{newChannels[selectedChannel]['recommend']['data']}}"
  105 + data="{{desc:'猜你喜欢'}}"></template>
100 106
101 <view class="likeContainer"> 107 <view class="likeContainer">
102 <block wx:for="{{newChannels[selectedChannel]['recommend']['data']}}" wx:key="{{index}}"> 108 <block wx:for="{{newChannels[selectedChannel]['recommend']['data']}}" wx:key="{{index}}">
103 - <template is="productListCell" data="{{listWidth, listHeight, listImageWidth, listImageHeight, listImageTop, listMarginHorizontal,index,f_index:3, item}}"/> 109 + <template is="productListCell"
  110 + data="{{listWidth, listHeight, listImageWidth, listImageHeight, listImageTop, listMarginHorizontal,index,f_index:3, item}}"/>
104 </block> 111 </block>
105 </view> 112 </view>
106 <!--|| channels[selectedChannel]['recommend']['isLoading']--> 113 <!--|| channels[selectedChannel]['recommend']['isLoading']-->
107 <loading wx:if="{{newChannels[selectedChannel]['isLoading'] }}">加载中</loading> 114 <loading wx:if="{{newChannels[selectedChannel]['isLoading'] }}">加载中</loading>
108 115
109 -</view> 116 + </view>
110 <view class='container_mask' bindtap='hiddenChannel' wx:if='{{channelSelect}}'></view> 117 <view class='container_mask' bindtap='hiddenChannel' wx:if='{{channelSelect}}'></view>
111 </view> 118 </view>
112 -<quickNavigation id="quickNavigation" isShowIndicator="{{isShowIndicator}}" isShowShopCart="{{true}}" isShowMenu="{{false}}" marginBottom="{{50}}" bind:backToTop="backToTop"></quickNavigation> 119 +<quickNavigation id="quickNavigation" isShowIndicator="{{isShowIndicator}}" isShowShopCart="{{true}}"
  120 + isShowMenu="{{false}}" marginBottom="{{50}}" bind:backToTop="backToTop"></quickNavigation>
113 <import src="../../vendors/toast/wetoast.wxml"/> 121 <import src="../../vendors/toast/wetoast.wxml"/>
114 <template is="wetoast" data="{{...__wetoast__}}"/> 122 <template is="wetoast" data="{{...__wetoast__}}"/>
115 123
1 -/**index.wxss**/  
2 @import "../goodsList/productListCell.wxss"; 1 @import "../goodsList/productListCell.wxss";
3 @import "../homefloor/homefloor.wxss"; 2 @import "../homefloor/homefloor.wxss";
  3 +
4 .container { 4 .container {
5 background-color: white; 5 background-color: white;
6 display: flex; 6 display: flex;
7 flex-direction: column; 7 flex-direction: column;
8 } 8 }
9 .scrollview{ 9 .scrollview{
10 - /* margin-top: 96rpx; */  
11 - background-color:white; /*#f0f0f0*/  
12 - /*background-color: white;  
13 - position: relative;  
14 - display: flex;  
15 - flex-direction: column;  
16 - justify-content: flex-start;  
17 - white-space: nowrap */ 10 + background-color:white;
18 } 11 }
  12 +
19 .top { 13 .top {
20 display: flex; 14 display: flex;
21 flex-direction: column; 15 flex-direction: column;
@@ -56,7 +50,6 @@ @@ -56,7 +50,6 @@
56 font-size: 30rpx; 50 font-size: 30rpx;
57 font-family: PingFang SC; 51 font-family: PingFang SC;
58 padding-left: 10rpx; 52 padding-left: 10rpx;
59 -  
60 font-weight: 500; 53 font-weight: 500;
61 line-height: 2.57; 54 line-height: 2.57;
62 letter-spacing: 1.1px; 55 letter-spacing: 1.1px;
@@ -87,7 +80,6 @@ @@ -87,7 +80,6 @@
87 padding-bottom: 18rpx; 80 padding-bottom: 18rpx;
88 color:#b0b0b0; 81 color:#b0b0b0;
89 font-family: PingFang SC; 82 font-family: PingFang SC;
90 - /*background-color: red;*/  
91 } 83 }
92 84
93 .navTextSelected { 85 .navTextSelected {
@@ -144,16 +136,11 @@ @@ -144,16 +136,11 @@
144 height: 250rpx; 136 height: 250rpx;
145 white-space: nowrap; 137 white-space: nowrap;
146 padding-left: 8rpx; 138 padding-left: 8rpx;
147 - /*padding-right: 8rpx;*/  
148 } 139 }
149 140
150 .brandItem { 141 .brandItem {
151 display: inline-block; 142 display: inline-block;
152 margin: 16rpx 8rpx 16rpx 8rpx; 143 margin: 16rpx 8rpx 16rpx 8rpx;
153 - /* margin-left: 8rpx;  
154 - margin-right: 8rpx;  
155 - margin-top: 8rpx;  
156 - margin-bottom: 0rpx; */  
157 } 144 }
158 145
159 ::-webkit-scrollbar { 146 ::-webkit-scrollbar {
@@ -180,7 +167,6 @@ @@ -180,7 +167,6 @@
180 flex-wrap: wrap; 167 flex-wrap: wrap;
181 background-color: white; 168 background-color: white;
182 border-top: 1rpx solid #dddddd; 169 border-top: 1rpx solid #dddddd;
183 - /*border-bottom: 1rpx solid #dddddd;*/  
184 } 170 }
185 171
186 .category { 172 .category {
@@ -188,7 +174,6 @@ @@ -188,7 +174,6 @@
188 flex-direction: column; 174 flex-direction: column;
189 align-items: center; 175 align-items: center;
190 border-bottom: 1rpx solid #dddddd; 176 border-bottom: 1rpx solid #dddddd;
191 -  
192 } 177 }
193 178
194 .categoryTitle { 179 .categoryTitle {
@@ -211,51 +196,6 @@ @@ -211,51 +196,6 @@
211 background-color: white; 196 background-color: white;
212 } 197 }
213 198
214 -/* .product {  
215 - display: flex;  
216 - flex-direction: column;  
217 - background-color: white;  
218 -} */  
219 -  
220 -/* .productImage {  
221 - display: block;  
222 -  
223 -} */  
224 -  
225 -/* .productTitle {  
226 - margin-top: 30rpx;  
227 - margin-bottom: 12rpx;  
228 - color: #444444;  
229 - font-family: PingFang SC;  
230 - font-size: 24rpx; */  
231 - /*font-weight: bold;*/  
232 - /* line-height: 30rpx;  
233 - display: -webkit-box;  
234 - -webkit-box-orient: vertical;  
235 - -webkit-line-clamp: 2;  
236 - overflow: hidden;  
237 - height: 60rpx;  
238 -} */  
239 -  
240 -/* .priceContainer {  
241 - display: flex;  
242 - flex-direction: row;  
243 - margin-top: 10rpx;  
244 - margin-bottom: 30rpx;  
245 -} */  
246 -/*  
247 -.price1 {  
248 - font-size: 24rpx;  
249 - color: #d0021b;  
250 -} */  
251 -  
252 -/* .price2 {  
253 - margin-left: 10rpx;  
254 - font-size: 24rpx;  
255 - color: #b0b0b0;  
256 - text-decoration: line-through;  
257 -} */  
258 -  
259 .likeContainer { 199 .likeContainer {
260 display: flex; 200 display: flex;
261 flex-direction: row; 201 flex-direction: row;
@@ -291,9 +231,6 @@ @@ -291,9 +231,6 @@
291 .activity-container-footer { 231 .activity-container-footer {
292 white-space: nowrap; 232 white-space: nowrap;
293 background-color: white; 233 background-color: white;
294 - /* display: flex;  
295 - flex-direction: row;  
296 - align-items: center */  
297 } 234 }
298 235
299 .activity-item { 236 .activity-item {
@@ -344,7 +281,6 @@ @@ -344,7 +281,6 @@
344 height:500rpx; 281 height:500rpx;
345 282
346 } 283 }
347 -/* 以下标题模板所用样式 */  
348 .titleContainer{ 284 .titleContainer{
349 background-color: white; 285 background-color: white;
350 display: flex; 286 display: flex;
@@ -366,7 +302,6 @@ @@ -366,7 +302,6 @@
366 font-size:30rpx; 302 font-size:30rpx;
367 margin-left: 16rpx; 303 margin-left: 16rpx;
368 font-weight: 600; 304 font-weight: 600;
369 - /* line-height: 2.75; */  
370 } 305 }
371 .titleMore{ 306 .titleMore{
372 width: 48rpx; 307 width: 48rpx;
@@ -397,15 +332,40 @@ @@ -397,15 +332,40 @@
397 align-items: center; 332 align-items: center;
398 z-index: 1000; 333 z-index: 1000;
399 } 334 }
400 -.newTopImg{  
401 - position: fixed;  
402 - top: 0;  
403 - left: 0;  
404 - height: 96rpx;  
405 - width: 100%;  
406 - z-index: 999; 335 +
  336 +.search-section {
  337 + height: 72rpx;
  338 + padding: 18rpx 30rpx;
  339 + background-color: #fff;
  340 + box-sizing: content-box;
  341 + flex: 1;
  342 +}
  343 +
  344 +.search-section .tip {
  345 + font-family: PingFang-SC-Regular, sans-serif;
  346 + height: 72rpx;
  347 + font-size: 28rpx;
  348 + color: #b0b0b0;
  349 + text-align: center;
  350 + line-height: 72rpx;
  351 + border-radius: 40rpx;
  352 + background: #f7f7f7;
  353 +}
  354 +
  355 +.search-section .tip-text {
  356 + position: relative;
  357 + left: 40rpx;
  358 +}
  359 +
  360 +.search-section .image-icon {
  361 + position: absolute;
  362 + height: 30rpx;
  363 + width: 30rpx;
  364 + top: 6rpx;
  365 + left: -40rpx;
407 } 366 }
408 -.newsearch{ 367 +
  368 +.newsearch {
409 height: 70rpx; 369 height: 70rpx;
410 width: 615rpx; 370 width: 615rpx;
411 margin-left: 30rpx; 371 margin-left: 30rpx;
@@ -418,7 +378,7 @@ @@ -418,7 +378,7 @@
418 left: 0rpx 378 left: 0rpx
419 } 379 }
420 380
421 -.channelContainer{ 381 +.channelContainer {
422 width: 100%; 382 width: 100%;
423 top: 96rpx; 383 top: 96rpx;
424 position: fixed; 384 position: fixed;
@@ -427,7 +387,8 @@ @@ -427,7 +387,8 @@
427 height: wrap; 387 height: wrap;
428 z-index: 1000; 388 z-index: 1000;
429 } 389 }
430 -.channelItem{ 390 +
  391 +.channelItem {
431 height: 100rpx; 392 height: 100rpx;
432 width: 750rpx; 393 width: 750rpx;
433 display: flex; 394 display: flex;
@@ -435,41 +396,38 @@ @@ -435,41 +396,38 @@
435 flex-direction: row; 396 flex-direction: row;
436 align-items: center; 397 align-items: center;
437 } 398 }
438 -/* .channelBg-girl{  
439 - position: fixed;  
440 - height: 100rpx;  
441 - width: 750rpx;  
442 - top: 197rpx;  
443 - z-index: 999;  
444 - border-top: 1rpx solid #ececec;  
445 -} */  
446 -.channelBg{ 399 +
  400 +.channelBg {
447 position: fixed; 401 position: fixed;
448 height: 201rpx; 402 height: 201rpx;
449 width: 750rpx; 403 width: 750rpx;
450 top: 96rpx; 404 top: 96rpx;
451 z-index: 999; 405 z-index: 999;
452 } 406 }
453 -.indicator{ 407 +
  408 +.indicator {
454 width: 10rpx; 409 width: 10rpx;
455 height: 10rpx; 410 height: 10rpx;
456 background-color: white; 411 background-color: white;
457 } 412 }
458 -.channelText{ 413 +
  414 +.channelText {
459 font-family: PingFang-SC; 415 font-family: PingFang-SC;
460 font-size: 40rpx; 416 font-size: 40rpx;
461 font-weight: 600; 417 font-weight: 600;
462 text-align: left; 418 text-align: left;
463 color: #ffffff; 419 color: #ffffff;
464 - margin-left: 20rpx 420 + margin-left: 20rpx;
465 } 421 }
466 -.channelIcon{ 422 +
  423 +.channelIcon {
467 width: 48rpx; 424 width: 48rpx;
468 height: 38rpx; 425 height: 38rpx;
469 margin-left: 30rpx; 426 margin-left: 30rpx;
470 margin-right: 30rpx 427 margin-right: 30rpx
471 } 428 }
472 -.container_mask{ 429 +
  430 +.container_mask {
473 position: fixed; 431 position: fixed;
474 top: 96; 432 top: 96;
475 z-index: 555; 433 z-index: 555;
@@ -478,36 +436,4 @@ @@ -478,36 +436,4 @@
478 background: #333; 436 background: #333;
479 filter: alpha(opacity=0); 437 filter: alpha(opacity=0);
480 opacity: 0.0; 438 opacity: 0.0;
481 -  
482 -}  
483 -  
484 -.search-section {  
485 - height: 72rpx;  
486 - padding: 18rpx 30rpx;  
487 - background-color: #fff;  
488 - box-sizing: content-box;  
489 -}  
490 -  
491 -.search-section .tip {  
492 - font-family: PingFang-SC-Regular, sans-serif;  
493 - height: 72rpx;  
494 - font-size: 28rpx;  
495 - color: #b0b0b0;  
496 - text-align: center;  
497 - line-height: 72rpx;  
498 - border-radius: 40rpx;  
499 - background: #f7f7f7;  
500 -}  
501 -  
502 -.search-section .tip-text {  
503 - position: relative;  
504 - left: 40rpx;  
505 -}  
506 -  
507 -.search-section .image-icon {  
508 - position: absolute;  
509 - height: 30rpx;  
510 - width: 30rpx;  
511 - top: 6rpx;  
512 - left: -40rpx;  
513 } 439 }