index.wxml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <view class='product-window {{attribute.cartAttr==true?"on":""}} {{iSbnt?"join":""}}'>
  2. <view class='textpic acea-row row-between-wrapper'>
  3. <view class='pictrue'><image src='{{productSelect.image}}'></image></view>
  4. <view class='text'>
  5. <view class='line1'>{{productSelect.store_name}}</view>
  6. <view class='money font-color'>
  7. ¥<text class='num'>{{productSelect.price}}</text>
  8. <text class='stock' wx:if="{{isShow}}">库存: {{productSelect.stock}}</text>
  9. <text class='stock' wx:if="{{limitNum}}">限量: {{productSelect.quota_show}}</text>
  10. </view>
  11. </view>
  12. <view class='iconfont icon-guanbi' bindtap='close'></view>
  13. </view>
  14. <view class='productWinList'>
  15. <view class='item' wx:for='{{productAttr}}' wx:key='index'>
  16. <view class='title'>{{item.attr_name}}</view>
  17. <view class='listn acea-row row-middle'>
  18. <view class='itemn {{item.checked==itemn.attr ?"on":""}}' wx:for='{{item.attr_value}}' wx:for-item='itemn' wx:for-index='indexn' data-indexw='{{index}}' data-indexn='{{indexn}}' bindtap='tapAttr' wx:key='index'>{{itemn.attr}}</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class='cart'>
  23. <view class='title'>数量</view>
  24. <view class='carnum acea-row row-left'>
  25. <view class='reduce {{productSelect.cart_num <= 1 ? "on":""}}' bindtap='CartNumDes'>-</view>
  26. <view class='num'>
  27. <input type="number" value="{{productSelect.cart_num}}" data-name="productSelect.cart_num" bindinput="bindCode"></input>
  28. </view>
  29. <view wx:if="{{iSplus}}" class='plus {{productSelect.cart_num >= productSelect.stock? "on":""}}' bindtap='CartNumInt'>+</view>
  30. <view wx:else class='plus {{(productSelect.cart_num >= productSelect.quota_show) || (productSelect.cart_num >= productSelect.product_stock)? "on":""}}' bindtap='CartNumInt'>+</view>
  31. </view>
  32. </view>
  33. <view class="joinBnt bg-color" wx:if="{{iSbnt && productSelect.product_stock>0 &&productSelect.quota>0}}" bindtap="goCat">我要参团</view>
  34. <view class="joinBnt on" wx:elif="{{(iSbnt && productSelect.quota<=0)||(iSbnt &&productSelect.product_stock<=0)}}">已售罄</view>
  35. </view>
  36. <view class='mask' catchtouchmove="true" hidden='{{attribute.cartAttr==false}}' bindtap='close'></view>