upsell-book.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <u-popup v-model="showPopup" mode="center" border-radius="24" width="650rpx" bgColor="transparent">
  3. <view class="popup-container">
  4. <image src="/static/img/activity/bg2.png" class="bg-img"></image>
  5. <view
  6. class="content-container"
  7. hover-class="none"
  8. hover-stop-propagation="false"
  9. >
  10. <!-- 顶部黄色手掌图标和标题 -->
  11. <view class="header">
  12. <!-- <image src="/static/img/activity/hand.png" class="hand-icon"></image> -->
  13. <view class="title-text">你真的太幸运了</view>
  14. <view class="title-text">恭喜你获得限时加价权益</view>
  15. </view>
  16. <!-- 绿色价格信息区域 -->
  17. <view class="price-section">
  18. <view class="price-row">
  19. <text class="price-label">此书预估书款</text>
  20. <text class="price-value">¥ {{ bookInfo.recyclePrice }}</text>
  21. </view>
  22. <view class="price-row">
  23. <text class="price-label">助力成功提升至</text>
  24. <text class="price-value increased">¥ {{ upselledMoney }}</text>
  25. <image
  26. class="up-icon"
  27. src="/static/img/activity/up2.png"
  28. mode="widthFix"
  29. ></image>
  30. </view>
  31. <view class="small-text"
  32. >实际金额以最终审核书款为准,活动时间3/25至4/30</view
  33. >
  34. </view>
  35. <!-- 分享助力区域 -->
  36. <view class="share-section">
  37. <view class="share-text">分享一位好友助力</view>
  38. <view class="add-button">
  39. <image
  40. class="hand-icon"
  41. src="/static/img/activity/invite.png"
  42. mode="widthFix"
  43. ></image>
  44. </view>
  45. </view>
  46. <!-- 分享按钮 -->
  47. <view class="action-buttons">
  48. <u-button
  49. type="primary"
  50. class="share-button"
  51. @click="shareAction"
  52. open-type="share"
  53. >立即分享</u-button
  54. >
  55. <u-button
  56. :custom-style="{
  57. marginTop: '20rpx',
  58. color: '#09bb07',
  59. borderColor: '#09bb07',
  60. }"
  61. plain
  62. class="scan-button"
  63. @click="scanAction"
  64. >扫码助力</u-button
  65. >
  66. </view>
  67. </view>
  68. <!-- 关闭按钮 -->
  69. <view class="close-button" @click="closePopup">
  70. <image src="/static/img/activity/close2.png" mode="widthFix"></image>
  71. </view>
  72. </view>
  73. </u-popup>
  74. </template>
  75. <script>
  76. export default {
  77. data() {
  78. return {
  79. showPopup: false,
  80. bookInfo: {},
  81. };
  82. },
  83. computed: {
  84. upselledMoney() {
  85. return (this.bookInfo.recyclePrice + this.bookInfo.upsellMoney).toFixed(2);
  86. },
  87. },
  88. methods: {
  89. open(data) {
  90. this.bookInfo = data;
  91. this.showPopup = true;
  92. },
  93. closePopup() {
  94. this.showPopup = false;
  95. },
  96. shareAction() {
  97. this.$emit("share");
  98. },
  99. scanAction() {
  100. this.$emit("scan");
  101. },
  102. },
  103. };
  104. </script>
  105. <style lang="scss" scoped>
  106. .popup-container {
  107. position: relative;
  108. padding: 30rpx;
  109. box-sizing: border-box;
  110. padding-bottom: 50rpx;
  111. .bg-img {
  112. position: absolute;
  113. top: -0;
  114. left: 0;
  115. width: 100%;
  116. height: 100%;
  117. z-index: 0;
  118. }
  119. .content-container {
  120. position: relative;
  121. z-index: 1;
  122. }
  123. }
  124. .header {
  125. display: flex;
  126. flex-direction: column;
  127. align-items: center;
  128. padding: 20rpx 0 10rpx;
  129. .title-text {
  130. font-size: 38rpx;
  131. font-weight: bold;
  132. color: #000;
  133. margin-bottom: 10rpx;
  134. }
  135. .subtitle-text {
  136. font-size: 32rpx;
  137. color: #000;
  138. }
  139. .hand-icon {
  140. width: 140rpx;
  141. height: 140rpx;
  142. position: relative;
  143. top: -30rpx;
  144. }
  145. }
  146. .price-section {
  147. background-color: #09bb07;
  148. border-radius: 16rpx;
  149. padding: 20rpx 30rpx;
  150. margin: 20rpx 0;
  151. .price-row {
  152. display: flex;
  153. align-items: center;
  154. .price-label {
  155. color: #ffffff;
  156. font-size: 30rpx;
  157. }
  158. .price-value {
  159. color: #ffeb3b;
  160. font-size: 30rpx;
  161. font-weight: bold;
  162. margin-left: 10rpx;
  163. }
  164. .increased {
  165. font-size: 42rpx;
  166. }
  167. .up-icon {
  168. width: 30rpx;
  169. height: 30rpx;
  170. margin-left: 5rpx;
  171. }
  172. }
  173. .small-text {
  174. color: #ffffff;
  175. font-size: 22rpx;
  176. margin-top: 10rpx;
  177. }
  178. }
  179. .share-section {
  180. background-color: #e8f8e8;
  181. border-radius: 16rpx;
  182. padding: 30rpx;
  183. margin: 20rpx 0;
  184. .share-text {
  185. color: #09bb07;
  186. font-size: 32rpx;
  187. text-align: center;
  188. margin-bottom: 30rpx;
  189. }
  190. .add-button {
  191. display: flex;
  192. flex-direction: column;
  193. align-items: center;
  194. justify-content: center;
  195. .hand-icon {
  196. width: 100rpx;
  197. height: 100rpx;
  198. }
  199. }
  200. }
  201. .action-buttons {
  202. margin-top: 30rpx;
  203. .share-button {
  204. height: 90rpx;
  205. background-color: #09bb07 !important;
  206. border-color: #09bb07 !important;
  207. margin-bottom: 40rpx;
  208. font-size: 32rpx;
  209. }
  210. .scan-button {
  211. height: 90rpx;
  212. font-size: 32rpx;
  213. }
  214. }
  215. .close-button {
  216. position: absolute;
  217. bottom: -120rpx;
  218. left: 50%;
  219. transform: translateX(-50%);
  220. image {
  221. width: 70rpx;
  222. height: 70rpx;
  223. }
  224. }
  225. </style>