index.axml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <wrapper>
  2. <view
  3. a:if="{{styleConfig && goodsItem && styleType}}"
  4. class="hot-goods-item-container{{styleType !== '4' ? ' hot-goods-item-container-border' : ''}}"
  5. style="flex-direction: {{styleConfig.innerFlexDirection}};margin-left: {{styleConfig.boxMarginLeft}};max-width: {{styleConfig.maxWidth}}"
  6. onTap="handleGoToDetail"
  7. >
  8. <!-- img -->
  9. <stock-img
  10. imgSrc="{{goodsItem.picList[0] || 'error'}}"
  11. isNoStock="{{goodsItem.stockStatus === 'Y' && !goodsItem.stock}}"
  12. width="{{styleConfig.width}}"
  13. height="{{styleConfig.height}}"
  14. stockHight="{{styleConfig.stockHight}}"
  15. />
  16. <!-- 描述信息 -->
  17. <view
  18. class="info"
  19. style="margin-left: {{styleConfig.infoMarginLeft}}"
  20. >
  21. <!-- name -->
  22. <view
  23. class="name"
  24. style="font-size: {{styleConfig.nameFontSize}};margin: {{styleConfig.nameMarginTop}} 0 {{styleConfig.nameMarginBtm}};"
  25. >{{goodsItem.name}}
  26. </view>
  27. <!-- style 2 3 4 通用 -->
  28. <block a:if="{{styleType !== '1'}}">
  29. <!-- unit -->
  30. <view
  31. class="unit"
  32. style="font-size: {{styleConfig.unitFontSize}};margin-bottom: {{styleConfig.unitMargin || '12rpx'}}"
  33. >{{goodsItem.specDesc}}</view>
  34. <!-- price -->
  35. <view
  36. class="price-button-container"
  37. style="height: {{styleConfig.priceHeight}};"
  38. >
  39. <view
  40. class="price"
  41. style="width: {{styleConfig.priceWidth}};line-height: {{styleConfig.priceLine || '0.25rem'}}"
  42. >
  43. <view class="price-icon">¥</view>
  44. <view
  45. class="price-text"
  46. style="font-size: {{styleConfig.priceFontSize}}"
  47. >{{goodsItem.sellPrice}}</view>
  48. <view
  49. class="pre-price"
  50. a:if="{{goodsItem.price !== goodsItem.sellPrice}}"
  51. >¥{{goodsItem.price}}</view>
  52. </view>
  53. <!-- 库存 -->
  54. <view
  55. a:if="{{goodsItem.stockStatus === 'Y'}}"
  56. class="{{goodsItem.stock ? 'stock' : 'stock red'}}"
  57. style="font-size: {{styleConfig.stockFontSize}};"
  58. >库存: {{goodsItem.stock || 0}}</view>
  59. </view>
  60. </block>
  61. <hot-first-style goodsItem="{{goodsItem}}" styleConfig="{{styleConfig}}" a:else />
  62. </view>
  63. </view>
  64. </wrapper>