index.wxml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <block wx:if="{{column == 'template1'}}">
  2. <view class="bargaining" 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">
  4. <view class="big-img" style="background: url({{style.goodsImg}}) no-repeat;background-size: 100%;">
  5. <view class="time-content" style="background: {{style.tiemBackground}};">
  6. <block wx:if="{{item.time > 0}}">
  7. <view class="secondsKill" style="font-size: {{style.secondsKillFontSize *2}}rpx;font-weight: {{style.secondsKillWeight}};color: {{style.secondsKillColor}}">
  8. 秒杀
  9. </view>
  10. <view class="time">
  11. <view style="margin-top: 7rpx;font-size: {{style.countDownFontSize *2}}rpx;color:{{style.countDown}};">
  12. 距离结束仅剩
  13. </view>
  14. <van-count-down custom-class="countDown" custom-class="countDown" use-slot time="{{ item.time }}" bind:change="onChange">
  15. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.days }}天</text>
  16. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.hours }}时</text>
  17. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.minutes }}分</text>
  18. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.seconds }}秒</text>
  19. </van-count-down>
  20. </view>
  21. </block>
  22. <view wx:else class="secondsKill" style="font-size: {{style.secondsKillFontSize *2}}rpx;font-weight: {{style.secondsKillWeight}};color: {{style.secondsKillColor}}">
  23. 活动已结束
  24. </view>
  25. </view>
  26. </view>
  27. <view class="content" style="background: {{style.background}};">
  28. <view class="commodity-content">
  29. <block wx:if="{{reductionPrice}}">
  30. <view class="reduction line" style="font-size: {{style.reductionFontSize *2}}rpx;color: {{style.reductionColor}};background: {{style.reductionBackground}};">
  31. 减{{item.reductionPrice}}.00元
  32. </view>
  33. </block>
  34. <view class="commodity-name line" style="font-size: {{style.goodsTitleSize *2}}rpx;font-weight: {{style.goodsTitleWieght *2}}">
  35. {{item.goodsName}}
  36. </view>
  37. </view>
  38. <view class="describe line" style="font-size: {{style.describeFontSize *2}}rpx;color: {{style.describeColor}};">
  39. {{item.describeName}}
  40. </view>
  41. <block wx:if="{{inventoryNumber}}">
  42. <view class="inventory" style="font-size: {{style.oneInventorySizeFont *2}}rpx;color: {{style.oneInventoryColor}}">
  43. 仅剩{{item.inventoryNumber}}件
  44. </view>
  45. </block>
  46. <view class="price-content">
  47. <view class="price">
  48. <view class="discount line" style="font-size: {{style.discountFontSize *2}}rpx;font-weight: {{style.discountWeight *2}};color: {{style.discountColor}};">
  49. ¥{{item.price}}
  50. </view>
  51. <view class="original-price line" style="font-size: {{style.originalFontSize *2}}rpx;font-weight: {{style.originalWeight *2}};color: {{style.originalColor}};">
  52. ¥{{item.original}}
  53. </view>
  54. </view>
  55. <block wx:if="{{button}}">
  56. <button class="buy" style="font-size: {{style.buyFontSize *2}}rpx;font-weight: {{style.buyWeight}};color: {{style.buyColor}};">
  57. {{item.buy}}
  58. </button>
  59. </block>
  60. <block wx:else></block>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </block>
  66. <block wx:if="{{column == 'template2'}}">
  67. <view class="bargaining" style="">
  68. <view class="two-box" wx:for="{{twoList}}" wx:key="index">
  69. <view class="two">
  70. <view class="two-img" style="background: url({{style.twoGoodsImg}}) no-repeat;background-size: 100%;">
  71. <view class="time-content" style="background: {{style.twoTiemBackground}}">
  72. <block wx:if="{{item.time > 0}}">
  73. <view class="secondsKill" style="font-size: {{style.twoSecondsKillFontSize *2}}rpx;font-weight: {{style.twoSecondsKillWeight}};color: {{style.twoSecondsKillColor}}">
  74. 距结束
  75. </view>
  76. <view class="time">
  77. <van-count-down custom-class="countDown" use-slot time="{{ item.time }}" bind:change="onChange">
  78. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.days }}天</text>
  79. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.hours }}时</text>
  80. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.minutes }}分</text>
  81. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.seconds }}秒</text>
  82. </van-count-down>
  83. </view>
  84. </block>
  85. <view class="secondsKill" wx:else style="font-size: {{style.twoSecondsKillFontSize *2}}rpx;font-weight: {{style.twoSecondsKillWeight}};color: {{style.twoSecondsKillColor}}">
  86. 活动已结束
  87. </view>
  88. </view>
  89. </view>
  90. <view class="content">
  91. <view class="commodity-content line-two" style="font-size: {{style.twoGoodsTitleSize *2}}rpx;font-weight: {{style.twoGoodsTitleWieght *2}}">
  92. <block wx:if="{{reductionPrice}}">
  93. <view class="reduction line" style="font-size: {{style.twoReductionFontSize *2}}rpx;color: {{style.twoReductionColor}};background: {{style.twoReductionBackground}};">
  94. 减{{item.reductionPrice}}.00元
  95. </view>
  96. </block>
  97. {{item.goodsName}}
  98. </view>
  99. <view class="describe line" style="font-size: {{style.descSize *2}}rpx;">
  100. {{item.describeName}}
  101. </view>
  102. <block wx:if="{{inventoryNumber}}">
  103. <view class="inventory line" style="font-size: {{style.twoInventorySizeFont *2}}rpx;color: {{style.twoInventoryColor}}">
  104. 仅剩{{item.inventoryNumber}}件
  105. </view>
  106. </block>
  107. <view class="price-content">
  108. <view class="price">
  109. <view class="discount line" style="font-size: {{style.twoDiscountFontSize *2}}rpx;font-weight: {{style.twoDiscountWeight *2}}rpx;color: {{style.twoDiscountColor}};">
  110. ¥{{item.price}}
  111. </view>
  112. <view class="original-price line" style="font-size: {{style.twoOriginalFontSize *2}}rpx;font-weight: {{style.twoOriginalWeight *2}}rpx;color: {{style.twoOriginalColor}};">
  113. ¥{{item.original}}
  114. </view>
  115. </view>
  116. <block wx:if="{{button}}">
  117. <button class="buy" style="font-size: {{style.btnSize *2}}rpx;color: {{style.btnColor}};">
  118. {{style.btnText}}
  119. </button>
  120. </block>
  121. <block wx:else></block>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. </block>
  128. <block wx:if="{{column == 'template3'}}">
  129. <view class="bargaining">
  130. <view class="three-box" wx:for="{{threeList}}" wx:key="index">
  131. <view class="three">
  132. <view class="three-img" style="background: url({{style.twoGoodsImg}}) no-repeat;background-size: 100%;"></view>
  133. <view class="content">
  134. <view class="commodity-name line-two" style="font-size: {{style.threeGoodsTitleSize *2}}rpx;font-weight: {{style.threeGoodsTitleWieght *2}}">
  135. {{item.goodsName}}
  136. </view>
  137. <view class="describe line" style="font-size: {{style.describeFontSize *2}}rpx;color: {{style.describeColor}};">
  138. {{item.describeName}}
  139. </view>
  140. <block wx:if="{{inventoryNumber}}">
  141. <view class="inventory line" style="font-size: {{style.threeInventorySizeFont *2}}rpx;color: {{style.threeInventoryColor}}">
  142. 仅剩{{item.inventoryNumber}}件
  143. </view>
  144. </block>
  145. <view class="discount line" style="font-size: {{style.threeDiscountFontSize *2}}rpx;font-weight: {{style.threeDiscountWeight *2}}rpx;color: {{style.threeDiscountColor}};">
  146. ¥{{item.price}}
  147. </view>
  148. <view class="original-price line" style="font-size: {{style.threeOriginalFontSize *2}}rpx;font-weight: {{style.threeOriginalWeight *2}}rpx;color: {{style.threeOriginalColor}};">
  149. ¥{{item.original}}
  150. </view>
  151. <block wx:if="{{button}}">
  152. <button class="buy line" style="font-size: {{style.threeBuyFontSize *2}}rpx;font-weight: {{style.threeBuyWeight *2}};color: {{style.threeBuyColor}};background: {{style.threeBuyBackground}};">
  153. {{item.buy}}
  154. </button>
  155. </block>
  156. <block wx:else></block>
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. </block>
  162. <block wx:if="{{column == 'template4'}}">
  163. <view class="bargaining">
  164. <view class="details" wx:for="{{fourList}}" wx:key="index">
  165. <view class="details-img" style="border-radius: {{style.borderRadius}};background: url({{style.twoGoodsImg}}) no-repeat;background-size: 100%;">
  166. <view class="time-content" style="background: {{style.detailsTiemBackground}};">
  167. <block wx:if="{{item.time > 0}}">
  168. <view class="secondsKill" style="font-size: {{style.detailSecondsKillFontSize *2}}rpx;font-weight: {{style.detailSecondsKillWeight}};color: {{style.detailSecondsKillColor}}">
  169. 秒杀
  170. </view>
  171. <view class="time">
  172. <van-count-down custom-class="countDown" use-slot time="{{ item.time }}" bind:change="onChange">
  173. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.hours }}时</text>
  174. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.minutes }}分</text>
  175. <text class="item" style="font-size: {{style.countDownFontSize *2}}rpx;padding: {{style.countDownPadding}};color:{{style.countDown}};">{{ timeData.seconds }}秒</text>
  176. </van-count-down>
  177. </view>
  178. </block>
  179. <view wx:else class="secondsKill" style="font-size: {{style.detailSecondsKillFontSize *2}}rpx;font-weight: {{style.detailSecondsKillWeight}};color: {{style.detailSecondsKillColor}}">
  180. 活动已结束
  181. </view>
  182. </view>
  183. </view>
  184. <view class="content">
  185. <view class="commodity-content line-two" style="font-size: {{style.detailsGoodsTitleSize *2}}rpx;font-weight: {{style.detailsGoodsTitleWieght *2}}">
  186. <block wx:if="{{reductionPrice}}">
  187. <view class="reduction line" style="font-size: {{style.detailsReductionFontSize *2}}rpx;color: {{style.detailsReductionColor}};background: {{style.detailsReductionBackground}};">
  188. 减{{item.reductionPrice}}.00元
  189. </view>
  190. </block>
  191. {{item.goodsName}}
  192. </view>
  193. <view class="describe line" style="font-size: {{style.detailsDescribeFontSize *2}}rpx;color: {{style.detailsDescribeColor}};">
  194. {{item.describeName}}
  195. </view>
  196. <block wx:if="{{inventoryNumber}}">
  197. <view class="inventory line" style="font-size: {{style.detailsInventorySizeFont *2}}rpx;color: {{style.detailsInventoryColor}}">
  198. 仅剩{{item.inventoryNumber}}件
  199. </view>
  200. </block>
  201. <view class="price-content">
  202. <view class="price">
  203. <view class="discount line" style="font-size: {{style.detailsDiscountFontSize *2}}rpx;font-weight: {{style.detailsDiscountWeight *2}}rpx;color: {{style.detailsDiscountColor}};">
  204. ¥{{item.price}}
  205. </view>
  206. <view class="original-price line" style="font-size: {{style.detailsOriginalFontSize *2}}rpx;font-weight: {{style.detailsOriginalWeight *2}}rpx;color: {{style.detailOriginalColor}};">
  207. ¥{{item.original}}
  208. </view>
  209. </view>
  210. <block wx:if="{{button}}">
  211. <button class="buy" style="font-size: {{style.detailsBuyFontSize *2}}rpx;font-weight: {{style.detailsBuyWeight *2}};color: {{style.detailsBuyColor}};">
  212. {{item.buy}}
  213. </button>
  214. </block>
  215. </view>
  216. </view>
  217. </view>
  218. </view>
  219. </block>
  220. <block wx:if="{{column == 'template5'}}">
  221. <view class="bargaining">
  222. <scroll-view scroll-x="true" ebable-flex style="padding: 0 15rpx;display: flex;white-space: nowrap;">
  223. <view class="scroll-box" wx:for="{{fiveList}}" wx:key="index">
  224. <view class="scroll">
  225. <view class="scroll-img" style="background: url({{style.fiveGoodsImg}}) no-repeat;background-size: 100%;"></view>
  226. <view class="content">
  227. <view class="commodity-name line-two" style="white-space: normal;font-size: {{style.fiveGoodsTitleSize *2}}rpx;font-weight: {{style.fiveGoodsTitleWieght *2}}">
  228. {{item.goodsName}}
  229. </view>
  230. <view class="describe line" style="font-size: {{style.fiveDescribeFontSize *2}}rpx;color: {{style.fiveDescribeColor}};">
  231. {{item.describeName}}
  232. </view>
  233. <block wx:if="{{inventoryNumber}}">
  234. <view class="inventory line" style="font-size: {{style.fiveInventorySizeFont *2}}rpx;color: {{style.fiveInventoryColor}};">
  235. 仅剩{{item.inventoryNumber}}件
  236. </view>
  237. </block>
  238. <view class="discount line" style="font-size: {{style.fiveDiscountFontSize *2}}rpx;font-weight: {{style.fiveDiscountWeight *2}}rpx;color: {{style.fiveDiscountColor}};">
  239. ¥{{item.price}}
  240. </view>
  241. <view class="original-price line" style="font-size: {{style.fiveOriginalFontSize *2}}rpx;font-weight: {{style.fiveOriginalWeight *2}}rpx;color: {{style.fiveOriginalColor}};">
  242. ¥{{item.original}}
  243. </view>
  244. <block wx:if="{{button}}">
  245. <button class="buy" style="background: {{style.fiveBuyBackground}};font-size: {{style.fiveBuyFontSize *2}}rpx;font-weight: {{style.fiveBuyWeight *2}};color: {{style.fiveBuyColor}}">
  246. {{item.buy}}
  247. </button>
  248. </block>
  249. <block wx:else></block>
  250. </view>
  251. </view>
  252. </view>
  253. </scroll-view>
  254. </view>
  255. </block>