index.wxml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <view class="container">
  2. <!-- 首页顶部通知消息 -->
  3. <van-notice-bar scrollable="true" text="正品打折,欲购从速,钜惠惊喜不断,不要错失良机,限时特惠,赶快下单哦!"/>
  4. <view class="HotName">今日推荐
  5. <text></text>
  6. </view>
  7. <view class="HotMark">限时特惠商品</view>
  8. <view class="HotSwiper" style="margin-top:{{windowHeight/45}}px">
  9. <swiper circular="true" autoplay="true" interval="6000" duration="500" previous-margin="{{windowWidth/3.8}}rpx" next-margin="{{windowWidth/3.8}}rpx">
  10. <block wx:for-items="{{hotGoods}}" wx:key="{{id}}">
  11. <navigator url="/pages/goods/goods?id={{item.id}}">
  12. <swiper-item>
  13. <view class="swiper-box">
  14. <view class='form_class'>
  15. <button formType="submit" class='form_button'>
  16. <image src="{{item.picUrl}}" mode="aspectFill" data-id="{{item.id}}" />
  17. </button>
  18. </view>
  19. <view class="swiper-box-info">
  20. <view class="name">{{item.name}}</view>
  21. <view class="price">
  22. <view class="counterPrice" wx:if="{{item.counterPrice > item.retailPrice}}">原价:¥{{item.counterPrice}}</view>
  23. <view class="retailPrice">现价:¥{{item.retailPrice}}</view>
  24. </view>
  25. <view class="capsule-tag" wx:if="{{item.isNew == true}}">
  26. <zan-capsule color="#a78845" leftText="N" rightText="新 品" />
  27. </view>
  28. <view class="capsule-tag" wx:if="{{item.counterPrice > item.retailPrice}}">
  29. <zan-capsule color="#b4282d" leftText="H" rightText="折 扣" />
  30. </view>
  31. </view>
  32. </view>
  33. </swiper-item>
  34. </navigator>
  35. </block>
  36. </swiper>
  37. </view>
  38. <view class="a-section a-groupon" wx:if="{{groupons.length > 0}}">
  39. <view class="h">
  40. <view class="title">
  41. <view>
  42. <navigator url="/pages/groupon/grouponList/grouponList">
  43. <text class="txt">优惠专区</text>
  44. </navigator>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="b">
  49. <view class="item" wx:for="{{groupons}}" wx:for-index="index" wx:for-item="item" wx:key="id">
  50. <navigator url="/pages/goods/goods?id={{item.id}}">
  51. <image class="img" src="{{item.picUrl}}" background-size="cover"></image>
  52. <view class="right">
  53. <view class="text">
  54. <view class="header">
  55. <text class="name">{{item.name}}</text>
  56. <view class="capsule-tag">
  57. <zan-capsule color="#a78845" leftText="{{item.grouponMember}}人成团" rightText="立减{{item.grouponDiscount}}" />
  58. </view>
  59. </view>
  60. <text class="desc">{{item.brief}}</text>
  61. <view class="price">
  62. <view class="counterPrice">原价:¥{{item.retailPrice}}</view>
  63. <view class="retailPrice">团购价:¥{{item.grouponPrice}}</view>
  64. </view>
  65. </view>
  66. </view>
  67. </navigator>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="a-section a-new" wx:if="{{newGoods.length > 0}}">
  72. <view class="h">
  73. <view class="title">
  74. <navigator url="../newGoods/newGoods">
  75. <text class="txt">新品首发</text>
  76. </navigator>
  77. </view>
  78. </view>
  79. <goodList goods="{{newGoods}}"></goodList>
  80. </view>
  81. <!-- <view class="a-section a-brand">
  82. <view class="h">
  83. <view class="title">
  84. <navigator url="../brand/brand">
  85. <text class="txt">品牌制造商直供</text>
  86. </navigator>
  87. </view>
  88. </view>
  89. <view class="b">
  90. <view class="item item-1" wx:for="{{brands}}" wx:key="id">
  91. <navigator url="/pages/brandDetail/brandDetail?id={{item.id}}">
  92. <view class="wrap">
  93. <image class="img" src="{{item.picUrl}}" mode="aspectFill"></image>
  94. <view class="mt">
  95. <text class="brand">{{item.name}}</text>
  96. </view>
  97. </view>
  98. </navigator>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="good-grid" wx:for="{{floorGoods}}" wx:key="id">
  103. <navigator url="/pages/category/category?id={{item.id}}" class="more-a">
  104. <view class="h" wx:if="{{item.goodsList.length > 0}}">
  105. <text>{{item.name}}</text>
  106. </view>
  107. </navigator>
  108. <goodList goods="{{item.goodsList}}"></goodList>
  109. </view> -->
  110. <!-- <view class="a-section a-topic" wx:if="topics.length > 0">
  111. <view class="h">
  112. <view class="title">
  113. <navigator url="/pages/topic/topic">
  114. <text class="txt">专题精选</text>
  115. </navigator>
  116. </view>
  117. </view>
  118. <view class="b">
  119. <scroll-view scroll-x class="list">
  120. <view class="item" wx:for="{{topics}}" wx:for-index="index" wx:for-item="item" wx:key="id">
  121. <navigator url="../topicDetail/topicDetail?id={{item.id}}">
  122. <image class="img" src="{{item.picUrl}}" background-size="cover"></image>
  123. <view class="np">
  124. <text class="name">{{item.title}}</text>
  125. </view>
  126. <text class="desc">{{item.subtitle}}</text>
  127. </navigator>
  128. </view>
  129. </scroll-view>
  130. </view>
  131. </view> -->
  132. </view>