<view class="container" style="padding-bottom: 100rpx;">
 <view class="no-login" wx:if="{{!hasLogin}}">
    <view class="c">
      <text>您还没有注册</text>
      <button  open-type="getUserInfo" bindgetuserinfo="goLogin">点击授权微信登录</button>
    </view>
  </view>
  <view class='login' wx:else>
  <view class="search">
    <!-- <picker mode="selector" style="font-size:32rpx" range="{{citys}}" value="{{cityIndex}}" bindchange="listenerCitySelected">
    <view style="width: 160rpx;text-align: center;display: flex;">
      <image style="width: 45rpx;height: 45rpx;" src="/static/images/address.png"></image>
      <view style="font-size:32rpx">{{city}}</view>
    </view>
    </picker> -->

    <navigator url="/pages/mall/search/search" class="input">
      <van-icon name="search" size="16px"/>
      <text class="txt">商品搜索, 共{{goodsCount}}款好物</text>
    </navigator>
  </view>
  <view class="catalog">
    <scroll-view class="nav" scroll-y="true">
      <view class="item {{ currentCategory.id == item.id ? 'active' : ''}}" wx:for="{{categoryList}}" wx:key="id" data-id="{{item.id}}" data-index="{{index}}"  data-name="{{item.categoryName}}" bindtap="switchCate">{{item.categoryName}}</view>
    </scroll-view>
    <scroll-view class="cate" scroll-y="true">
     
      <!-- <navigator url="/pages/servant/servantList/servantList" class="banner"  wx:if="{{currentCategory.name=='保姆/月嫂'}}">
        <image class="category-banner"  mode="aspectFill" src="{{currentCategory.picUrl}}"></image>
     
      </navigator> -->
      <!-- wx:for="{{goodsList}}" wx:for-index="idx" wx:for-item="category" wx:key="id" -->
      <view wx:if="{{goodsList.length > 0}}"   wx:for="{{goodsList}}" wx:for-index="idx" wx:for-item="category" wx:key="id">
       <view class="hd" >
     
        <text class="txt">{{category.categoryName}}</text>
      </view> 
  

    
		<view class="a-section a-popular" > 
			<view class="b category-line">
				<view class="item" wx:for="{{category.spus}}" wx:for-index="index" wx:for-item="item" wx:key="id">
					<navigator url="/pages/mall/goods/goods?id={{item.id}}" class="product-item">
            <image class="img" src="{{item.picAddress.length>=1?item.picAddress[0]:''}}" mode="aspectFill"></image>
            <view class="product-name">{{item.commodityName}}</view>
					
					</navigator>
				</view>
			</view>
		</view>
  </view>


    </scroll-view>
  </view>
  </view>

   <!--广告-->
   <!-- <view class="adv" bindtap='goinviteFriends'>
    <view  style="width:100%;height:100%">
      <image src="/static/images/active/xyhxd.jpg" style="width:100%;height:100%" /> 
    </view>
  </view> -->

</view>