levelSuccessPopup.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 class="text">个人中心-优惠券</text>
  18. </view>
  19. </view>
  20. <view class="button-group">
  21. <view class="btn">开心收下</view>
  22. <view class="close">
  23. <up-icon name="close-circle-fill" size="30" color="rgba(255, 255, 255, 0.7)"></up-icon>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </up-popup>
  29. </template>
  30. <script setup>
  31. import config from "@/api/config.js"
  32. import {
  33. ref,
  34. watch
  35. } from "vue";
  36. const props = defineProps({
  37. show: {
  38. type: Boolean,
  39. defalut: false,
  40. },
  41. });
  42. const showPopup = ref(false);
  43. const handleClose = ()=>{
  44. showPopup.value = false
  45. emit("closeLevel")
  46. }
  47. const emit = defineEmits(["closeLevel"])
  48. watch(
  49. () => props.show,
  50. () => {
  51. showPopup.value = true;
  52. }
  53. );
  54. </script>
  55. <style lang="scss" scoped>
  56. .level-popup{
  57. width: 100vw;
  58. .medal-icon{
  59. min-width: 750rpx;
  60. height: 750rpx;
  61. }
  62. .level-cont{
  63. margin-top: -200rpx;
  64. .level-text{
  65. text-align: center;
  66. font-size: 28rpx;
  67. color: #fff;
  68. .text{
  69. font-size: 52rpx;
  70. font-family: 'PangMenZhengDao';
  71. }
  72. }
  73. .award-cont{
  74. text-align: center;
  75. .title{
  76. font-size: 28rpx;
  77. margin: 46rpx 0;
  78. color: #fff;
  79. position: relative;
  80. &::before{
  81. content: '';
  82. position: absolute;
  83. top: 50%;
  84. left: calc(50% - 168rpx);
  85. width: 100rpx;
  86. height: 2rpx;
  87. background-image: linear-gradient(90deg,#000,#fff);
  88. }
  89. &::after{
  90. content: '';
  91. position: absolute;
  92. top: 50%;
  93. right: calc(50% - 168rpx);
  94. width: 100rpx;
  95. height: 2rpx;
  96. background-image: linear-gradient(90deg,#fff,#000);
  97. }
  98. }
  99. .gift{
  100. margin: 20rpx auto;
  101. font-family: 'PangMenZhengDao';
  102. background: rgba(255, 255, 255, 0.26);
  103. border-radius: 10rpx;
  104. color: #fff;
  105. width: 472rpx;
  106. padding: 14rpx 0;
  107. display: flex;
  108. align-items: center;
  109. justify-content: center;
  110. .icon{
  111. width: 108rpx;
  112. height: 74rpx;
  113. margin-right: 20rpx;
  114. }
  115. }
  116. .tips{
  117. font-size: 24rpx;
  118. color: #999999;
  119. .text{
  120. color: #EE8F00;
  121. }
  122. }
  123. }
  124. .button-group {
  125. margin: 64rpx auto;
  126. width: 312rpx;
  127. .btn {
  128. font-size: 44rpx;
  129. padding: 20rpx 0;
  130. border-radius: 50rpx;
  131. font-family: "PangMenZhengDao";
  132. color: #954600;
  133. background: linear-gradient(120deg, #FFE6B2, #FFC339);
  134. text-align: center;
  135. }
  136. .close {
  137. margin-top: 64rpx;
  138. display: flex;
  139. justify-content: center;
  140. }
  141. }
  142. }
  143. }
  144. </style>