upsell-book.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <custom-popup
  3. v-model="showPopup"
  4. mode="center"
  5. border-radius="24"
  6. width="650rpx"
  7. :bg-color="'transparent'"
  8. >
  9. <view class="popup-container">
  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. <button
  49. class="share-button"
  50. @click="shareAction"
  51. open-type="share"
  52. >立即分享</button
  53. >
  54. <button
  55. class="scan-button"
  56. @click="scanAction"
  57. >扫码助力</button
  58. >
  59. </view>
  60. <!-- 关闭按钮 -->
  61. <view class="close-button" @click="closePopup">
  62. <image src="/static/img/activity/close2.png" mode="widthFix"></image>
  63. </view>
  64. </view>
  65. </custom-popup>
  66. </template>
  67. <script>
  68. import customPopup from '../../../components/custom-popup.vue';
  69. export default {
  70. components: {
  71. customPopup,
  72. },
  73. data() {
  74. return {
  75. showPopup: false,
  76. bookInfo: {},
  77. };
  78. },
  79. computed: {
  80. upselledMoney() {
  81. return (this.bookInfo.recyclePrice + this.bookInfo.upsellMoney).toFixed(
  82. 2
  83. );
  84. },
  85. },
  86. methods: {
  87. open(data) {
  88. this.bookInfo = data;
  89. this.showPopup = true;
  90. },
  91. closePopup() {
  92. this.showPopup = false;
  93. },
  94. shareAction() {
  95. this.$emit("share");
  96. },
  97. scanAction() {
  98. this.$emit("scan");
  99. },
  100. },
  101. };
  102. </script>
  103. <style lang="scss" scoped>
  104. .popup-container {
  105. position: relative;
  106. padding: 30rpx;
  107. box-sizing: border-box;
  108. padding-bottom: 50rpx;
  109. background: url("https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/bg2.png")
  110. no-repeat center center;
  111. background-size: 100% 100%;
  112. }
  113. .header {
  114. display: flex;
  115. flex-direction: column;
  116. align-items: center;
  117. padding: 20rpx 0 10rpx;
  118. padding-top: 160rpx;
  119. .title-text {
  120. font-size: 38rpx;
  121. font-weight: bold;
  122. color: #000;
  123. margin-bottom: 10rpx;
  124. }
  125. .subtitle-text {
  126. font-size: 32rpx;
  127. color: #000;
  128. }
  129. .hand-icon {
  130. width: 140rpx;
  131. height: 140rpx;
  132. position: relative;
  133. top: -30rpx;
  134. }
  135. }
  136. .price-section {
  137. background-color: #39c248;
  138. border-radius: 16rpx;
  139. padding: 20rpx 30rpx;
  140. margin: 20rpx 0;
  141. .price-row {
  142. display: flex;
  143. align-items: center;
  144. .price-label {
  145. color: #ffffff;
  146. font-size: 30rpx;
  147. }
  148. .price-value {
  149. color: #ffeb3b;
  150. font-size: 30rpx;
  151. font-weight: bold;
  152. margin-left: 10rpx;
  153. }
  154. .increased {
  155. font-size: 42rpx;
  156. }
  157. .up-icon {
  158. width: 30rpx;
  159. height: 30rpx;
  160. margin-left: 5rpx;
  161. }
  162. }
  163. .small-text {
  164. color: #ffffff;
  165. font-size: 22rpx;
  166. margin-top: 10rpx;
  167. }
  168. }
  169. .share-section {
  170. background-color: #e8f8e8;
  171. border-radius: 16rpx;
  172. padding: 30rpx;
  173. margin: 20rpx 0;
  174. .share-text {
  175. color: #39c248;
  176. font-size: 32rpx;
  177. text-align: center;
  178. margin-bottom: 30rpx;
  179. }
  180. .add-button {
  181. display: flex;
  182. flex-direction: column;
  183. align-items: center;
  184. justify-content: center;
  185. .hand-icon {
  186. width: 100rpx;
  187. height: 100rpx;
  188. }
  189. }
  190. }
  191. .action-buttons {
  192. margin-top: 30rpx;
  193. .share-button {
  194. height: 90rpx;
  195. background: linear-gradient(to bottom, #47d46c, #24ad3c) !important;
  196. margin-bottom: 24rpx;
  197. font-size: 32rpx;
  198. color: #ffffff;
  199. border-radius: 10rpx;
  200. line-height: 90rpx;
  201. }
  202. .scan-button {
  203. height: 90rpx;
  204. font-size: 32rpx;
  205. color: #39c248;
  206. border: 1rpx solid #39c248;
  207. background-color: transparent;
  208. border-radius: 10rpx;
  209. line-height: 90rpx;
  210. }
  211. button+button{
  212. margin-left: 0;
  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>