cheap.swan 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <view class="tab">
  2. <view id="tabWrap">
  3. <view s-for="ui" id="tabItem" class="{{current == index? 'selected':''}}" data-class="{{index}}"
  4. bindtap="ontab">{{item}}
  5. </view>
  6. </view>
  7. <view class="blueLine" animation="{{animationLine}}" style="left:{{lineLeft}}rpx"></view>
  8. </view>
  9. <view class="card" animation="{{animationData}}">
  10. <view class="col" s-for="list">
  11. <view class="contentNull" s-if="{{!item.length}}">
  12. <view>
  13. <image src="../../../../icon/public/discount_empty.png"></image>
  14. <text>暂无可用的优惠券哦</text>
  15. </view>
  16. </view>
  17. <scroll-view scroll-y class="content" s-else style="left:{{left}}rpx">
  18. <view class="tips" s-if="{{index==0&&choose}}">
  19. <view s-if="!chooesdCashCoupon">
  20. <text>您当前下了{{nums}}个月订单,可同时选</text>
  21. <text class="red">{{nums}}</text>
  22. <text>张优惠券</text>
  23. </view>
  24. <view s-else>
  25. <text>您已选中优惠券</text>
  26. <text class="red">{{cheapDataLength}}</text>
  27. <text>张,共可抵用</text>
  28. <text class="red">¥{{cheapMoney}}</text>
  29. </view>
  30. </view> <view class="cItem {{index==0?'use':'unuse'}}">
  31. <view class="cardItem" s-for="item2,index2 in item" id="{{index2}}"
  32. bindtap="{{choose?'choose':''}}">
  33. <view class="left">
  34. <view>
  35. <text>¥</text>
  36. <text>{{item2.coupon_price}}</text>
  37. </view>
  38. <text>
  39. {{item2.p}}
  40. </text>
  41. </view>
  42. <view class="right">
  43. <view>
  44. <text>{{item2.coupon_name}}</text>
  45. <text>说明:{{item2.coupon_desc}}</text>
  46. <text>有效期至:{{item2.end}}</text>
  47. </view>
  48. <view s-if="{{index==0}}">
  49. <image src="../../../../icon/public/filter_{{item2.isSelected?'s':'n'}}.png"
  50. s-if="{{choose}}"></image>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="empty{{suffix}}"></view>
  55. </view>
  56. </scroll-view>
  57. </view>
  58. </view>
  59. <view class="btnBox{{suffix}}" s-if="{{choose}}">
  60. <view class="btn" bindtap="goBack">确定</view>
  61. </view>