coupon.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <cover-view class="coupon-content">
  3. <cover-view class="div coupon-wrapper">
  4. <cover-image mode="aspectFit" src="@/static/image/live/coupon.png" class="img coupon-img" />
  5. <cover-view class="div info">
  6. <cover-view class="title-wrapper"><text class="div title">{{voucher.vouchertemplate_points?voucher.vouchertemplate_points:'免'}}积分兑换</text></cover-view>
  7. <cover-view class="desc-wrapper"><text class="div desc">满{{voucher.vouchertemplate_limit}}减{{voucher.vouchertemplate_price}}</text></cover-view>
  8. <cover-view class="btn-wrapper"><text class="div btn" @click="usecoupon">立即领取</text></cover-view>
  9. </cover-view>
  10. <cover-image mode="aspectFit" src="@/static/image/live/close-w.png" class="img close" @click="close"/>
  11. </cover-view>
  12. </cover-view>
  13. </template>
  14. <script>
  15. export default {
  16. props: {
  17. voucher: {}
  18. },
  19. data () {
  20. return {}
  21. },
  22. methods: {
  23. showgoods () {
  24. this.$emit('showgoods')
  25. },
  26. close () {
  27. this.$emit('hidecoupon')
  28. },
  29. usecoupon () {
  30. this.$emit('usecoupon')
  31. }
  32. },
  33. computed: {},
  34. created () {
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .coupon-content{
  40. /* #ifndef APP-PLUS-NVUE */
  41. display: flex;
  42. /* #endif */
  43. justify-content: center;
  44. align-items: center;
  45. }
  46. .coupon-wrapper {
  47. width: 555rpx;
  48. height: 313rpx;
  49. position: relative;
  50. /* #ifndef APP-PLUS-NVUE */
  51. margin: 0 auto;
  52. /* #endif */
  53. }
  54. .coupon-img {
  55. width: 555rpx;
  56. height: 313rpx;
  57. position: absolute;
  58. z-index: 1;
  59. top: 0;
  60. left: 0;
  61. }
  62. .info {
  63. /* #ifndef APP-PLUS-NVUE */
  64. display: flex;
  65. /* #endif */
  66. flex-direction: column;
  67. align-items: center;
  68. justify-content: center;
  69. width: 555rpx;
  70. height: 313rpx;
  71. position: absolute;
  72. top: 0;
  73. left: 0;
  74. z-index: 2;
  75. }
  76. .title-wrapper{
  77. margin-top: 47rpx;
  78. text-align: center;
  79. }
  80. .title {
  81. font-family: PingFangSC-Medium;
  82. font-size: 14px;
  83. color: #FFFFFF;
  84. /* #ifndef APP-PLUS-NVUE */
  85. letter-spacing: 0;
  86. /* #endif */
  87. line-height: 40rpx;
  88. }
  89. .desc-wrapper{
  90. margin-top: 31rpx;
  91. text-align: center;
  92. }
  93. .desc {
  94. font-family: PingFangSC-Regular;
  95. font-size: 18px;
  96. color: #FFFFFF;
  97. /* #ifndef APP-PLUS-NVUE */
  98. letter-spacing: 0;
  99. /* #endif */
  100. line-height: 50rpx;
  101. }
  102. .btn-wrapper{
  103. height: 64rpx;
  104. width: 316rpx;
  105. border-radius: 39.5rpx;
  106. border-radius: 39.5rpx;
  107. background: #FFFFFF;
  108. text-align: center;
  109. /* #ifndef APP-PLUS-NVUE */
  110. display: flex;
  111. /* #endif */
  112. align-items: center;
  113. justify-content: center;
  114. margin-top: 46rpx;
  115. }
  116. .btn {
  117. padding: 0;
  118. font-family: PingFangSC-Regular;
  119. font-size: 14px;
  120. color: #F16161;
  121. /* #ifndef APP-PLUS-NVUE */
  122. letter-spacing: 0;
  123. /* #endif */
  124. line-height: 64rpx;
  125. }
  126. .close{
  127. width: 52rpx;
  128. height: 52rpx;
  129. position: absolute;
  130. top: 20rpx;
  131. right: 20rpx;
  132. z-index: 2
  133. }
  134. </style>