couponshareget.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="couponshareget-modal-middle">
  3. <view class="bg"></view>
  4. <view class="couponshareget-modal-middle-main" :class=" show ? 'animated fast zoomInUp' :'animated fast zoomOutDown'">
  5. <view class="middle-main">
  6. <view @click="closed" class="middle-closed">
  7. <text class="iconfont iconbtn_close ft20"></text>
  8. </view>
  9. <view class="pd20_15">
  10. <view class="flex alcenter"><image :src="statics.defaultFace" class="coupon-share-get-face"></image> <text class="ml10 ft14 cl-w">张华邀请您</text></view>
  11. <view class="ft16 ftw500 cl-yellow mt8">一起领取优惠券</view>
  12. </view>
  13. <view class="text-center">
  14. <image :src="statics.couponAlert[1]" style="width: 240rpx; height: 240rpx;"></image>
  15. </view>
  16. <image :src="statics.couponAlert[2]" class="footer-bg"></image>
  17. <view class="footer-act-main">
  18. <button @click="getAct" class="share-btn">立即领取</button>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default{
  26. props:{
  27. },
  28. data(){
  29. return {
  30. show:false,
  31. }
  32. },
  33. created(){
  34. this.show = true;
  35. },
  36. methods:{
  37. getAct(){
  38. this.$emit('loginAct');
  39. },
  40. closed(){
  41. this.show = false;
  42. setTimeout(()=>{
  43. this.$emit('closed',true);
  44. },400)
  45. }
  46. }
  47. }
  48. </script>
  49. <style>
  50. .couponshareget-modal-middle{
  51. width: 100%;
  52. height: 100vh;
  53. position: fixed;
  54. z-index: 200;
  55. left: 0;
  56. top: 0;
  57. }
  58. .couponshareget-modal-middle .bg{
  59. position: fixed;
  60. width: 100%;
  61. height: 100vh;
  62. background: rgba(0,0,0,.5);
  63. z-index: 201;
  64. left: 0;
  65. top: 0;
  66. }
  67. .couponshareget-modal-middle-main{
  68. width: 630rpx;
  69. background: #FD4E4A;
  70. border-radius: 32rpx;
  71. position: fixed;
  72. top: 50%;
  73. left: calc(50% - 315rpx);
  74. transform:translateY(-50%);
  75. z-index: 202;
  76. overflow: hidden;
  77. }
  78. .couponshareget-modal-middle-main .middle-main{
  79. position: relative;
  80. height: 576rpx;
  81. width: 100%;
  82. }
  83. .couponshareget-modal-middle-main .middle-closed{
  84. position: absolute;
  85. width: 80rpx;
  86. height: 80rpx;
  87. right:0rpx;
  88. top: 0rpx;
  89. text-align: center;
  90. line-height: 80rpx;
  91. text-align: center;
  92. background: rgba(0,0,0,0.5);
  93. color:#FFFFFF;
  94. border-radius: 0rpx 0rpx 0rpx 32rpx;
  95. }
  96. .couponshareget-modal-middle-main .footer-bg{
  97. width: 100%;
  98. height: 160rpx;
  99. position: absolute;
  100. left: 0;
  101. bottom: 0;
  102. }
  103. .couponshareget-modal-middle-main .footer-act-main{
  104. width: 100%;
  105. height: 160rpx;
  106. position: absolute;
  107. left: 0;
  108. bottom: 0;
  109. display: flex;
  110. justify-content: center;
  111. align-items: center;
  112. }
  113. .couponshareget-modal-middle-main .footer-act-main .share-btn{
  114. width: 330rpx;
  115. height: 80rpx;
  116. background: linear-gradient(180deg, #FFF6D6 0%, #FFE388 100%);
  117. box-shadow: 0rpx 8rpx 24rpx 0rpx rgba(0, 0, 0, 0.08);
  118. border-radius: 40rpx;
  119. color:#F14844;
  120. font-size: 32rpx;
  121. font-weight: 500;
  122. display: flex;
  123. justify-content: center;
  124. align-items: center;
  125. margin: 0;
  126. padding: 0;
  127. }
  128. .couponshareget-modal-middle-main .coupon-share-get-face{
  129. width: 48rpx;
  130. height: 48rpx;
  131. border-radius: 24rpx;
  132. }
  133. </style>