index.wxml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <i-modal bind:cancel="close" iClass="sku-content" scrollUp="{{true}}" visible="{{visible}}">
  2. <view class="sku-card safebottom">
  3. <view bindtap="close" class="close">
  4. <image class="image" src="../../images/icon-sku-close.png"></image>
  5. </view>
  6. <view class="sku-header">
  7. <i-img defaultImage="../../images/placeholder-refund.png" height="80" iClass="sku-img" loadImage="{{cur_sku_arr.skuImage}}" width="80"></i-img>
  8. <view class="sku-desc">
  9. <view class="sku-title">
  10. <text class='span'>{{cur_sku_arr.spuName}}</text>
  11. </view>
  12. <view class="sku-price">
  13. <view class="sale-price">
  14. <block wx:if="{{buyType=='integral'}}"><text class='span'>{{cur_sku_arr.actPrice[0]}}</text>积分</block>
  15. <block wx:else>¥ <text class='span'>{{cur_sku_arr.actPrice[0]}}</text>.{{cur_sku_arr.actPrice[1]}}</block>
  16. </view>
  17. <view class="market-price" wx:if="{{buyType=='integral'}}">¥{{cur_sku_arr.marketPrice[0]}}</view>
  18. <view class="market-price" wx:else>¥{{cur_sku_arr.marketPrice[0]}}.{{cur_sku_arr.marketPrice[1]}}</view>
  19. <!-- 会员价 -->
  20. <block wx:if="{{buyType!='integral'}}">
  21. <i-vip-price wx:if="{{vipInfo.is_open_vipcard_buy==1&&vipInfo.is_vip_card_member==1&&cur_sku_arr.is_take_vipcard==1}}" price="{{cur_sku_arr.card_price}}"></i-vip-price>
  22. <block wx:elif="{{vipInfo.is_member_level_buy==1&&cur_sku_arr.is_mb_level_buy==1}}">
  23. <i-vip-price wx:if="{{vipInfo.is_open_vipcard_buy==1&&vipInfo.is_vip_card_member!=1}}" price="{{cur_sku_arr.levelprice}}" type="1"></i-vip-price>
  24. <i-vip-price wx:if="{{vipInfo.is_open_vipcard_buy!=1}}" price="{{cur_sku_arr.levelprice}}" type="1"></i-vip-price>
  25. </block>
  26. </block>
  27. </view>
  28. <view class="sku-switch-on">已选择:{{cur_sku_arr.spec}}</view>
  29. </view>
  30. </view>
  31. <view class="sku-spec" wx:for="{{skuList.list}}" wx:key="id">
  32. <view class="title">{{item.name}}</view>
  33. <view class="spec-list">
  34. <text bindtap="selectSku" class="span {{idx==sku[index]['idx']?'on':''}}" data-disabled="{{item.canBuyNum-value<0}}" data-type="{{index}}_{{idx}}_{{value.option_value_id}}_{{value.name}}" wx:for-index="idx" data-idx="{{idx}}" wx:for="{{item.option_value}}"
  35. wx:for-item="value" wx:key="idx" style="{{idx==sku[index]['idx']?'color:'+skin.color+';border-color:'+skin.color:''}}">{{value.name}}</text>
  36. </view>
  37. </view>
  38. <view class="sku-num-content">
  39. <view class="title">数量</view>
  40. <view class="i-class i-input-number i-input-number-size-{{size}}">
  41. <view bindtap="setNum" data-type="decrease" class="i-input-number-minus num-btn {{value<=min?'i-input-number-disabled':''}}">
  42. <image class='icon-btn' src="../../images/icon-input-reduce.png"></image>
  43. </view>
  44. <input wx:if="{{visible}}" bindblur="handleBlur" bindfocus="handleFocus" class="i-input-number-text {{min>=max?'i-input-number-disabled':''}}" bindinput="changeNumber" type="number" value="{{sku_val}}"></input>
  45. <view bindtap="setNum" data-type="add" class="i-input-number-plus num-btn {{value>=max?'i-input-number-disabled':''}}">
  46. <image class='icon-btn' src="../../images/icon-input-add.png"></image>
  47. </view>
  48. </view>
  49. <view class="msg" wx:if="{{cur_sku_arr.one_limit_count>0||cur_sku_arr.total_limit_count>0||cur_sku_arr.oneday_limit_count>0}}">
  50. <span wx:if="{{cur_sku_arr.one_limit_count>0}}">每单限{{cur_sku_arr.one_limit_count}}份</span>
  51. <span style="margin-left:8rpx;" wx:if="{{cur_sku_arr.total_limit_count>0}}">每人限购{{cur_sku_arr.total_limit_count}}份</span>
  52. <span></span>
  53. </view>
  54. </view>
  55. <view class="sku-num-content">
  56. <view class="even-num" wx:if="{{showLimitTip}}">
  57. 购物车总数已满或超出{{showLimitType==1?'每次':(showLimitType==2?'每天':'最多')}}购买数量
  58. </view>
  59. </view>
  60. <form bindsubmit="gocarfrom" report-submit="true">
  61. <button wx:if="{{noEougnStock}}" class="sku-confirm" disabled='true'>
  62. <view>抢光了</view>
  63. </button>
  64. <button wx:else formType="submit" class="sku-confirm" disabled='{{cur_sku_arr.stock==0?true:false}}' style="background:{{skin.color}}">
  65. <view>{{cur_sku_arr.stock==0?"已抢光":"确定"}}</view>
  66. </button>
  67. </form>
  68. </view>
  69. </i-modal>