index.wxml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!--index.wxml-->
  2. <view class="wrap">
  3. <view class="order_wrap">
  4. <text class="price"><text class="unit">¥</text>{{ totalPrice }}</text>
  5. <view class="order_price">账单金额</view>
  6. </view>
  7. <view class="payment_wrap">
  8. <view class="payment_item" bind:tap="changeCard">
  9. <view class="item_t">
  10. <view class="item_t_l">
  11. <image class="item_icon" mode="heightFix" src="/statics/img/icon_dengji.png"></image>
  12. <view class="item_name">会员卡支付</view>
  13. </view>
  14. <view class="item_t_r">
  15. <!-- <text class="unit"></text> -->
  16. <view class="price">{{ userMoney > totalPrice ? '-'+ totalPrice : '-'+ userMoney }}</view>
  17. <van-checkbox value="{{ checkedCard }}" checked-color="#295C56"></van-checkbox>
  18. </view>
  19. </view>
  20. <view class="item_b">
  21. <text class="wenzi"><text class="label">卡内余额</text>¥{{ userMoney }}</text>
  22. <text class="wenzi"><text class="label">可用</text>¥{{ userMoney > totalPrice ? totalPrice : userMoney }}</text>
  23. </view>
  24. </view>
  25. <view class="card_list">
  26. <view class="card_item_w" wx:for="{{ cardList }}" wx:key="index" bind:tap="clickCard" data-id="{{ item.id }}">
  27. <view class="{{ item.checked ? 'card_item active' : 'card_item' }}">
  28. <view wx:if="{{ item.type == 2 }}">
  29. <!-- 年卡 -->
  30. <view class="card_item_col">
  31. <view class="card_text">{{ item.price }}元购{{ item.title }}</view>
  32. <view class="card_send">得</view>
  33. <view class="card_text">会员</view>
  34. </view>
  35. </view>
  36. <view wx:else>
  37. <view class="card_item_col">
  38. <view class="card_text">充值{{ item.price }}元</view>
  39. <view class="card_send">得</view>
  40. <view class="card_text">{{ item.priceAddCoupons }}元</view>
  41. </view>
  42. <view class="card_item_col desc" wx:if="{{ item.coupon_rule }}">
  43. <text class="">{{ item.price }}元卡金</text>
  44. <text class="">+ {{ item.coupon_rule.coupon.price }}元x{{ item.coupon_rule.num }}张券</text>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="payment_item" bind:tap="changeWechat">
  51. <view class="item_t">
  52. <view class="item_t_l">
  53. <image class="item_icon" mode="heightFix" src="/statics/img/icon_weixin.png"></image>
  54. <view class="item_name">微信支付</view>
  55. </view>
  56. <view class="item_t_r">
  57. <van-checkbox value="{{ checkedWechat }}" checked-color="#295C56"></van-checkbox>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="payment_item" wx:if="{{ couponNums && !order_id }}" bind:tap="onShowCoupons">
  62. <view class="item_t">
  63. <view class="item_t_l">
  64. <image class="item_icon" mode="heightFix" src="/statics/img/icon_quan.png"></image>
  65. <view class="item_name">优惠券</view>
  66. </view>
  67. <view class="item_t_r">
  68. <view class="quan">
  69. <!-- <text wx:if="{{ checkedCoupon }}">{{ checkedCoupon.type == 3 ? '折扣优惠券' : checkedCoupon.type == 2 ? '金额优惠券' : '满减券' }}</text> -->
  70. <text wx:if="{{ checkedCoupon }}">{{ checkedCoupon.type == 3 ? checkedCoupon.discount+'折' : '-'+checkedCoupon.price }}</text>
  71. <text wx:else>{{ couponNums }}张可用</text>
  72. </view>
  73. <van-icon name="arrow" color="#333333" />
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="btn_tijiao" bind:tap="confirmCreateOrder">
  79. <text class="label">{{ checkedCard ? '会员卡支付' : '微信支付' }}</text>
  80. <text class="price"><text class="unit">¥</text>{{ totalPrice }}</text>
  81. </view>
  82. </view>
  83. <!-- 余额不足提醒 -->
  84. <van-overlay z-index="2" class-style="background: rgba(0,0,0,.3);" show="{{ showCashPop }}">
  85. <view class="cash_pop">
  86. <view class="cash_pop_t">余额不足充值享更多优惠</view>
  87. <view class="cash_pop_b">
  88. <view class="cash_pop_btn" bind:tap="onAddWechat">加微信支付</view>
  89. <view class="cash_pop_btn recharge" bind:tap="onRecharge">先充值</view>
  90. </view>
  91. <!-- <image class="tip_tu" src="/statics/img/fail_tu.png"></image> -->
  92. </view>
  93. </van-overlay>
  94. <!-- 选择优惠券 -->
  95. <van-overlay z-index="2" class-style="background: rgba(0,0,0,.3);" show="{{ showCoupons }}">
  96. <view class="coupon_wrap">
  97. <view class="coupon_t">
  98. <view class="coupon_t_l">选择优惠券</view>
  99. <van-icon name="cross" color="rgba(0,0,0,.36)" bind:tap="onCloseCoupons" />
  100. </view>
  101. <scroll-view scroll-y class="coupon_wrap_scroll">
  102. <view class="coupon_list">
  103. <van-checkbox-group value="{{ couponIdArr }}" max="{{1}}">
  104. <van-cell-group>
  105. <van-cell clickable data-name="{{ item.id }}" wx:for="{{ couponList }}" wx:key="index" bind:click="onClickCoupons" data-item="{{ item }}">
  106. <view class="coupon_item" style="background-image: url({{ couponBg }})">
  107. <view class="item_l" wx:if="{{ item.type == 1 }}">
  108. <view class="price"><text class="unit">¥</text>{{ item.price }}</view>
  109. <view class="tips">满{{ item.base_price }}元可用</view>
  110. </view>
  111. <view class="item_l" wx:if="{{ item.type == 2 }}">
  112. <view class="price"><text class="unit">¥</text>{{ item.price }}</view>
  113. <view class="tips">无门槛</view>
  114. </view>
  115. <view class="item_l" wx:if="{{ item.type == 3 }}">
  116. <view class="price">{{ item.discount }}折</view>
  117. </view>
  118. <view class="item_r">
  119. <view class="item_r_l">
  120. <view class="quan_name">{{ item.type == 3 ? '折扣优惠券' : item.type == 2 ? '金额优惠券' : '满减券' }}</view>
  121. <view class="quan_time">有效期至{{ item.due_time }}</view>
  122. </view>
  123. <van-checkbox slot="right-icon" name="{{ item.id }}" checked-color="#295C56" />
  124. </view>
  125. </view>
  126. </van-cell>
  127. </van-cell-group>
  128. </van-checkbox-group>
  129. </view>
  130. </scroll-view>
  131. </view>
  132. </van-overlay>
  133. <!-- loading -->
  134. <!-- <van-overlay show="{{ loading }}" z-index="100">
  135. <van-loading custom-class="custom_loading" />
  136. </van-overlay> -->