12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <wrapper>
- <view
- a:if="{{styleConfig && goodsItem && styleType}}"
- class="hot-goods-item-container{{styleType !== '4' ? ' hot-goods-item-container-border' : ''}}"
- style="flex-direction: {{styleConfig.innerFlexDirection}};margin-left: {{styleConfig.boxMarginLeft}};max-width: {{styleConfig.maxWidth}}"
- onTap="handleGoToDetail"
- >
- <!-- img -->
- <stock-img
- imgSrc="{{goodsItem.picList[0] || 'error'}}"
- isNoStock="{{goodsItem.stockStatus === 'Y' && !goodsItem.stock}}"
- width="{{styleConfig.width}}"
- height="{{styleConfig.height}}"
- stockHight="{{styleConfig.stockHight}}"
- />
- <!-- 描述信息 -->
- <view
- class="info"
- style="margin-left: {{styleConfig.infoMarginLeft}}"
- >
- <!-- name -->
- <view
- class="name"
- style="font-size: {{styleConfig.nameFontSize}};margin: {{styleConfig.nameMarginTop}} 0 {{styleConfig.nameMarginBtm}};"
- >{{goodsItem.name}}
- </view>
- <!-- style 2 3 4 通用 -->
- <block a:if="{{styleType !== '1'}}">
- <!-- unit -->
- <view
- class="unit"
- style="font-size: {{styleConfig.unitFontSize}};margin-bottom: {{styleConfig.unitMargin || '12rpx'}}"
- >{{goodsItem.specDesc}}</view>
- <!-- price -->
- <view
- class="price-button-container"
- style="height: {{styleConfig.priceHeight}};"
- >
- <view
- class="price"
- style="width: {{styleConfig.priceWidth}};line-height: {{styleConfig.priceLine || '0.25rem'}}"
- >
- <view class="price-icon">¥</view>
- <view
- class="price-text"
- style="font-size: {{styleConfig.priceFontSize}}"
- >{{goodsItem.sellPrice}}</view>
- <view
- class="pre-price"
- a:if="{{goodsItem.price !== goodsItem.sellPrice}}"
- >¥{{goodsItem.price}}</view>
- </view>
- <!-- 库存 -->
- <view
- a:if="{{goodsItem.stockStatus === 'Y'}}"
- class="{{goodsItem.stock ? 'stock' : 'stock red'}}"
- style="font-size: {{styleConfig.stockFontSize}};"
- >库存: {{goodsItem.stock || 0}}</view>
- </view>
- </block>
- <hot-first-style goodsItem="{{goodsItem}}" styleConfig="{{styleConfig}}" a:else />
- </view>
- </view>
- </wrapper>
|