catalog.wxml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <view class="container" style="padding-bottom: 100rpx;">
  2. <view class="no-login" wx:if="{{!hasLogin}}">
  3. <view class="c">
  4. <text>您还没有注册</text>
  5. <button open-type="getUserInfo" bindgetuserinfo="goLogin">点击授权微信登录</button>
  6. </view>
  7. </view>
  8. <view class='login' wx:else>
  9. <view class="search">
  10. <!-- <picker mode="selector" style="font-size:32rpx" range="{{citys}}" value="{{cityIndex}}" bindchange="listenerCitySelected">
  11. <view style="width: 160rpx;text-align: center;display: flex;">
  12. <image style="width: 45rpx;height: 45rpx;" src="/static/images/address.png"></image>
  13. <view style="font-size:32rpx">{{city}}</view>
  14. </view>
  15. </picker> -->
  16. <navigator url="/pages/mall/search/search" class="input">
  17. <van-icon name="search" size="16px"/>
  18. <text class="txt">商品搜索, 共{{goodsCount}}款好物</text>
  19. </navigator>
  20. </view>
  21. <view class="catalog">
  22. <scroll-view class="nav" scroll-y="true">
  23. <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>
  24. </scroll-view>
  25. <scroll-view class="cate" scroll-y="true">
  26. <!-- <navigator url="/pages/servant/servantList/servantList" class="banner" wx:if="{{currentCategory.name=='保姆/月嫂'}}">
  27. <image class="category-banner" mode="aspectFill" src="{{currentCategory.picUrl}}"></image>
  28. </navigator> -->
  29. <!-- wx:for="{{goodsList}}" wx:for-index="idx" wx:for-item="category" wx:key="id" -->
  30. <view wx:if="{{goodsList.length > 0}}" wx:for="{{goodsList}}" wx:for-index="idx" wx:for-item="category" wx:key="id">
  31. <view class="hd" >
  32. <text class="txt">{{category.categoryName}}</text>
  33. </view>
  34. <view class="a-section a-popular" >
  35. <view class="b category-line">
  36. <view class="item" wx:for="{{category.spus}}" wx:for-index="index" wx:for-item="item" wx:key="id">
  37. <navigator url="/pages/mall/goods/goods?id={{item.id}}" class="product-item">
  38. <image class="img" src="{{item.picAddress.length>=1?item.picAddress[0]:''}}" mode="aspectFill"></image>
  39. <view class="product-name">{{item.commodityName}}</view>
  40. </navigator>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </scroll-view>
  46. </view>
  47. </view>
  48. <!--广告-->
  49. <!-- <view class="adv" bindtap='goinviteFriends'>
  50. <view style="width:100%;height:100%">
  51. <image src="/static/images/active/xyhxd.jpg" style="width:100%;height:100%" />
  52. </view>
  53. </view> -->
  54. </view>