getCoupon.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="coupon-list">
  3. <view class="coupon-box">
  4. <view class="coupon-head">
  5. <view class="coupon-sel"></view>
  6. <view class="coupon-title">
  7. <view class="coupon-title-1">满100减50</view>
  8. </view>
  9. <view class="coupon-price">
  10. ¥<text>100</text>
  11. </view>
  12. </view>
  13. <view class="coupon-desc">
  14. <view><u-icon class="icon" size="30" name="clock"></u-icon> 有效期至:2020-05-12</view>
  15. <view><u-icon class="icon" size="30" name="info-circle"></u-icon> 优惠卷使用说明优惠卷使用说明优惠卷使用说明优惠卷使用说明</view>
  16. </view>
  17. </view>
  18. <u-button class="handleSubmit" type="error">确认领取</u-button>
  19. </view>
  20. </template>
  21. <script>
  22. export default{
  23. name: 'getCoupon',
  24. data () {
  25. return {
  26. }
  27. },
  28. methods: {
  29. // 选中优惠卷
  30. checked(item) {
  31. if(this.showCheck){
  32. let has = this.list.find(item=>item.checked)
  33. if(has){
  34. has.checked = false
  35. }
  36. item.checked = true
  37. this.$emit('checkOk',item)
  38. }
  39. },
  40. },
  41. }
  42. </script>
  43. <style lang="scss">
  44. .coupon-list{
  45. width: 100%;
  46. height: 100%;
  47. padding: 25rpx;
  48. .handleSubmit{
  49. width: 80%;
  50. margin-top: 40%;
  51. }
  52. }
  53. .coupon-box.diabled{
  54. background: #999;
  55. }
  56. .coupon-box{
  57. margin-bottom: 30rpx;
  58. border-radius: 15rpx;
  59. box-shadow: 2rpx 2rpx 10rpx #ddd;
  60. background: #ff0000;
  61. color: #FFFFFF;
  62. .coupon-head{
  63. display: flex;
  64. align-items: center;
  65. padding: 20rpx 30rpx;
  66. position: relative;
  67. border-bottom: 15rpx dotted #FFFFFF;
  68. margin-bottom: -8rpx;
  69. .coupon-sel{
  70. position: absolute;
  71. width: 56rpx;
  72. height: 46rpx;
  73. right: 0;
  74. top: 0;
  75. }
  76. .coupon-checked{
  77. background: url(/static/img/select.png) no-repeat center;
  78. background-size: 100% 100%;
  79. }
  80. .coupon-title{
  81. flex-grow: 1;
  82. font-size: 32rpx;
  83. }
  84. .coupon-price{
  85. padding: 0 15rpx;
  86. color: #FFFFFF;
  87. text{
  88. font-size: 60rpx;
  89. }
  90. }
  91. }
  92. .coupon-desc{
  93. padding: 10rpx 30rpx;
  94. color: #666;
  95. background: #FFFFFF;
  96. border-bottom-left-radius:10rpx;
  97. border-bottom-right-radius: 10rpx;
  98. >view{
  99. padding: 5rpx 0;
  100. }
  101. .icon{
  102. margin-right: 10rpx;
  103. }
  104. }
  105. }
  106. </style>