index.wxml 2.5 KB

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