index.wxml 6.01 KB
<!--index.wxml-->
<import src="../goodsList/productListCell.wxml"/>
<import src="../homefloor/homefloor.wxml"/>
<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' wx:if='{{more_url?true:false}}' data-jump_rule="{{more_url}}" bindtap="jumpByRule">
      <image class="titleMoreIm" src="./images/more_ic@2x.png" ></image> 
    </view> 
  </view>
</template>

<view class="container">
  <view  class='newtop'>
        <view class="search-section" bindtap="searchTapped">
          <view class="tip">
            <span class="tip-text">搜索品牌名称<image
                class="image-icon" src="./images/search@2x.png"></image>
            </span>
          </view>
        </view>
  </view>
  <image class='newTopImg' src='images/home-top-bg2@2x.png'></image> 
  <image wx:if='{{channelSelect}}' class='channelBg' src='images/channel-bg@2x.png'></image>
  <!-- <image wx:if='{{channelSelect}}' class='channelBg-girl' src='images/channel-bg@2x.png'></image> -->
  <view class='channelContainer' wx:if='{{channelSelect}}'>
    <view class='channelItem' bindtap="channelSelected" data-type="boy">
      <view class='indicator' style="background-color:{{selectedChannel=='boy' ? 'white':'transparent'}}"></view>
      <view class='channelText' bindtap="channelSelected" data-type="boy">男生</view>
    </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' bindtap="channelSelected" data-type="girl">女生</view>
    </view>
  </view>
<view class='scrollview' id='touchContainer'>

    <block wx:for='{{homelist}}' wx:key='{{index}}'>

      <block wx:if="{{item.template_name=='focus' || item.template_name=='newFocus'}}">
        <template is='newFocus' data='{{data:item.data,f_id:item.template_id,f_index:index,f_name:item.template_name}}'/>
      </block>

      <block wx:elif="{{item.template_name=='newSingleImage'}}">
         <block wx:if="{{item.title}}">
          <template is='tipTitle' data="{{desc:item.title}}"/>
        </block> 
        <template is='singleImg' data='{{data:item,f_id:item.template_id,f_index:index,f_name:item.template_name}}'/>
      </block>

      <block wx:elif="{{item.template_name=='new_recommend_content_five'}}">
         <block wx:if="{{item.title}}">
          <template is='tipTitle' data="{{desc:item.title,more_url:item.moreUrl,no_line:true}}"/>
        </block>
        <template is='category' data="{{windowWidth:windowWidth,data:item.list,f_id:item.template_id,f_index:index,f_name:item.template_name}}"/>
      </block>

      <block wx:elif="{{item.template_name=='3:4ImageListFloor'}}">
        <block wx:if="{{item.title}}">
          <template is='tipTitle' data="{{desc:item.title}}"/>
        </block>
        <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}}"/>
        <view wx:if="{{!item.title}}" style='width:100%;height:16rpx;background-color:white'/><!--兼容空白 后期需优化调整-->
      </block>

      <block wx:elif="{{item.template_name=='popularListFloor'}}">
       <scroll-view class="activity-container-footer" scroll-x="true">
          <block wx:for="{{item.data.list}}" wx:key="{{index}}" wx:for-item="item">
            <view class="activity-item" bindtap="activityItemTapped" data-skn="{{item.product_skn}}"
             data-f_id="{{item.template_id}}" data-f_index='{{item.index}}' data-f_inindex='{{index}}' data-f_name='popularListFloor'>
                <image src="{{item.default_images}}" class="activity-item-img"></image>
                <view class="activity-item-price" wx:if="{{item.shop_name && item.display_type == 2}}">{{item.shop_name}}</view>
                <view class="activity-item-price" wx:if="{{item.sales_price && item.display_type == 1}}">¥{{item.sales_price}}</view>
            </view>
          </block>
      </scroll-view>
        <!-- <template is='horProductList' data='{{data:item.data.list}}'/> -->
    </block>


    <block wx:elif="{{item.template_name=='newProductListFloor'}}">    
       <scroll-view class="activity-container-footer" scroll-x="true">
        <block wx:for="{{item.data.list}}" wx:key="{{index}}" wx:for-item="item">
          <view class="activity-item" bindtap="activityItemTapped" data-skn="{{item.product_skn}}"
          data-f_id="{{item.template_id}}" data-f_index='{{item.index}}' data-f_inindex='{{index}}' data-f_name='newProductListFloor'>
            <image src="{{item.default_images}}" class="activity-item-img"></image>
            <view class="activity-item-price">{{item.shop_name}}</view>
          </view>
        </block>
      </scroll-view>
        <!-- <template is='horProductList' data='{{data:item.data.list}}'/> -->
    </block>

  </block>
    

    <template is='tipTitle' wx:if="{{newChannels[selectedChannel]['recommend']['data']}}" data="{{desc:'猜你喜欢'}}"></template>

  <view class="likeContainer">
    <block wx:for="{{newChannels[selectedChannel]['recommend']['data']}}" wx:key="{{index}}">
        <template is="productListCell" data="{{listWidth, listHeight, listImageWidth, listImageHeight, listImageTop, listMarginHorizontal,index,f_index:3, item}}"/>
    </block>
  </view>
  <!--|| channels[selectedChannel]['recommend']['isLoading']-->
  <loading wx:if="{{newChannels[selectedChannel]['isLoading'] }}">加载中</loading>

</view>
  <view class='container_mask' bindtap='hiddenChannel' wx:if='{{channelSelect}}'></view>
</view>
<quickNavigation id="quickNavigation" isShowIndicator="{{isShowIndicator}}" isShowShopCart="{{true}}" isShowMenu="{{false}}" marginBottom="{{50}}" bind:backToTop="backToTop"></quickNavigation>  
<import src="../../vendors/toast/wetoast.wxml"/>
<template is="wetoast" data="{{...__wetoast__}}"/>