敢为人鲜小程序前端代码仓库
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

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 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="configList.wx_image" mode="widthFix" class="coupon-bg"></image>
  9. <image @click="closeCouponPopup" src="@/static/image/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="configList.qd_image" mode="widthFix" class="register-success"></image>
  19. <view class="shopping">购物即可抵扣</view>
  20. </view>
  21. <image @click="examineCoupon" :src="configList.down_image" mode="widthFix" class="examine"></image>
  22. </view>
  23. </view>
  24. </uv-overlay>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. name: "CouponPopup",
  30. data() {
  31. return {}
  32. },
  33. methods: {
  34. //关闭新人优惠券活动
  35. closeCouponPopup() {
  36. this.show = false;
  37. },
  38. //查看优惠券
  39. examineCoupon() {
  40. this.$emit("examine")
  41. }
  42. },
  43. computed: {
  44. show: {
  45. get() {
  46. return this.value;
  47. },
  48. set(newValue) {
  49. this.$emit('input', newValue);
  50. }
  51. }
  52. },
  53. props: {
  54. value: {
  55. type: Boolean,
  56. default: false
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .couponPopup {
  63. .couponPopup-wrapper {
  64. width: 100%;
  65. height: 100vh;
  66. display: flex;
  67. justify-content: center;
  68. align-items: center;
  69. .main-container {
  70. .body {
  71. position: relative;
  72. .coupon-bg {
  73. }
  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>