levelSuccessPopup.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <up-popup :show="showPopup" mode="center" @close="handleClose" bgColor="transparent" overlayOpacity="0.8">
  3. <view class="level-popup" @click="handleClose">
  4. <image class="medal-icon" :src="`${config.BASIC_IMG}img/medal-icon-1.png`"></image>
  5. <view class="level-cont">
  6. <view class="level-text">
  7. <view class="text">V1-青铜等级</view>
  8. <text>您的能量已达到 100分</text>
  9. </view>
  10. <view class="award-cont">
  11. <view class="title">奖励明细</view>
  12. <view class="gift">
  13. <image class="icon" :src="`${config.BASIC_IMG}img/biscuits.png`"></image>
  14. <text>曲奇饼干兑换券一份</text>
  15. </view>
  16. <view class="tips">
  17. 已发放到 <text>个人中心-优惠券</text>
  18. </view>
  19. </view>
  20. <view class="button-group">
  21. <view class="btn">开心收下</view>
  22. <up-icon class="close" name="close-circle-fill" size="30" color="rgba(255, 255, 255, 0.7)"></up-icon>
  23. </view>
  24. </view>
  25. </view>
  26. </up-popup>
  27. </template>
  28. <script setup>
  29. import config from "@/api/config.js"
  30. import {
  31. ref,
  32. watch
  33. } from "vue";
  34. const props = defineProps({
  35. show: {
  36. type: Boolean,
  37. defalut: false,
  38. },
  39. });
  40. const showPopup = ref(false);
  41. const handleClose = ()=>{
  42. showPopup.value = false
  43. }
  44. watch(
  45. () => props.show,
  46. () => {
  47. showPopup.value = true;
  48. }
  49. );
  50. </script>
  51. <style lang="scss" scoped>
  52. .level-popup{
  53. width: 100vw;
  54. .medal-icon{
  55. min-width: 750rpx;
  56. height: 750rpx;
  57. }
  58. .level-cont{
  59. margin-top: -200rpx;
  60. .level-text{
  61. text-align: center;
  62. font-size: 28rpx;
  63. color: #fff;
  64. .text{
  65. font-size: 52rpx;
  66. font-family: 'PangMenZhengDao';
  67. }
  68. }
  69. .award-cont{
  70. text-align: center;
  71. .title{
  72. font-size: 28rpx;
  73. margin: 46rpx 0;
  74. color: #fff;
  75. position: relative;
  76. &::before{
  77. content: '';
  78. position: absolute;
  79. top: 50%;
  80. left: calc(50% - 168rpx);
  81. width: 100rpx;
  82. height: 2rpx;
  83. background-image: linear-gradient(90deg,#000,#fff);
  84. }
  85. &::after{
  86. content: '';
  87. position: absolute;
  88. top: 50%;
  89. right: calc(50% - 168rpx);
  90. width: 100rpx;
  91. height: 2rpx;
  92. background-image: linear-gradient(90deg,#fff,#000);
  93. }
  94. }
  95. .gift{
  96. margin: 20rpx auto;
  97. font-family: 'PangMenZhengDao';
  98. background: rgba(255, 255, 255, 0.26);
  99. border-radius: 10rpx;
  100. color: #fff;
  101. width: 472rpx;
  102. padding: 14rpx 0;
  103. display: flex;
  104. align-items: center;
  105. justify-content: center;
  106. .icon{
  107. width: 108rpx;
  108. height: 74rpx;
  109. margin-right: 20rpx;
  110. }
  111. }
  112. .tips{
  113. font-size: 24rpx;
  114. color: #999999;
  115. text{
  116. color: #EE8F00;
  117. }
  118. }
  119. }
  120. .button-group {
  121. margin: 64rpx auto;
  122. width: 312rpx;
  123. .btn {
  124. font-size: 44rpx;
  125. padding: 20rpx 0;
  126. border-radius: 50rpx;
  127. font-family: "PangMenZhengDao";
  128. color: #954600;
  129. background: linear-gradient(120deg, #FFE6B2, #FFC339);
  130. text-align: center;
  131. }
  132. .close{
  133. margin-top: 64rpx;
  134. justify-content: center;
  135. }
  136. }
  137. }
  138. }
  139. </style>