index.wxml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <block wx:if="{{column == 'template1'}}">
  2. <view class="seckill seckill1" style="width: {{style.width}}%;margin:{{style.margin.top *2}}rpx {{style.margin.right *2}}rpx {{style.margin.bottom *2}}rpx {{style.margin.left *2}}rpx; padding:{{style.padding.top *2}}rpx {{style.padding.right *2}}rpx {{style.padding.bottom *2}}rpx {{style.padding.left *2}}rpx;background: {{style.background}};border-radius: {{style.borderRadius *2}}rpx;">
  3. <view class="big" wx:for="{{list}}" wx:key="index" style="width: {{style.seckillWidth}}%;margin:{{style.seckillMargin.top *2}}rpx {{style.seckillMargin.right *2}}rpx {{style.seckillMargin.bottom *2}}rpx {{style.seckillMargin.left *2}}rpx; padding:{{style.seckillPadding.top *2}}rpx {{style.seckillPadding.right *2}}rpx {{style.seckillPadding.bottom *2}}rpx {{style.seckillPadding.left *2}}rpx;background: {{style.seckillBackground}};border-radius: {{style.seckillBorderRadius *2}}rpx;">
  4. <view bind:tap="toSeckill" data-item="{{item}}" class="big-img" style="border-radius: {{style.borderRadius *2}}rpx;">
  5. <image src="{{item.goods.image}}" style="width: 100%;height: 100%; background-repeat: no-repeat;background-size: 100%;" />
  6. <view class="time-content">
  7. <block wx:if="{{data.showCountdown}}">
  8. <block wx:if="{{item.time > 0 }}">
  9. <view class="secondsKill">秒杀</view>
  10. <view class="time">
  11. <view class="distance-time">距离结束仅剩</view>
  12. <van-count-down custom-class="countDown" use-slot time="{{ item.time }}" data-index="{{index}}" bind:change="onChange">
  13. <text class="item">{{ item.timeData.days }}天</text>
  14. <text class="item">{{ item.timeData.hours }}时</text>
  15. <text class="item">{{ item.timeData.minutes }}分</text>
  16. <text class="item">{{ item.timeData.seconds }}秒</text>
  17. </van-count-down>
  18. </view>
  19. </block>
  20. <view wx:else class="secondsKill">活动已结束</view>
  21. </block>
  22. </view>
  23. </view>
  24. <view class="content">
  25. <view class="commodity-content">
  26. <van-tag color="#facbcb" text-color="#ff4434" size="medium">减{{item.discount}}元</van-tag>
  27. <!-- <view class="reduction line" style="font-size: {{style.titleSize *2}}rpx;">
  28. </view> -->
  29. <view class="commodity-name line" style="font-size: {{style.titleSize *2}}rpx;">
  30. {{item.goods.name}}
  31. </view>
  32. </view>
  33. <view class="describe line" style="font-size: {{style.descSize *2}}rpx;">
  34. {{item.goods.desc ? item.goods.desc : '暂无商品简介'}}
  35. </view>
  36. <block wx:if="{{data.showTotal}}">
  37. <view class="inventory">仅剩{{item.goods.total || item.goods.stock}}件</view>
  38. </block>
  39. <view class="price-content">
  40. <block wx:if="{{data.price}}">
  41. <view class="price">
  42. <block wx:if="{{data.showSeckillPrice}}">
  43. <view class="discount line">¥{{item.goods.price}}</view>
  44. </block>
  45. <block wx:if="{{item.goods.showPrice}}">
  46. <view class="original-price line">¥{{item.goods.original}}</view>
  47. </block>
  48. </view>
  49. </block>
  50. <button class="buy" style="font-size: {{style.btnSize *2}}rpx;color: {{style.btnColor}};">
  51. {{style.btnText}}
  52. </button>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </block>
  58. <block wx:if="{{column == 'template2'}}">
  59. <view class="seckill seckill2" style="width: {{style.width}}%;margin: {{style.margin.top *2}}rpx {{style.margin.right *2}}rpx {{style.margin.bottom *2}}rpx {{style.margin.left *2}}rpx; padding: {{style.padding.top *2}}rpx {{style.padding.right *2}}rpx {{style.padding.bottom *2}}rpx {{style.padding.left *2}}rpx;background: {{style.background}};border-radius: {{style.borderRadius *2}}rpx;">
  60. <view class="two-box" data-item="{{item}}" bind:tap="toSeckill" wx:for="{{list}}" wx:key="index" style="width: {{style.seckillWidth}}%;margin: {{style.seckillMargin.top *2}}rpx {{style.seckillMargin.right *2}}rpx {{style.seckillMargin.bottom *2}}rpx {{style.seckillMargin.left *2}}rpx; padding: {{style.seckillPadding.top *2}}rpx {{style.seckillPadding.right *2}}rpx {{style.seckillPadding.bottom *2}}rpx {{style.seckillPadding.left *2}}rpx;background: {{style.seckillBackground}};border-radius: {{style.seckillBorderRadius *2}}rpx;">
  61. <view class="two-img" style="border-radius: {{style.borderRadius *2}}rpx;">
  62. <image src="{{item.goods.image}}" style="width: 100%;height: 100%; background-repeat: no-repeat;background-size: 100%;border-radius: {{style.borderRadius *2}}rpx;" />
  63. <view class="time-content">
  64. <block wx:if="{{data.showCountdown}}">
  65. <block wx:if="{{item.time > 0 }}">
  66. <view class="secondsKill">距离结束仅剩</view>
  67. <view class="time">
  68. <van-count-down custom-class="countDown" use-slot time="{{ item.time }}" data-index="{{index}}" bind:change="onChange">
  69. <text class="item">{{ item.timeData.days }}天</text>
  70. <text class="item">{{ item.timeData.hours }}时</text>
  71. <text class="item">{{ item.timeData.minutes }}分</text>
  72. <text class="item">{{ item.timeData.seconds }}秒</text>
  73. </van-count-down>
  74. </view>
  75. </block>
  76. <view class="secondsKill" wx:else>活动已结束</view>
  77. </block>
  78. </view>
  79. </view>
  80. <view class="content">
  81. <view class="commodity-content line-two" style="font-size: {{style.titleSize *2}}rpx;">
  82. <van-tag color="#facbcb" text-color="#ff4434" size="medium">减{{item.discount}}元</van-tag>
  83. <!-- <view class="reduction line" style="font-size: {{style.titleSize *2}}rpx;">
  84. </view> -->
  85. {{item.goods.name}}
  86. </view>
  87. <view class="describe line" style="font-size: {{style.descSize *2}}rpx;">
  88. {{item.goods.desc ? item.goods.desc : '暂无商品简介'}}
  89. </view>
  90. <block wx:if="{{data.showTotal}}">
  91. <view class="inventory line">仅剩{{item.goods.total || item.goods.stock}}件</view>
  92. </block>
  93. <view class="price-content">
  94. <view class="price">
  95. <block wx:if="{{data.showPrice}}">
  96. <view class="discount line">¥{{item.goods.price}}</view>
  97. </block>
  98. <block wx:if="{{data.showSeckillPrice}}">
  99. <view class="original-price line">¥{{item.goods.originalPrice}}</view>
  100. </block>
  101. </view>
  102. <button class="buy" style="font-size: {{style.btnSize *2}}rpx;color: {{style.btnColor}};">
  103. {{style.btnText}}
  104. </button>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </block>
  110. <block wx:if="{{column == 'template3'}}">
  111. <view class="seckill" style="width: {{style.width}}%;margin: {{style.margin.top *2}}rpx {{style.margin.right *2}}rpx {{style.margin.bottom *2}}rpx {{style.margin.left *2}}rpx; padding: {{style.padding.top *2}}rpx {{style.padding.right *2}}rpx {{style.padding.bottom *2}}rpx {{style.padding.left *2}}rpx;background: {{style.background}};border-radius: {{style.borderRadius *2}}rpx;">
  112. <view class="three-box" wx:for="{{list}}" wx:key="index" style="width: {{style.seckillWidth}}%;margin: {{style.seckillMargin.top *2}}rpx {{style.seckillMargin.right *2}}rpx {{style.seckillMargin.bottom *2}}rpx {{style.seckillMargin.left *2}}rpx; padding: {{style.seckillPadding.top *2}}rpx {{style.seckillPadding.right *2}}rpx {{style.seckillPadding.bottom *2}}rpx {{style.seckillPadding.left *2}}rpx;background: {{style.seckillBackground}};border-radius: {{style.seckillBorderRadius *2}}rpx;">
  113. <view class="three-img" bind:tap="toSeckill" data-item="{{item}}">
  114. <image src="{{item.goods.image}}" style="width: 100%;height: 100%; background-repeat: no-repeat;background-size: 100%;border-radius: {{style.borderRadius *2}}rpx;" />
  115. </view>
  116. <view class="content" bind:tap="toSeckill" data-itrm="{{item}}">
  117. <view class="commodity-name line-two" style="font-size: {{style.titleSize *2}}rpx;">
  118. {{item.goods.name}}
  119. </view>
  120. <view class="describe line" style="font-size: {{style.descSize *2}}rpx;">
  121. {{item.goods.desc ? item.goods.desc : '暂无商品简介'}}
  122. </view>
  123. <block wx:if="{{data.showTotal}}">
  124. <view class="inventory line">仅剩{{item.goods.total || item.goods.stock}}件</view>
  125. </block>
  126. <view class="price-content">
  127. <view class="price">
  128. <block wx:if="{{data.showPrice}}">
  129. <view class="discount line">¥{{item.goods.price}}</view>
  130. </block>
  131. <block wx:if="{{data.showSeckillPrice}}">
  132. <view class="original-price line">¥{{item.goods.originalPrice}}</view>
  133. </block>
  134. </view>
  135. <button class="buy" style="font-size: {{style.btnSize *2}}rpx;color: {{style.btnColor}};">
  136. {{style.btnText}}
  137. </button>
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. </block>
  143. <block wx:if="{{column == 'template4'}}">
  144. <view class="seckill_4" style="width: {{style.width}}%;margin: {{style.margin.top *2}}rpx {{style.margin.right *2}}rpx {{style.margin.bottom *2}}rpx {{style.margin.left *2}}rpx; padding: {{style.padding.top *2}}rpx {{style.padding.right *2}}rpx {{style.padding.bottom *2}}rpx {{style.padding.left *2}}rpx;background: {{style.background}};border-radius: {{style.borderRadius *2}}rpx;">
  145. <view bind:tap="toSeckill" data-item="{{item}}" class="details" wx:for="{{list}}" wx:key="index" style="width: {{style.seckillWidth}}%;margin: {{style.seckillMargin.top *2}}rpx {{style.seckillMargin.right *2}}rpx {{style.seckillMargin.bottom *2}}rpx {{style.seckillMargin.left *2}}rpx; padding: {{style.seckillPadding.top *2}}rpx {{style.seckillPadding.right *2}}rpx {{style.seckillPadding.bottom *2}}rpx {{style.seckillPadding.left *2}}rpx;background: {{style.seckillBackground}};border-radius: {{style.seckillBorderRadius *2}}rpx;">
  146. <view class="details_left">
  147. <image class="image" src="{{item.goods.image}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
  148. <view class="time-content" wx:if="{{data.showCountdown}}">
  149. <block wx:if="{{item.time > 0 }}">
  150. <view class="secondsKill">距结束</view>
  151. <van-count-down custom-class="countDown" use-slot time="{{ item.time }}" data-index="{{index}}" bind:change="onChange">
  152. <text class="item">{{ item.timeData.days }}天</text>
  153. <text class="item">{{ item.timeData.hours }}时</text>
  154. <text class="item">{{ item.timeData.minutes }}分</text>
  155. <text class="item">{{ item.timeData.seconds }}秒</text>
  156. </van-count-down>
  157. </block>
  158. <view class="secondsKill" wx:else>活动已结束</view>
  159. </view>
  160. </view>
  161. <view class="content">
  162. <view class="top_content">
  163. <view class="commodity-content line-two" style="font-size: {{style.titleSize *2}}rpx;">
  164. <span class="reduction">减{{item.discount}}元</span>
  165. {{item.goods.name}}
  166. </view>
  167. <view class="describe line" style="font-size: {{style.descSize *2}}rpx;">
  168. {{item.goods.desc ? item.goods.desc : '暂无商品简介'}}
  169. </view>
  170. <block wx:if="{{data.showTotal}}">
  171. <view class="inventory">库存:{{item.goods.total || item.goods.stock}}</view>
  172. </block>
  173. </view>
  174. <view class="price-content">
  175. <view class="price">
  176. <block wx:if="{{data.showSeckillPrice}}">
  177. <view class="discount">¥{{item.goods.price}}</view>
  178. </block>
  179. <block wx:if="{{data.showPrice}}">
  180. <view class="original-price">¥{{item.goods.originalPrice}}</view>
  181. </block>
  182. </view>
  183. <view class="price_info">
  184. <view class="buy" style="font-size: {{style.btnSize *2}}rpx;color: {{style.btnColor}};">
  185. {{style.btnText}}
  186. </view>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </block>
  193. <block wx:if="{{column == 'template5'}}">
  194. <view class="seckill">
  195. <scroll-view scroll-x="true" ebable-flex style="padding: 0 15rpx;display: flex;white-space: nowrap;">
  196. <view class="scroll-box" wx:for="{{list}}" wx:key="index">
  197. <view bind:tap="toSeckill" data-item="{{item}}" class="scroll">
  198. <view class="scroll-img" style="background: url({{item.goods.image}}) no-repeat;background-size: 100%;"></view>
  199. <view class="content">
  200. <view class="commodity-name line-two" style="white-space: normal;font-size: {{style.titleSize *2}}rpx;font-weight: {{style.fiveGoodsTitleWieght *2}}">
  201. {{item.goods.name}}
  202. </view>
  203. <view class="describe line" style="font-size: {{style.descSize *2}}rpx;color: {{style.descSize}};">
  204. {{item.goods.desc ? item.goods.desc : '暂无商品简介'}}
  205. </view>
  206. <block wx:if="{{inventoryNumber}}">
  207. <view class="inventory line" style="font-size: {{style.fiveInventorySizeFont *2}}rpx;color: {{style.fiveInventoryColor}};">
  208. 仅剩{{item.inventoryNumber}}件
  209. </view>
  210. </block>
  211. <view class="discount line" style="font-size: {{style.fiveDiscountFontSize *2}}rpx;font-weight: {{style.fiveDiscountWeight *2}}rpx;color: {{style.fiveDiscountColor}};">
  212. ¥{{item.price}}
  213. </view>
  214. <view class="original-price line" style="font-size: {{style.fiveOriginalFontSize *2}}rpx;font-weight: {{style.fiveOriginalWeight *2}}rpx;color: {{style.fiveOriginalColor}};">
  215. ¥{{item.original}}
  216. </view>
  217. <block wx:if="{{button}}">
  218. <button class="buy" style="background: {{style.fiveBuyBackground}};font-size: {{style.fiveBuyFontSize *2}}rpx;font-weight: {{style.fiveBuyWeight *2}};color: {{style.fiveBuyColor}}">
  219. {{item.buy}}
  220. </button>
  221. </block>
  222. <block wx:else></block>
  223. </view>
  224. </view>
  225. </view>
  226. </scroll-view>
  227. </view>
  228. </block>