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

135 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
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-popup ref="couponPopup"
  5. customStyle="background-color: transparent;"
  6. :z-index="999999">
  7. <view class="couponPopup-wrapper">
  8. <view class="main-container">
  9. <view class="body">
  10. <image :src="configList.wx_image" mode="widthFix" class="coupon-bg"></image>
  11. <image @click="close" src="@/static/image/coupon/close-btn.png" mode="widthFix"
  12. class="close-btn">
  13. </image>
  14. <view class="coupon-money">
  15. <text class="unit"></text>
  16. <view class="money">
  17. {{ riceInfo.getCouponMoney }}
  18. </view>
  19. </view>
  20. <image :src="configList.qd_image" mode="widthFix" class="register-success"></image>
  21. <view class="shopping">购物即可抵扣</view>
  22. </view>
  23. <image @click="close"
  24. :src="configList.down_image" mode="widthFix"
  25. class="examine"></image>
  26. </view>
  27. </view>
  28. </uv-popup>
  29. </view>
  30. </template>
  31. <script>
  32. import {
  33. mapState
  34. } from 'vuex'
  35. export default {
  36. name: "CouponPopup",
  37. data() {
  38. return {}
  39. },
  40. mounted() {
  41. this.$refs.couponPopup.open()
  42. },
  43. computed: {
  44. ...mapState(['riceInfo'])
  45. },
  46. methods: {
  47. //跳转优惠券页面
  48. toCoupon() {
  49. this.$refs.couponPopup.close()
  50. uni.navigateTo({
  51. url: "/pages_order/mine/coupon"
  52. })
  53. },
  54. close(){
  55. this.$refs.couponPopup.close()
  56. },
  57. },
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .couponPopup {
  62. .couponPopup-wrapper {
  63. width: 100%;
  64. height: 100vh;
  65. display: flex;
  66. justify-content: center;
  67. align-items: center;
  68. .main-container {
  69. .body {
  70. position: relative;
  71. .coupon-bg {
  72. }
  73. .close-btn {
  74. position: absolute;
  75. right: 0;
  76. top: 0;
  77. width: 50rpx;
  78. height: 50rpx;
  79. }
  80. .coupon-money {
  81. display: flex;
  82. justify-content: center;
  83. align-items: flex-end;
  84. position: absolute;
  85. left: 50%;
  86. top: 34%;
  87. width: 40%;
  88. color: #FF6733;
  89. transform: translateX(-30%);
  90. font-weight: bold;
  91. .unit {
  92. font-size: 40rpx;
  93. }
  94. .money {
  95. font-size: 120rpx;
  96. line-height: 120rpx;
  97. }
  98. }
  99. .register-success {
  100. position: absolute;
  101. top: 7%;
  102. left: 50%;
  103. transform: translateX(-50%);
  104. width: 80%;
  105. }
  106. .shopping {
  107. position: absolute;
  108. bottom: 5%;
  109. left: 50%;
  110. transform: translateX(-50%);
  111. color: #FEF3DD;
  112. text-align: center;
  113. font-size: 40rpx;
  114. width: 80%;
  115. }
  116. }
  117. .examine {
  118. display: block;
  119. width: 70%;
  120. margin: 20rpx auto;
  121. }
  122. }
  123. }
  124. }
  125. </style>