InviteEarnMoney.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. <template>
  2. <view class="invite-container">
  3. <!-- 顶部背景 -->
  4. <view class="top-bg"></view>
  5. <!-- 自定义导航栏 -->
  6. <view class="nav-bar">
  7. <view class="back-icon" @click="goBack">
  8. <u-icon name="arrow-left" color="#fff" size="20"></u-icon>
  9. </view>
  10. <text class="nav-title">邀约赚钱</text>
  11. <view class="nav-right"></view>
  12. </view>
  13. <!-- 主体内容 -->
  14. <view class="content">
  15. <!-- 邀请卡片 -->
  16. <view class="invite-card-wrap">
  17. <!-- 整个图片作为背景 -->
  18. <image class="card-bg-img" src="@/static/image/points/bg_card_invite.png" mode="widthFix"></image>
  19. <!-- 覆盖在图片上的内容 -->
  20. <view class="card-content">
  21. <!-- 顶部标题文字 -->
  22. <view class="card-top-title">
  23. 每邀请1位好友,赚<text class="highlight-num">12</text>元
  24. </view>
  25. <view class="stats-row">
  26. <view class="stat-item">
  27. <view class="stat-val"><text class="num">2</text>人</view>
  28. <view class="stat-label">已邀请</view>
  29. </view>
  30. <view class="stat-item">
  31. <view class="stat-val"><text class="num">24</text>元</view>
  32. <view class="stat-label">已赚金额</view>
  33. </view>
  34. </view>
  35. <view class="btn-wrap">
  36. <button class="invite-btn" @click="showSharePopup = true">立即邀请</button>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- 详细规则区域 -->
  41. <view class="rules-section">
  42. <view class="rules-title-wrap">
  43. <image class="title-icon" src="@/static/image/points/title_left.png" mode="aspectFit"></image>
  44. <text class="rules-title">详细规则</text>
  45. <image class="title-icon" src="@/static/image/points/title_right.png" mode="aspectFit"></image>
  46. </view>
  47. <view class="rewards-row">
  48. <view class="reward-box">
  49. <view class="reward-val">+12<text class="unit">元</text></view>
  50. <view class="reward-desc">每邀请一个好友</view>
  51. </view>
  52. <view class="reward-box">
  53. <view class="reward-val">+3<text class="unit">元</text></view>
  54. <view class="reward-desc">好友完成新人任务</view>
  55. </view>
  56. </view>
  57. <view class="rules-list">
  58. <text class="rule-text">这里展示详细规则例如:</text>
  59. <text class="rule-text">1、成功邀请好友成为徒弟,即可获得对应奖励。</text>
  60. <text class="rule-text">2、徒弟完成任务,师傅可额外获得收益分成。</text>
  61. <text class="rule-text">3、邀请次数与奖励上限以页面显示为准。</text>
  62. <text class="rule-text">4、奖励自动发放至账户,可随时查看明细。</text>
  63. <text class="rule-text">5、邀请次数与奖励上限以页面显示为准。</text>
  64. <text class="rule-text">6、奖励自动发放至账户,可随时查看明细。</text>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- 分享弹窗 -->
  69. <u-popup :show="showSharePopup" @close="showSharePopup = false" mode="bottom" :round="20" bgColor="transparent">
  70. <view class="share-popup-wrap">
  71. <!-- 海报卡片区域 -->
  72. <view class="poster-card">
  73. <!-- 自定义背景图 -->
  74. <image class="poster-bg-img" src="@/static/image/points/img_invite_popup.png" mode="widthFix"></image>
  75. <!-- 覆盖在背景图上的内容 -->
  76. <view class="poster-content">
  77. <view class="poster-close" @click="showSharePopup = false">
  78. <u-icon name="close" color="#fff" size="20"></u-icon>
  79. </view>
  80. <!-- 这里可以根据实际背景图情况决定是否还需要保留文字标题 -->
  81. <!-- 如果背景图自带了"邀请好友 一起赚钱"的文字,可以隐藏或删除这部分 -->
  82. <!-- <view class="poster-title-wrap">
  83. <view class="poster-title">邀请好友</view>
  84. <view class="poster-subtitle">一起赚钱</view>
  85. </view> -->
  86. <view class="qr-code-box">
  87. <!-- 占位二维码,实际开发中可以替换为真实的二维码图片 -->
  88. <image class="qr-img" src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=https://example.com" mode="aspectFit"></image>
  89. <view class="qr-tips">扫描二维码,加入我们</view>
  90. </view>
  91. </view>
  92. </view>
  93. <!-- 底部操作栏 -->
  94. <view class="share-actions">
  95. <view class="action-item">
  96. <view class="action-icon-wrap wechat-icon">
  97. <u-icon name="weixin-fill" color="#fff" size="30"></u-icon>
  98. </view>
  99. <text class="action-text">分享微信</text>
  100. </view>
  101. <view class="action-item">
  102. <view class="action-icon-wrap moments-icon">
  103. <u-icon name="moments" color="#fff" size="30"></u-icon>
  104. </view>
  105. <text class="action-text">分享朋友圈</text>
  106. </view>
  107. <view class="action-item">
  108. <view class="action-icon-wrap save-icon">
  109. <u-icon name="photo" color="#fff" size="30"></u-icon>
  110. </view>
  111. <text class="action-text">保存图片</text>
  112. </view>
  113. </view>
  114. </view>
  115. </u-popup>
  116. </view>
  117. </template>
  118. <script>
  119. export default {
  120. data() {
  121. return {
  122. showSharePopup: false
  123. };
  124. },
  125. methods: {
  126. goBack() {
  127. uni.navigateBack();
  128. }
  129. }
  130. };
  131. </script>
  132. <style lang="scss" scoped>
  133. .invite-container {
  134. min-height: 100vh;
  135. background-color: #FFF2EB; /* 底部背景色 */
  136. position: relative;
  137. padding-bottom: 60rpx;
  138. }
  139. .top-bg {
  140. position: absolute;
  141. top: 0;
  142. left: 0;
  143. width: 100%;
  144. height: 600rpx;
  145. background: linear-gradient(180deg, #FF7663 0%, #FFF2EB 100%);
  146. z-index: 0;
  147. }
  148. .nav-bar {
  149. position: relative;
  150. z-index: 10;
  151. display: flex;
  152. justify-content: space-between;
  153. align-items: center;
  154. padding: 80rpx 30rpx 20rpx; /* 适配状态栏 */
  155. }
  156. .back-icon, .nav-right {
  157. width: 60rpx;
  158. display: flex;
  159. align-items: center;
  160. }
  161. .nav-title {
  162. font-size: 36rpx;
  163. color: #fff;
  164. font-weight: bold;
  165. flex: 1;
  166. text-align: center;
  167. }
  168. .content {
  169. position: relative;
  170. z-index: 1;
  171. padding: 20rpx 30rpx;
  172. }
  173. .invite-card-wrap {
  174. margin-top: 20rpx;
  175. position: relative;
  176. display: flex;
  177. justify-content: center;
  178. }
  179. .card-bg-img {
  180. width: 100%;
  181. display: block;
  182. }
  183. .card-content {
  184. position: absolute;
  185. top: 0;
  186. left: 0;
  187. width: 100%;
  188. height: 100%;
  189. display: flex;
  190. flex-direction: column;
  191. justify-content: flex-end; /* 将内容推到底部 */
  192. padding-bottom: 50rpx; /* 调整底部间距以匹配图片位置 */
  193. z-index: 2;
  194. }
  195. .card-top-title {
  196. position: absolute;
  197. top: 40rpx; /* 根据图片实际红色区域高度调整 */
  198. left: 0;
  199. width: 100%;
  200. text-align: center;
  201. color: #fff;
  202. font-size: 36rpx;
  203. font-weight: bold;
  204. display: flex;
  205. justify-content: center;
  206. align-items: baseline;
  207. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
  208. }
  209. .highlight-num {
  210. font-size: 64rpx;
  211. color: #f8ff67; /* 偏黄色的高亮 */
  212. margin: 0 6rpx;
  213. text-shadow: 0 4rpx 0 #FF9C70, 0 6rpx 8rpx rgba(0, 0, 0, 0.2); /* 模拟图片中带有立体感和描边的数字 */
  214. font-style: italic; /* 图片中数字略带倾斜感 */
  215. }
  216. .stats-row {
  217. display: flex;
  218. justify-content: space-around;
  219. margin-bottom: 40rpx;
  220. padding: 0 40rpx;
  221. }
  222. .stat-item {
  223. display: flex;
  224. flex-direction: column;
  225. align-items: center;
  226. }
  227. .stat-val {
  228. color: #333;
  229. font-size: 28rpx;
  230. margin-bottom: 10rpx;
  231. display: flex;
  232. align-items: baseline;
  233. }
  234. .stat-val .num {
  235. font-size: 56rpx;
  236. font-weight: bold;
  237. color: #EB5F28; /* 修改为匹配图片的暗橘色 */
  238. margin-right: 4rpx;
  239. }
  240. .stat-label {
  241. font-size: 26rpx;
  242. color: #666;
  243. }
  244. .btn-wrap {
  245. padding: 0 80rpx;
  246. margin-bottom: 20rpx; /* 距离底部边框的距离 */
  247. }
  248. .invite-btn {
  249. background: transparent; /* 背景透明,因为按钮已经在图片上了 */
  250. color: #fff;
  251. font-size: 34rpx;
  252. font-weight: bold;
  253. height: 96rpx;
  254. line-height: 96rpx;
  255. border-radius: 48rpx;
  256. box-shadow: 0 10rpx 20rpx rgba(255, 90, 31, 0.3);
  257. background: linear-gradient( 90deg, #FF4E27 0%, #FF6363 40%, #FF9131 100%);
  258. border: 4rpx solid #FE9F8D;
  259. }
  260. .invite-btn::after {
  261. border: none;
  262. }
  263. .rules-section {
  264. margin-top: 60rpx;
  265. padding: 0 20rpx;
  266. }
  267. .rules-title-wrap {
  268. display: flex;
  269. justify-content: center;
  270. align-items: center;
  271. margin-bottom: 40rpx;
  272. }
  273. .title-icon {
  274. width: 40rpx;
  275. height: 20rpx;
  276. }
  277. .rules-title {
  278. font-size: 32rpx;
  279. font-weight: bold;
  280. color: #333;
  281. margin: 0 20rpx;
  282. }
  283. .rewards-row {
  284. display: flex;
  285. justify-content: space-between;
  286. margin-bottom: 40rpx;
  287. }
  288. .reward-box {
  289. width: 48%;
  290. background: linear-gradient( 0deg, #FFE4E4 0%, #FFFFFF 100%);
  291. border-radius: 26rpx 26rpx 26rpx 26rpx;
  292. border: 2rpx solid #FFD0D0;
  293. padding: 30rpx 0;
  294. display: flex;
  295. flex-direction: column;
  296. align-items: center;
  297. }
  298. .reward-val {
  299. color: #FF5A1F;
  300. font-size: 40rpx;
  301. font-weight: bold;
  302. margin-bottom: 10rpx;
  303. }
  304. .reward-val .unit {
  305. font-size: 24rpx;
  306. font-weight: normal;
  307. }
  308. .reward-desc {
  309. font-size: 24rpx;
  310. color: #666;
  311. }
  312. .rules-list {
  313. padding: 0 10rpx;
  314. display: flex;
  315. flex-direction: column;
  316. }
  317. .rule-text {
  318. font-size: 26rpx;
  319. color: #666;
  320. line-height: 1.8;
  321. margin-bottom: 10rpx;
  322. }
  323. /* 分享弹窗样式 */
  324. .share-popup-wrap {
  325. display: flex;
  326. flex-direction: column;
  327. align-items: center;
  328. }
  329. .poster-card {
  330. width: 600rpx;
  331. position: relative;
  332. display: flex;
  333. justify-content: center;
  334. margin-bottom: 40rpx;
  335. /* box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.2); 移除阴影或保留,视背景图效果而定 */
  336. }
  337. .poster-bg-img {
  338. width: 100%;
  339. display: block;
  340. }
  341. .poster-content {
  342. position: absolute;
  343. top: 0;
  344. left: 0;
  345. width: 100%;
  346. height: 100%;
  347. display: flex;
  348. flex-direction: column;
  349. justify-content: flex-end; /* 将二维码推到底部区域 */
  350. align-items: center;
  351. padding-bottom: 60rpx; /* 根据实际图片底部留白调整 */
  352. box-sizing: border-box;
  353. }
  354. .poster-close {
  355. position: absolute;
  356. top: 30rpx;
  357. right: 30rpx;
  358. width: 50rpx;
  359. height: 50rpx;
  360. border: 2rpx solid #fff;
  361. border-radius: 50%;
  362. display: flex;
  363. justify-content: center;
  364. align-items: center;
  365. z-index: 10;
  366. }
  367. .qr-code-box {
  368. background-color: #fff;
  369. border-radius: 20rpx;
  370. padding: 40rpx 30rpx;
  371. display: flex;
  372. flex-direction: column;
  373. align-items: center;
  374. width: 480rpx; /* 控制二维码卡片的宽度,使其适应背景图 */
  375. box-sizing: border-box;
  376. box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.05); /* 为白色二维码卡片添加一点阴影 */
  377. }
  378. .qr-img {
  379. width: 320rpx;
  380. height: 320rpx;
  381. margin-bottom: 20rpx;
  382. }
  383. .qr-tips {
  384. font-size: 28rpx;
  385. color: #666;
  386. }
  387. .share-actions {
  388. width: 100%;
  389. background-color: #E8F0FF;
  390. border-radius: 40rpx 40rpx 0 0;
  391. display: flex;
  392. justify-content: space-around;
  393. padding: 60rpx 0 80rpx;
  394. }
  395. .action-item {
  396. display: flex;
  397. flex-direction: column;
  398. align-items: center;
  399. }
  400. .action-icon-wrap {
  401. width: 100rpx;
  402. height: 100rpx;
  403. border-radius: 50rpx;
  404. display: flex;
  405. justify-content: center;
  406. align-items: center;
  407. margin-bottom: 20rpx;
  408. }
  409. .wechat-icon {
  410. background: linear-gradient(180deg, #15D65D 0%, #32E175 100%);
  411. }
  412. .moments-icon {
  413. background: linear-gradient(180deg, #FF9638 0%, #FFBA5A 100%);
  414. }
  415. .save-icon {
  416. background: linear-gradient(180deg, #3E8DFA 0%, #69ADF9 100%);
  417. }
  418. .action-text {
  419. font-size: 26rpx;
  420. color: #666;
  421. }
  422. </style>