1
0

catalog.wxml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <view class="container">
  2. <view class="cart-panel" wx:if="{{footCart.goodsCount>0}}">
  3. <view class="cart-icon">
  4. <navigator class="nav-cell" open-type='switchTab' url="/pages/cart/cart">
  5. <image src="../../static/images/cart-fixed.png">
  6. </image>
  7. </navigator>
  8. <view class="cart-num">{{footCart.goodsCount}}</view>
  9. </view>
  10. <view class="cart-body">¥{{footCart.checkedGoodsAmount}}</view>
  11. <navigator class="nav-cell" open-type='switchTab' url="/pages/cart/cart">
  12. <view class="cart-pay">去结算 > </view>
  13. </navigator>
  14. </view>
  15. <view wx:if="{{showNavList}}" class="modal-wrap"></view>
  16. <view class="fast-nav">
  17. <contact-button wx:if="{{!showNavList}}" class="contact" size="25" type="primary" session-from="weapp">
  18. <text>找客服</text>
  19. </contact-button>
  20. <view wx:if="{{!showNavList}}" class="nav" bindtap="toggleNav">
  21. <text>快捷</text>
  22. <text>导航</text>
  23. </view>
  24. <view class="nav-list" wx:if="{{showNavList}}">
  25. <view class="nav-item">
  26. <text class="nav-text">首页</text>
  27. <view class="nav-cell" bindtap="switchNav" data-name="index">
  28. <image src="../../static/images/nav-1.png"></image>
  29. </view>
  30. </view>
  31. <view class="nav-item">
  32. <text class="nav-text">足迹</text>
  33. <navigator class="nav-cell" url="../ucenter/footprint/footprint">
  34. <image src="../../static/images/nav-2.png"></image>
  35. </navigator>
  36. </view>
  37. <view class="nav-item">
  38. <text class="nav-text">搜索</text>
  39. <navigator class="nav-cell" url="../search/search">
  40. <image src="../../static/images/nav-3.png"></image>
  41. </navigator>
  42. </view>
  43. <view class="nav-item">
  44. <text class="nav-text">购物车</text>
  45. <view class="nav-cell" bindtap="switchNav" data-name="cart">
  46. <image src="../../static/images/nav-4.png"></image>
  47. </view>
  48. </view>
  49. </view>
  50. <view wx:if="{{showNavList}}" class="close" bindtap="toggleNav">X</view>
  51. </view>
  52. <view class="search">
  53. <navigator url="/pages/search/search" class="input">
  54. <image class="icon"></image>
  55. <text class="txt">商品搜索, 共{{goodsCount}}款好物</text>
  56. </navigator>
  57. </view>
  58. <view class="activity">
  59. <view class="activity-box">
  60. <view class="item {{goodsBizType == '00' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultActivity">
  61. <text class="txt">保税仓</text>
  62. </view>
  63. <!-- <view class="item by-sell {{goodsBizType == '02' ? 'active' : ''}}" bindtap="openSortFilter" id="discountActivity">
  64. <text class="txt">保税展示</text>
  65. </view>
  66. <view class="item by-price {{goodsBizType == '10' ? 'active' : ''}}" bindtap="openSortFilter" id="groupActivity">
  67. <text class="txt">现场速递</text>
  68. </view> -->
  69. <view class="item by-price {{goodsBizType == '11' ? 'active' : ''}}" bindtap="openSortFilter" id="ordActivity">
  70. <text class="txt">普通商品</text>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="catalog">
  75. <scroll-view class="nav" scroll-y="true">
  76. <view class="item {{ currentCategory.id == item.id ? 'active' : ''}}" wx:for="{{navList}}" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate" wx:key="{{index}}">{{item.name}}</view>
  77. <!-- <view class="contact">
  78. <button open-type="contact" size="20" session-from="weapp">
  79. </button>
  80. </view> -->
  81. </scroll-view>
  82. <scroll-view class="cate" scroll-y="true" bindscrolltolower='onLoaderMoreMovies'>
  83. <view class="banner">
  84. <image lazy-load="true" class="image" wx:if="{{currentCategory.wap_banner_url}}" src="{{currentCategory.wap_banner_url}}?x-oss-process=image/resize,h_500"></image>
  85. <view class="txt">{{currentCategory.front_name?currentCategory.front_name:""}}</view>
  86. </view>
  87. <view class="hd" wx:if="{{currentCategory}}">
  88. <text class="line"></text>
  89. <text class="txt">{{currentCategory.name?currentCategory.name:""}}分类</text>
  90. <text class="line"></text>
  91. </view>
  92. <view class="bd">
  93. <navigator bindtap="sercherCategory" data-reply-Type="{{item.id}}" data-current-Index="{{index}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:for="{{currentCategory.subCategoryList}}" wx:key="{{item.id}}">
  94. <image lazy-load="true" class="icon" wx:if="{{item.wap_banner_url}}" src="{{item.wap_banner_url}}"></image>
  95. <text class="txt">{{item.name?item.name:""}}</text>
  96. </navigator>
  97. </view>
  98. <view class="hd" wx:if="{{currentCategory}}">
  99. <text class="line"></text>
  100. <text class="txt">{{currentCategory.name?currentCategory.name:""}}品牌</text>
  101. <text class="line"></text>
  102. </view>
  103. <view class="bd">
  104. <navigator bindtap="sercherCategoryByBrand" data-reply-Type="{{item.id}}" data-current-Index="{{index}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:for="{{brandList}}" wx:key="{{item.id}}">
  105. <image lazy-load="true" class="icon" wx:if="{{item.app_list_pic_url}}" src="{{item.app_list_pic_url}}"></image>
  106. <text class="txt">{{item.name?item.name:""}}</text>
  107. </navigator>
  108. </view>
  109. <view class="sort">
  110. <view class="sort-box">
  111. <view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
  112. <text class="txt">综合</text>
  113. </view>
  114. <view class="item by-sell {{currentSortType == 'sell' ? 'active' : ''}} {{currentSortOrder == 'asc' ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="sellSort">
  115. <text class="txt">销量</text>
  116. </view>
  117. <view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc' ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
  118. <text class="txt">价格</text>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="cate-item">
  123. <view wx:if="{{goodsList != null && goodsList.length == 0}}" class="item-text">未找到相关商品</view>
  124. <!-- 商品开始 -->
  125. <view class="item" wx:for="{{goodsList}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
  126. <navigator url="/pages/goods/goods?id={{item.id}}&&storeId={{item.storeId}}&&paramView=cateGoods">
  127. <view class="left">
  128. <image lazy-load="true" class="img {{item.stockNum==0?'touming-img':''}}" wx:if="{{item.list_pic_url}}" src="{{item.list_pic_url}}"></image>
  129. <image lazy-load="true" style="width:50px;height:50px;position: absolute;" wx:if="{{item.stockNum==0}}" src="../../static/images/service-zswh.png"></image>
  130. <!-- <view class='nav'>{{item.stockNum==0?'无货':''}}</view> -->
  131. <!-- <text class='nav' style="color: #fff;font-size: 25rpx;background-color: #7c7b7b;border-radius: 40rpx;width: 82rpx;text-align: center;">{{item.stockNum==0?'无货':''}}</text> -->
  132. </view>
  133. </navigator>
  134. <!-- 文字开始 -->
  135. <view class="right">
  136. <view class="text">
  137. <navigator url="/pages/goods/goods?id={{item.id}}&&storeId={{item.storeId}}&&paramView=cateGoods">
  138. <text class="name" data-item-id="{{filterDiscount != 2?item.id:item.group_id}}">{{item.name?item.name:""}}
  139. </text>
  140. <!-- <text class="name" bindtap="bindtapGoodsDetail" data-item-id="{{filterDiscount != 2?item.id:item.group_id}}">{{item.name?item.name:""}}</text> -->
  141. <!-- <text class="desc" bindtap="bindtapGoodsDetail" data-item-id="{{filterDiscount != 2?item.id:item.group_id}}">{{item.goods_brief?item.goods_brief:""}}</text> -->
  142. </navigator>
  143. <!-- 描述开始 -->
  144. <view class="goods-do">
  145. <navigator url="/pages/goods/goods?id={{item.id}}&&storeId={{item.storeId}}&&paramView=cateGoods">
  146. <text class="price">{{item.retail_price?"¥"+item.retail_price:"¥0"}}</text>
  147. <text class="org-price line-through">{{item.market_price?"¥"+item.market_price:""}}</text>
  148. <!-- <text style="color: #fff;font-size: 25rpx;background-color: #b4282d;border-radius: 14rpx;width: 82rpx;text-align: center;">{{item.is_hot==1?'热销':''}}</text> -->
  149. </navigator>
  150. <!-- //数量加减 -->
  151. <!-- <view class="number-item">
  152. <view class="selnum">
  153. <view class="cut" data-goods-id="{{item.id}}" data-product-id="{{item.product_id}}" bindtap="cutNumber"></view>
  154. <input value="{{item.cart_num}}" class="number" disabled="true" type="number" />
  155. <image wx:if="{{item.goodsBizType==11}}" class="add2" src="{{item.cart_num < item.stockNum ? '/static/images/service-hsjh.png':'/static/images/service-ehsjh.png'}}" data-goods-id="{{item.id}}" data-product-id="{{item.product_id}}" catchtap="{{item.cart_num < item.stockNum ? 'addNumber' : ''}}"></image>
  156. <image wx:if="{{item.goodsBizType!=11}}" class="add2" src="{{item.cart_num < item.goods_number ? '/static/images/service-hsjh.png':'/static/images/service-ehsjh.png'}}" data-goods-id="{{item.id}}" data-product-id="{{item.product_id}}" catchtap="{{item.cart_num < item.goods_number ? 'addNumber' : ''}}"></image>
  157. </view>
  158. </view> -->
  159. </view>
  160. </view>
  161. <!-- 描述结束 -->
  162. </view>
  163. <!-- 文字结束 -->
  164. </view>
  165. <!-- 商品结束 -->
  166. <view wx:if="{{hidden && goodsList != null && goodsList.length > 0}}" class="item-text">加载完成</view>
  167. </view>
  168. </scroll-view>
  169. </view>
  170. <view class="coupon" wx:if="{{openCoupon}}">
  171. <view class="attr-close" bindtap="closeCoupon">X</view>
  172. <image class="img" src="/static/imgys/coupon-gun.png" bindtap="takeShareCoupon"/>
  173. </view>
  174. </view>