birthday.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="birthday-modal-middle">
  3. <view class="bg"></view>
  4. <view class="birthday-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 cl-notice ft20"></text>
  8. </view>
  9. <view class="text-center">
  10. <text class="ft16 ftw600 cl-main">{{title}}</text>
  11. </view>
  12. <view class="text-center mt24">
  13. <image :src="statics.birthdayPic" style="width: 412rpx; height: 296rpx;"></image>
  14. </view>
  15. <view class="mt24" style="max-height: 400rpx; overflow-y: scroll;">
  16. <view class="birthday-gift-box pd16_15">
  17. <view class="flex alcenter space">
  18. <text class="ft14 cl-main">专业洗剪吹3次</text>
  19. <text class="ft12 cl-notice">x1</text>
  20. </view>
  21. <view class="mt8 ft12 cl-orange">价值¥188</view>
  22. </view>
  23. <view class="birthday-gift-box pd16_15 mt8">
  24. <view class="flex alcenter space">
  25. <text class="ft14 cl-main">专业洗剪吹3次</text>
  26. <text class="ft12 cl-notice">x1</text>
  27. </view>
  28. <view class="mt8 ft12 cl-orange">价值¥188</view>
  29. </view>
  30. <view class="birthday-gift-box pd16_15 mt8">
  31. <view class="flex alcenter space">
  32. <text class="ft14 cl-main">专业洗剪吹3次</text>
  33. <text class="ft12 cl-notice">x1</text>
  34. </view>
  35. <view class="mt8 ft12 cl-orange">价值¥188</view>
  36. </view>
  37. </view>
  38. </view>
  39. <view v-if="showOnly == false" class="birthday-get-btn" :style="{background:tempColor}">确定领取</view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default{
  45. props:{
  46. title:{
  47. type:String,
  48. default:'祝你生日快乐'
  49. },
  50. datas:{
  51. type:Array,
  52. default:function(){
  53. return new Array;
  54. }
  55. },
  56. showOnly:{
  57. type:Boolean,
  58. default:false
  59. }
  60. },
  61. data(){
  62. return {
  63. show:false,
  64. }
  65. },
  66. created(){
  67. this.show = true;
  68. },
  69. methods:{
  70. closed(){
  71. this.show = false;
  72. setTimeout(()=>{
  73. this.$emit('closed',true);
  74. },400)
  75. }
  76. }
  77. }
  78. </script>
  79. <style>
  80. .birthday-modal-middle{
  81. width: 100%;
  82. height: 100vh;
  83. position: fixed;
  84. z-index: 400;
  85. left: 0;
  86. top: 0;
  87. }
  88. .birthday-modal-middle .bg{
  89. position: fixed;
  90. width: 100%;
  91. height: 100vh;
  92. background: rgba(0,0,0,.5);
  93. z-index: 401;
  94. left: 0;
  95. top: 0;
  96. }
  97. .birthday-modal-middle-main{
  98. width: 690rpx;
  99. background: #F5F6FA;
  100. border-radius: 32rpx;
  101. position: fixed;
  102. top: 50%;
  103. left: calc(50% - 345rpx);
  104. transform:translateY(-50%);
  105. z-index: 402;
  106. overflow: hidden;
  107. }
  108. .birthday-modal-middle-main .middle-main{
  109. position: relative;
  110. padding: 64rpx 30rpx 30rpx 30rpx;
  111. }
  112. .birthday-modal-middle-main .middle-closed{
  113. position: absolute;
  114. width: 40rpx;
  115. height: 40rpx;
  116. right: 50rpx;
  117. top: 50rpx;
  118. text-align: center;
  119. line-height: 40rpx;
  120. }
  121. .birthday-gift-box{
  122. width: 100%;
  123. height: 148rpx;
  124. background: #FFFFFF;
  125. border-radius: 8rpx;
  126. }
  127. .birthday-get-btn{
  128. width: 100%;
  129. height: 96rpx;
  130. text-align: center;
  131. font-size: 32rpx;
  132. color:#FFFFFF;
  133. font-weight: 500;
  134. line-height: 96rpx;
  135. }
  136. </style>