index.wxml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <!--index.wxml-->
  2. <view class="container">
  3. <view class="search">
  4. <navigator url="/pages/search/search" class="input">
  5. <image class="icon"></image>
  6. <text class="txt">商品搜索, 共{{goodsCount}}款好物</text>
  7. </navigator>
  8. </view>
  9. <swiper class="banner" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
  10. <swiper-item wx:for="{{banner}}" wx:key="{{item.id}}">
  11. <navigator url="{{item.link}}">
  12. <image src="{{item.image_url}}" background-size="cover"></image>
  13. </navigator>
  14. </swiper-item>
  15. </swiper>
  16. <view class="m-menu">
  17. <navigator class="item" url="{{item.url}}" wx:for="{{channel}}" wx:key="{{item.id}}">
  18. <image src="{{item.icon_url}}" background-size="cover"></image>
  19. <text>{{item.name}}</text>
  20. </navigator>
  21. </view>
  22. <view class="a-section a-brand">
  23. <view class="h">
  24. <navigator url="../brand/brand">
  25. <text class="txt">品牌制造商直供</text>
  26. </navigator>
  27. </view>
  28. <view class="b">
  29. <view class="item item-1" wx:for="{{brand}}" wx:key="item.id">
  30. <navigator url="/pages/brandDetail/brandDetail?id={{item.id}}">
  31. <view class="wrap">
  32. <image class="img" src="{{item.new_pic_url}}" mode="aspectFill"></image>
  33. <view class="mt">
  34. <text class="brand">{{item.name}}</text>
  35. <text class="price">{{item.floor_price}}</text>
  36. <text class="unit">元起</text>
  37. </view>
  38. </view>
  39. </navigator>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="a-section a-new" wx:if="{{newGoods.length > 0}}">
  44. <view class="h">
  45. <view>
  46. <navigator url="../newGoods/newGoods">
  47. <text class="txt">周一周四 · 新品首发</text>
  48. </navigator>
  49. </view>
  50. </view>
  51. <view class="b">
  52. <view class="item" wx:for="{{newGoods}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
  53. <navigator url="../goods/goods?id={{item.id}}">
  54. <image class="img" src="{{item.list_pic_url}}" background-size="cover"></image>
  55. <text class="name">{{item.name}}</text>
  56. <text class="price">¥{{item.retail_price}}</text>
  57. </navigator>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="a-section a-popular" wx:if="{{hotGoods.length > 0}}">
  62. <view class="h">
  63. <view>
  64. <navigator url="../hotGoods/hotGoods">
  65. <text class="txt">人气推荐</text>
  66. </navigator>
  67. </view>
  68. </view>
  69. <view class="b">
  70. <view class="item" wx:for="{{hotGoods}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
  71. <navigator url="/pages/goods/goods?id={{item.id}}">
  72. <image class="img" src="{{item.list_pic_url}}" background-size="cover"></image>
  73. <view class="right">
  74. <view class="text">
  75. <text class="name">{{item.name}}</text>
  76. <text class="desc">{{item.goods_brief}}</text>
  77. <text class="price">¥{{item.retail_price}}</text>
  78. </view>
  79. </view>
  80. </navigator>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="a-section a-topic" wx:if="topics.length > 0">
  85. <view class="h">
  86. <view>
  87. <navigator url="../topic/topic" open-type="switchTab">
  88. <text class="txt">专题精选</text>
  89. </navigator>
  90. </view>
  91. </view>
  92. <view class="b">
  93. <scroll-view scroll-x="true" class="list">
  94. <view class="item" wx:for="{{topics}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
  95. <navigator url="../topicDetail/topicDetail?id={{item.id}}">
  96. <image class="img" src="{{item.scene_pic_url}}" background-size="cover"></image>
  97. <view class="np">
  98. <text class="name">{{item.title}}</text>
  99. <text class="price">¥{{item.price_info}}元起</text>
  100. </view>
  101. <text class="desc">{{item.subtitle}}</text>
  102. </navigator>
  103. </view>
  104. </scroll-view>
  105. </view>
  106. </view>
  107. <view class="good-grid" wx:for="{{floorGoods}}" wx:key="{{item.id}}">
  108. <view class="h">
  109. <view>
  110. <text>{{item.name}}</text>
  111. </view>
  112. </view>
  113. <view class="b">
  114. <block wx:for="{{item.goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="{{iitem.id}}">
  115. <navigator url="../goods/goods?id={{iitem.id}}" class="item">
  116. <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
  117. <view class="name">{{iitem.name}}</view>
  118. <view class="price">¥{{iitem.retail_price}}</view>
  119. </navigator>
  120. </block>
  121. </view>
  122. </view>
  123. </view>