敢为人鲜小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
2.6 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <!-- 优惠券弹窗 -->
  2. <template>
  3. <view class="couponPopup">
  4. <uv-overlay :show="show" :z-index="999999">
  5. <view class="couponPopup-wrapper">
  6. <view class="main-container">
  7. <view class="body">
  8. <image src="@/pages_order/static/coupon/bg.png" mode="widthFix" class="coupon-bg"></image>
  9. <image @click="closeCouponPopup" src="@/pages_order/static/coupon/close-btn.png" mode="widthFix"
  10. class="close-btn">
  11. </image>
  12. <view class="coupon-money">
  13. <text class="unit"></text>
  14. <view class="money">
  15. 20
  16. </view>
  17. </view>
  18. <image src="@/pages_order/static/coupon/register-success.png" mode="widthFix"
  19. class="register-success"></image>
  20. <view class="shopping">购物即可抵扣</view>
  21. </view>
  22. <image @click="examineCoupon" src="@/pages_order/static/coupon/examine.png" mode="widthFix" class="examine"></image>
  23. </view>
  24. </view>
  25. </uv-overlay>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. name: "CouponPopup",
  31. data() {
  32. return {}
  33. },
  34. methods: {
  35. //关闭新人优惠券活动
  36. closeCouponPopup() {
  37. this.show = false;
  38. },
  39. //查看优惠券
  40. examineCoupon() {
  41. this.$emit("examine")
  42. }
  43. },
  44. computed: {
  45. show: {
  46. get() {
  47. return this.value;
  48. },
  49. set(newValue) {
  50. this.$emit('input', newValue);
  51. }
  52. }
  53. },
  54. props: {
  55. value: {
  56. type: Boolean,
  57. default: false
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .couponPopup {
  64. .couponPopup-wrapper {
  65. width: 100%;
  66. height: 100vh;
  67. display: flex;
  68. justify-content: center;
  69. align-items: center;
  70. .main-container {
  71. .body {
  72. position: relative;
  73. .coupon-bg {}
  74. .close-btn {
  75. position: absolute;
  76. right: 0;
  77. top: 0;
  78. width: 50rpx;
  79. height: 50rpx;
  80. }
  81. .coupon-money {
  82. display: flex;
  83. justify-content: center;
  84. align-items: flex-end;
  85. position: absolute;
  86. left: 50%;
  87. top: 34%;
  88. width: 40%;
  89. color: #FF6733;
  90. transform: translateX(-30%);
  91. font-weight: bold;
  92. .unit {
  93. font-size: 40rpx;
  94. }
  95. .money {
  96. font-size: 120rpx;
  97. line-height: 120rpx;
  98. }
  99. }
  100. .register-success {
  101. position: absolute;
  102. top: 7%;
  103. left: 50%;
  104. transform: translateX(-50%);
  105. width: 80%;
  106. }
  107. .shopping {
  108. position: absolute;
  109. bottom: 5%;
  110. left: 50%;
  111. transform: translateX(-50%);
  112. color: #FEF3DD;
  113. text-align: center;
  114. font-size: 40rpx;
  115. width: 80%;
  116. }
  117. }
  118. .examine {
  119. display: block;
  120. width: 70%;
  121. margin: 20rpx auto;
  122. }
  123. }
  124. }
  125. }
  126. </style>