upsell-book.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <u-popup v-model="showPopup" mode="center" border-radius="24" width="650rpx" :mask-close-able="false">
  3. <view class="popup-container">
  4. <!-- 背景图片 -->
  5. <image class="bg-image" src="/static/img/activity/bg.png" mode="aspectFill"></image>
  6. <!-- 内容区域 -->
  7. <view class="content">
  8. <!-- 顶部黄色手掌图标和标题 -->
  9. <view class="header">
  10. <image class="hand-icon" src="/static/img/activity/invite.png" mode="widthFix"></image>
  11. <view class="title-text">你真的太幸运了</view>
  12. <view class="subtitle-text">恭喜你获得限时加价权益</view>
  13. </view>
  14. <!-- 绿色价格信息区域 -->
  15. <view class="price-section">
  16. <view class="price-row">
  17. <text class="price-label">此书预估书款</text>
  18. <text class="price-value">¥ 5.6</text>
  19. </view>
  20. <view class="price-row">
  21. <text class="price-label">助力成功提升至</text>
  22. <text class="price-value increased">¥ 6.5</text>
  23. <image class="up-icon" src="/static/img/activity/up.png" mode="widthFix"></image>
  24. </view>
  25. <view class="small-text">实际金额以最终审核书款为准,活动时间3/25至4/30</view>
  26. </view>
  27. <!-- 分享助力区域 -->
  28. <view class="share-section">
  29. <view class="share-text">分享一位好友助力</view>
  30. <view class="add-button">
  31. <u-icon name="plus" color="#09BB07" size="46"></u-icon>
  32. <text class="waiting-text">待邀请</text>
  33. </view>
  34. </view>
  35. <!-- 分享按钮 -->
  36. <view class="action-buttons">
  37. <u-button type="primary" class="share-button" @click="shareAction">立即分享</u-button>
  38. <u-button type="info" plain class="scan-button" @click="scanAction">扫码助力</u-button>
  39. </view>
  40. </view>
  41. <!-- 关闭按钮 -->
  42. <view class="close-button" @click="closePopup">
  43. <image src="/static/img/activity/close.png" mode="widthFix"></image>
  44. </view>
  45. </view>
  46. </u-popup>
  47. </template>
  48. <script>
  49. export default {
  50. data() {
  51. return {
  52. showPopup: false
  53. }
  54. },
  55. methods: {
  56. open() {
  57. this.showPopup = true
  58. },
  59. closePopup() {
  60. this.showPopup = false
  61. },
  62. shareAction() {
  63. this.$emit('share')
  64. },
  65. scanAction() {
  66. this.$emit('scan')
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .popup-container {
  73. position: relative;
  74. width: 100%;
  75. box-sizing: border-box;
  76. border-radius: 24rpx;
  77. overflow: hidden;
  78. }
  79. .bg-image {
  80. position: absolute;
  81. top: 0;
  82. left: 0;
  83. width: 100%;
  84. height: 100%;
  85. z-index: 0;
  86. opacity: 0.2; // 降低背景图片透明度,避免遮挡文字
  87. }
  88. .content {
  89. position: relative;
  90. z-index: 1;
  91. padding: 30rpx 20rpx 40rpx;
  92. }
  93. .header {
  94. display: flex;
  95. flex-direction: column;
  96. align-items: center;
  97. padding: 20rpx 0 30rpx;
  98. .hand-icon {
  99. width: 120rpx;
  100. margin-bottom: 20rpx;
  101. }
  102. .title-text {
  103. font-size: 38rpx;
  104. font-weight: bold;
  105. color: #000;
  106. margin-bottom: 10rpx;
  107. }
  108. .subtitle-text {
  109. font-size: 32rpx;
  110. color: #000;
  111. }
  112. }
  113. .price-section {
  114. background-color: rgba(9, 187, 7, 0.9); // 增加透明度,确保背景不会过于刺眼
  115. border-radius: 16rpx;
  116. padding: 30rpx 40rpx;
  117. margin: 20rpx 0;
  118. .price-row {
  119. display: flex;
  120. align-items: center;
  121. margin-bottom: 15rpx;
  122. .price-label {
  123. color: #FFFFFF;
  124. font-size: 30rpx;
  125. }
  126. .price-value {
  127. color: #FFEB3B;
  128. font-size: 30rpx;
  129. font-weight: bold;
  130. margin-left: auto;
  131. }
  132. .increased {
  133. font-size: 42rpx;
  134. }
  135. .up-icon {
  136. width: 30rpx;
  137. height: 30rpx;
  138. margin-left: 5rpx;
  139. }
  140. }
  141. .small-text {
  142. color: #FFFFFF;
  143. font-size: 22rpx;
  144. margin-top: 10rpx;
  145. }
  146. }
  147. .share-section {
  148. background-color: rgba(232, 248, 232, 0.9); // 增加透明度
  149. border-radius: 16rpx;
  150. padding: 30rpx;
  151. margin: 20rpx 0;
  152. .share-text {
  153. color: #09BB07;
  154. font-size: 32rpx;
  155. text-align: center;
  156. margin-bottom: 30rpx;
  157. font-weight: 500; // 加粗文字,提高可读性
  158. }
  159. .add-button {
  160. display: flex;
  161. flex-direction: column;
  162. align-items: center;
  163. justify-content: center;
  164. .waiting-text {
  165. color: #09BB07;
  166. font-size: 26rpx;
  167. margin-top: 10rpx;
  168. }
  169. }
  170. }
  171. .action-buttons {
  172. margin-top: 30rpx;
  173. .share-button {
  174. height: 90rpx;
  175. background-color: #09BB07 !important;
  176. border-color: #09BB07 !important;
  177. margin-bottom: 20rpx;
  178. font-size: 32rpx;
  179. }
  180. .scan-button {
  181. height: 90rpx;
  182. color: #09BB07 !important;
  183. border-color: #09BB07 !important;
  184. font-size: 32rpx;
  185. }
  186. }
  187. .close-button {
  188. position: absolute;
  189. bottom: -120rpx;
  190. left: 50%;
  191. transform: translateX(-50%);
  192. z-index: 2;
  193. image {
  194. width: 70rpx;
  195. height: 70rpx;
  196. }
  197. }
  198. </style>