catalog.wxml 3.4 KB

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