index.wxml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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
  21. class='itemn {{item.checked==itemn.attr ?"on":""}}'
  22. wx:for="{{item.attr_value}}"
  23. wx:for-item="itemn"
  24. wx:for-index="indexn"
  25. data-indexw="{{index}}"
  26. data-indexn="{{indexn}}"
  27. bindtap="tapAttr"
  28. wx:key="index"
  29. >{{itemn.attr}}</view
  30. >
  31. </view>
  32. </view>
  33. </view>
  34. <view class="cart">
  35. <view class="title">数量</view>
  36. <view class="carnum acea-row row-left">
  37. <view class='reduce {{productSelect.cart_num <= 1 ? "on":""}}' bindtap="CartNumDes">-</view>
  38. <view class="num">
  39. <input
  40. type="number"
  41. value="{{productSelect.cart_num}}"
  42. data-name="productSelect.cart_num"
  43. bindinput="bindCode"
  44. />
  45. </view>
  46. <view
  47. wx:if="{{iSplus}}"
  48. class='plus {{productSelect.cart_num >= productSelect.stock? "on":""}}'
  49. bindtap="CartNumInt"
  50. >+</view
  51. >
  52. <view
  53. wx:else
  54. class='plus {{(productSelect.cart_num >= productSelect.quota_show) || (productSelect.cart_num >= productSelect.product_stock) || (productSelect.cart_num >= productSelect.num)? "on":""}}'
  55. bindtap="CartNumInt"
  56. >+</view
  57. >
  58. </view>
  59. </view>
  60. <view
  61. class="joinBnt bg-color"
  62. wx:if="{{iSbnt && productSelect.product_stock>0 &&productSelect.quota>0}}"
  63. bindtap="goCat"
  64. >我要参团</view
  65. >
  66. <view class="joinBnt on" wx:elif="{{(iSbnt && productSelect.quota<=0)||(iSbnt &&productSelect.product_stock<=0)}}">
  67. 已售罄</view
  68. >
  69. </view>
  70. <view class="mask" catchtouchmove="true" hidden="{{attribute.cartAttr==false}}" bindtap="close"></view>