category.wxml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!--pages/category/category.wxml-->
  2. <import src="category.skeleton.wxml" />
  3. <template is="skeleton" wx:if="{{loading}}" />
  4. <view class="custom {{scrollTop > 0 ?'customBg':''}}" style="padding-top:{{topBarHeight}}px">
  5. <navigator open-type="switchTab" url="/pages/index/index" class="iconfont icon-shouye"></navigator>
  6. <image src="{{company.companyLogo}}" mode="heightFix" style="height: 60rpx;"></image>
  7. </view>
  8. <!-- <view class="page"> -->
  9. <view class="search">
  10. <input confirm-type="search" placeholder="搜索:产品名称/SKU/69码" bindconfirm="searchGoods" />
  11. <icon class="icon-small" type="search" size="40rpx"></icon>
  12. </view>
  13. <view class="menu">
  14. <view class="menu-item {{category1Index == index ? 'active' : ''}}" wx:for="{{categoryList}}" wx:key="categoryId" data-index="{{index}}" data-name="category1Index" bind:tap="selectCategory">
  15. <image src="{{item.pic || '/images/menu.png'}}"></image>
  16. <view class="text text1">{{item.categoryName}}</view>
  17. </view>
  18. </view>
  19. <view class="categoryMain">
  20. <view class="floorTitle">正品好物推荐</view>
  21. <view class="categotyPanel">
  22. <view class="category">
  23. <block wx:for="{{categoryList[category1Index].categories}}" wx:key="categoryId" wx:for-index="index1">
  24. <view class="categoryItem {{category2Index == index1 ? 'active' : ''}}" data-index="{{index1}}" data-name="category2Index" catch:tap="selectCategory">
  25. <view class="categoryText text1">{{item.categoryName}}</view>
  26. </view>
  27. </block>
  28. </view>
  29. <view class="categoryBody">
  30. <view class="categoryItemTool">
  31. <block wx:if="{{categoryList[category1Index].categories[category2Index].categories}}">
  32. <view class="categoryItemToolItem {{category3Index == -1 ? 'active' : ''}}" data-name="category3Index" data-index="-1" catch:tap="selectCategory">全部</view>
  33. </block>
  34. <block wx:for="{{categoryList[category1Index].categories[category2Index].categories}}" wx:key="categoryId" wx:for-index="index2">
  35. <view class="categoryItemToolItem {{category3Index == index2 ? 'active' : ''}}" data-name="category3Index" data-index="{{index2}}" catch:tap="selectCategory">{{item.categoryName}}</view>
  36. </block>
  37. </view>
  38. <view class="goodsQuery">
  39. <view class="queryItem bxdfont shaixuan zonghe {{query.all ? 'ups' : ''}}" style="content: none !important;" data-param="" bind:tap="query">综合</view>
  40. <view class="queryItem bxdfont xiaoliang {{query.salesSort == false ? 'downs' : query.salesSort == true ? 'ups' : ''}}" data-param="salesSort" bind:tap="query">销量</view>
  41. <view class="queryItem bxdfont xiaoliang {{query.newProductSort == false ? 'downs' : query.newProductSort == true ? 'ups' : ''}}" data-param="newProductSort" bind:tap="query">新品</view>
  42. <view class="queryItem bxdfont xiaoliang {{query.priceSort == false ? 'downs' : query.priceSort == true ? 'ups' : ''}}" data-param="priceSort" bind:tap="query">价格</view>
  43. <view class="queryItem iconfont shaixuan {{query.shaixuan ? 'ups' : ''}}" bind:tap="shaixuan">筛选</view>
  44. </view>
  45. <view class="goodsList">
  46. <view></view>
  47. <view style="overflow-y: auto;">
  48. <navigator url="/pages/goods/goods?prodId={{item.prodId}}" hover-class="none" class="goods" wx:for="{{goodsList}}" wx:key="goodsId">
  49. <image src="{{item.pic || '/images/empty.png'}}"></image>
  50. <view class="goodsInfo">
  51. <view class="name text2">{{item.prodName}}</view>
  52. <view class="brief text3">{{item.simpleTitle}}</view>
  53. <view class="bar">
  54. <view class="price">¥{{item.price}}</view>
  55. <view style="font-weight: 400;font-size: 18rpx;color: #A2A2A2;line-height: 40rpx;">
  56. <text>可供{{item.usableStocksTotal}}{{item.stockUnit || '件 '}}</text>
  57. <text wx:if="{{item.limitQty}}"> 限购数量{{item.limitQty}}{{item.stockUnit || '件'}}</text>
  58. </view>
  59. <!-- <view class="iconfont icon-shouyegouwuche icon"></view> -->
  60. </view>
  61. </view>
  62. </navigator>
  63. <view class="goods">
  64. <view wx:if="{{loadding}}" class="iconfont icon-loadding"></view>
  65. <view wx:elif="{{pages == null && goodsList.length == 0}}">
  66. <image class="listEmpty" src="/images/list-empty.png"></image>
  67. <view class="loadMore" style="margin-top: 20rpx;">啥记录也没有!</view>
  68. </view>
  69. <view wx:elif="{{current < pages}}" class="loadMore" catch:tap="getGoodsList">点击加载更多</view>
  70. <view wx:else="" class="noMore">--我也是有底线的--</view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="dialogBg" bindtap="powerDrawer" wx:if="{{showDialog}}" catchtouchmove="stopScroll"></view>
  77. <view animation="{{animationData}}" class="drawer_attr_box" wx:if="{{showDialog}}">
  78. <view class="iconfont icon-guanbi" bindtap="powerDrawer"></view>
  79. <view class="draw_attr_title">全部条件</view>
  80. <view class="drawer_content" style="display: flex;flex-flow: column;max-height: 1000rpx;">
  81. <form class="shaixuanBox" catchsubmit="submitShaixuan" bindreset="submitShaixuanReset">
  82. <view class="shaixuanBoxTitle" wx:if="{{brandList.length > 0 }}">品牌:</view>
  83. <view class="shaixuanBoxBrand" wx:if="{{brandList.length > 0 }}">
  84. <view wx:for="{{brandList}}" wx:key="id" class="text1 {{item.check?'active':''}}" data-index="{{index}}" bind:tap="onBrand">{{item.name}}</view>
  85. </view>
  86. <view class="shaixuanBoxTitle">价格区间:</view>
  87. <view class="shaixuanBoxPrice">
  88. <input name="startPrice" value="{{query.startPrice}}" placeholder="0" />
  89. <input name="endPrice" value="{{query.endPrice}}" placeholder="100" />
  90. </view>
  91. <view class="shaixuanBoxBtn">
  92. <button form-type="reset">清空</button>
  93. <button form-type="submit">确定</button>
  94. </view>
  95. </form>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- </view> -->