珠宝小程序前端代码
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.

132 lines
2.5 KiB

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 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. computed: {
  41. show: {
  42. get() {
  43. return this.value;
  44. },
  45. set(newValue) {
  46. this.$emit('input', newValue);
  47. }
  48. }
  49. },
  50. props: {
  51. value: {
  52. type: Boolean,
  53. default: false
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .couponPopup {
  60. .couponPopup-wrapper {
  61. width: 100%;
  62. height: 100vh;
  63. display: flex;
  64. justify-content: center;
  65. align-items: center;
  66. .main-container {
  67. .body {
  68. position: relative;
  69. .coupon-bg {}
  70. .close-btn {
  71. position: absolute;
  72. right: 0;
  73. top: 0;
  74. width: 50rpx;
  75. height: 50rpx;
  76. }
  77. .coupon-money {
  78. display: flex;
  79. justify-content: center;
  80. align-items: flex-end;
  81. position: absolute;
  82. left: 50%;
  83. top: 34%;
  84. width: 40%;
  85. color: #FF6733;
  86. transform: translateX(-30%);
  87. font-weight: bold;
  88. .unit {
  89. font-size: 40rpx;
  90. }
  91. .money {
  92. font-size: 120rpx;
  93. line-height: 120rpx;
  94. }
  95. }
  96. .register-success {
  97. position: absolute;
  98. top: 7%;
  99. left: 50%;
  100. transform: translateX(-50%);
  101. width: 80%;
  102. }
  103. .shopping {
  104. position: absolute;
  105. bottom: 5%;
  106. left: 50%;
  107. transform: translateX(-50%);
  108. color: #FEF3DD;
  109. text-align: center;
  110. font-size: 40rpx;
  111. width: 80%;
  112. }
  113. }
  114. .examine {
  115. display: block;
  116. width: 70%;
  117. margin: 20rpx auto;
  118. }
  119. }
  120. }
  121. }
  122. </style>