catalog.wxml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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/category/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.name}}" bindtap="switchCate">{{item.name}}</view>
  24. </scroll-view>
  25. <scroll-view class="cate" scroll-y="true">
  26. <!-- url="/pages/servant/servantList/servantList" -->
  27. <!-- <navigator url="/pages/servant/servantList/servantList" class="banner" wx:if="{{currentCategory.name=='保姆/月嫂'}}">
  28. <image class="category-banner" mode="aspectFill" src="{{currentCategory.picUrl}}"></image>
  29. </navigator> -->
  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="line"></text> -->
  33. <text class="txt">{{category.name}}</text>
  34. <view class="grey-devide"></view>
  35. <view class="blue-devide"></view>
  36. </view>
  37. <!-- <view class="bd">
  38. <navigator url="/pages/category/category?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:key="id" wx:for="{{currentSubCategoryList}}">
  39. <image class="icon" src="{{item.picUrl}}"></image>
  40. <text class="txt">{{item.name}}</text>
  41. </navigator>
  42. </view> -->
  43. <view class="a-section a-popular" >
  44. <view class="b category-line">
  45. <view class="item" wx:for="{{category.goodsList}}" wx:for-index="index" wx:for-item="item" wx:key="id">
  46. <navigator url="/pages/goods/goods?id={{item.id}}" class="product-item">
  47. <image class="img" src="{{item.picUrl}}" mode="aspectFill"></image>
  48. <view class="product-name">{{item.name}}</view>
  49. <!-- <view class="right">
  50. <view class="text">
  51. <text class="name">{{item.name}}</text>
  52. <text class="desc">{{item.brief}}</text>
  53. <view class="price">¥{{item.retailPrice}}
  54. <span wx:if="{{item.unit}}">/{{item.unit}}</span>
  55. <span wx:else>/次</span>
  56. <view class="btn">详情</view>
  57. </view>
  58. </view>
  59. </view> -->
  60. </navigator>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </scroll-view>
  66. </view>
  67. </view>
  68. <!--广告-->
  69. <!-- <view class="adv" bindtap='goinviteFriends'>
  70. <view style="width:100%;height:100%">
  71. <image src="/static/images/active/xyhxd.jpg" style="width:100%;height:100%" />
  72. </view>
  73. </view> -->
  74. </view>