index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
  1. <template>
  2. <view class="page">
  3. <!-- 顶部背景装饰 -->
  4. <view class="bg-decoration">
  5. <view class="bg-circle bg-circle-1"></view>
  6. <view class="bg-circle bg-circle-2"></view>
  7. <view class="bg-circle bg-circle-3"></view>
  8. </view>
  9. <!-- 顶部标题 -->
  10. <view class="header">
  11. <view class="header-icon">
  12. <image class="icon-gift" src="/static/images/gift.png" mode="aspectFit"></image>
  13. </view>
  14. <text class="title">邀请好友</text>
  15. <text class="subtitle">邀请好友加入,共享收益好礼</text>
  16. <view class="title-decoration"></view>
  17. </view>
  18. <!-- 邀请方式切换 -->
  19. <view class="tabs-container">
  20. <view class="tabs">
  21. <view class="tab" :class="{'active': activeMethod === 'wechat'}" @click="selectMethod('wechat')">
  22. <uni-icons class="tab-icon" type="weixin" size="20"></uni-icons>
  23. <text class="tab-text">微信分享</text>
  24. </view>
  25. <view class="tab" :class="{'active': activeMethod === 'account'}" @click="selectMethod('account')">
  26. <uni-icons class="tab-icon" type="person" size="20"></uni-icons>
  27. <text class="tab-text">用户名邀请</text>
  28. </view>
  29. <view class="tab-slider" :class="{'slide-right': activeMethod === 'account'}"></view>
  30. </view>
  31. </view>
  32. <!-- 账号邀请 -->
  33. <view class="content animate-fade-in" v-if="activeMethod === 'account'">
  34. <view class="search-card">
  35. <view class="search-header">
  36. <view class="search-title">
  37. <uni-icons type="search" size="18"></uni-icons>
  38. <text class="search-title-text">搜索好友</text>
  39. </view>
  40. </view>
  41. <view class="search-box">
  42. <view class="search-input-wrapper">
  43. <text class="search-prefix-icon">@</text>
  44. <input class="search-input" v-model="accountInput" placeholder="请输入好友用户名"
  45. @input="onAccountInput" />
  46. </view>
  47. <button class="search-btn" @click="searchUser" :disabled="!accountInput.trim()">
  48. <text class="btn-text">搜索</text>
  49. </button>
  50. </view>
  51. </view>
  52. <view class="user-result-card animate-slide-up" v-if="searchedUser">
  53. <view class="user-result">
  54. <view class="avatar-wrapper">
  55. <image class="avatar" :src="searchedUser.avatar || '/static/images/avatar.png'"
  56. mode="aspectFill"></image>
  57. <view class="avatar-border"></view>
  58. </view>
  59. <view class="info">
  60. <text class="name">{{ searchedUser.account }}</text>
  61. </view>
  62. <button class="invite-btn" @click="sendInviteByAccount">
  63. <uni-icons class="invite-icon" type="email" size="14" color="#fff"></uni-icons>
  64. <text class="invite-text">邀请</text>
  65. </button>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 微信分享 -->
  70. <view class="content animate-fade-in" v-if="activeMethod === 'wechat'">
  71. <view class="share-card">
  72. <view class="share-bg">
  73. <view class="share-bg-circle"></view>
  74. </view>
  75. <view class="share-content">
  76. <view class="share-icon-wrapper">
  77. <view class="share-icon">🚀</view>
  78. <view class="share-icon-bg"></view>
  79. </view>
  80. <text class="share-title">分享给好友</text>
  81. <text class="share-desc">通过微信分享邀请链接,让更多朋友加入</text>
  82. <button class="share-btn" open-type="share">
  83. <uni-icons class="share-btn-icon" type="redo" size="18" color="#fff"></uni-icons>
  84. <text class="share-btn-text">立即分享</text>
  85. </button>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 邀请记录 -->
  90. <view class="records-card">
  91. <view class="records-header">
  92. <view class="records-title-wrapper">
  93. <uni-icons class="records-icon" type="list" size="18"></uni-icons>
  94. <text class="records-title">邀请记录</text>
  95. </view>
  96. <view class="records-count-wrapper">
  97. <text class="records-count">{{ inviteRecords.length }}</text>
  98. <text class="records-unit">人</text>
  99. </view>
  100. </view>
  101. <view class="records-list" v-if="inviteRecords.length > 0">
  102. <view class="record-item animate-slide-in" v-for="(record, index) in inviteRecords" :key="index"
  103. :style="{ 'animation-delay': (index * 0.1) + 's' }">
  104. <view class="record-avatar-wrapper">
  105. <image class="record-avatar" :src="record.avatar || '/static/images/avatar.png'"
  106. mode="aspectFill"></image>
  107. <view class="record-avatar-border"></view>
  108. </view>
  109. <view class="record-info">
  110. <text class="record-name">{{ record.account }}</text>
  111. <view class="record-meta">
  112. <text class="record-time">{{ formatTime(record.createTime) }}</text>
  113. <text class="record-type"
  114. v-if="record.invitationType">{{ getInvitationTypeText(record.invitationType) }}</text>
  115. </view>
  116. </view>
  117. <view class="record-status-wrapper">
  118. <view class="status-dot" :class="getStatusClass(record.status)"></view>
  119. <text class="record-status">{{ record.status }}</text>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="empty1" v-else>
  124. <view class="flex-items-plus">
  125. <image src="@/static/images/empty.png" class="empty "></image>
  126. </view>
  127. <view class="empty-text">暂无邀请记录</view>
  128. <view class="empty-desc">快去邀请好友加入吧</view>
  129. </view>
  130. </view>
  131. </view>
  132. </template>
  133. <script>
  134. import {
  135. findByAccount,
  136. sendInvitation,
  137. getMyInvitations
  138. } from '@/config/api.js'
  139. import {
  140. shareImg
  141. } from '@/common/config.js'
  142. export default {
  143. data() {
  144. return {
  145. activeMethod: 'wechat', // 当前选择的邀请方式,默认为微信分享
  146. accountInput: '', // 账号输入
  147. searchedUser: null, // 搜索到的用户
  148. inviteRecords: [], // 邀请记录
  149. userInfo: {} // 当前用户信息
  150. }
  151. },
  152. onLoad() {
  153. this.getUserInfo()
  154. this.getInviteRecords()
  155. },
  156. // 微信小程序分享配置
  157. onShareAppMessage() {
  158. const userInfo = uni.getStorageSync('user') || {}
  159. console.log(userInfo, "分享用户信息")
  160. return {
  161. title: `${userInfo.account || '好友'}邀请您加入`,
  162. path: `/pages/index/indexNew?inviter=${userInfo.id ||userInfo.user_id|| ''}`,
  163. imageUrl: shareImg // 分享图片,需要添加
  164. }
  165. },
  166. methods: {
  167. // 获取用户信息
  168. getUserInfo() {
  169. this.userInfo = uni.getStorageSync('user') || {}
  170. },
  171. // 选择邀请方式
  172. selectMethod(method) {
  173. this.activeMethod = method
  174. if (method === 'account') {
  175. this.searchedUser = null
  176. this.accountInput = ''
  177. }
  178. },
  179. // 账号输入处理
  180. onAccountInput(e) {
  181. this.accountInput = e.detail.value
  182. if (!this.accountInput.trim()) {
  183. this.searchedUser = null
  184. }
  185. },
  186. // 搜索用户
  187. async searchUser() {
  188. if (!this.accountInput.trim()) {
  189. uni.showToast({
  190. title: '请输入用户名',
  191. icon: 'none'
  192. })
  193. return
  194. }
  195. try {
  196. uni.showLoading({
  197. title: '搜索中...'
  198. })
  199. const res = await findByAccount(this.accountInput.trim())
  200. if (res.code === 200) {
  201. this.searchedUser = res.data
  202. } else {
  203. this.searchedUser = null
  204. uni.showToast({
  205. title: res.msg || '用户不存在',
  206. icon: 'none'
  207. })
  208. }
  209. } catch (error) {
  210. console.error('搜索用户失败:', error)
  211. uni.showToast({
  212. title: error.msg,
  213. icon: 'none'
  214. })
  215. } finally {
  216. uni.hideLoading()
  217. }
  218. },
  219. // 通过账号发送邀请
  220. async sendInviteByAccount() {
  221. if (!this.searchedUser) {
  222. return
  223. }
  224. try {
  225. uni.showLoading({
  226. title: '发送邀请中...'
  227. })
  228. const res = await sendInvitation(this.searchedUser.id)
  229. if (res.code === 200) {
  230. uni.showToast({
  231. title: '邀请发送成功',
  232. icon: 'success'
  233. })
  234. // 重新获取邀请记录
  235. this.getInviteRecords()
  236. // 清空搜索结果
  237. this.searchedUser = null
  238. this.accountInput = ''
  239. } else {
  240. uni.showToast({
  241. title: res.msg || '邀请发送失败',
  242. icon: 'none'
  243. })
  244. }
  245. } catch (error) {
  246. console.error('发送邀请失败:', error)
  247. uni.showToast({
  248. title: error.msg,
  249. icon: 'none'
  250. })
  251. } finally {
  252. uni.hideLoading()
  253. }
  254. },
  255. // 获取邀请记录
  256. async getInviteRecords() {
  257. try {
  258. const res = await getMyInvitations()
  259. if (res.code === 200) {
  260. this.inviteRecords = res.data || []
  261. }
  262. } catch (error) {
  263. console.error('获取邀请记录失败:', error)
  264. }
  265. },
  266. // 格式化时间
  267. formatTime(time) {
  268. if (!time) return ''
  269. const date = new Date(time)
  270. const now = new Date()
  271. const diff = now.getTime() - date.getTime()
  272. const days = Math.floor(diff / (1000 * 60 * 60 * 24))
  273. if (days === 0) {
  274. return '今天'
  275. } else if (days === 1) {
  276. return '昨天'
  277. } else if (days < 7) {
  278. return `${days}天前`
  279. } else {
  280. return date.toLocaleDateString()
  281. }
  282. },
  283. // 获取邀请类型文字
  284. getInvitationTypeText(type) {
  285. switch (type) {
  286. case 1:
  287. return '用户名邀请'
  288. case 2:
  289. return '微信分享'
  290. default:
  291. return '未知类型'
  292. }
  293. },
  294. // 获取状态样式类
  295. getStatusClass(status) {
  296. switch (status) {
  297. case '已接受':
  298. return 'status-accepted'
  299. case '已拒绝':
  300. return 'status-rejected'
  301. case '待处理':
  302. default:
  303. return 'status-pending'
  304. }
  305. }
  306. }
  307. }
  308. </script>
  309. <style lang="scss" scoped>
  310. /* 页面主体 */
  311. .page {
  312. min-height: 100vh;
  313. background: linear-gradient(135deg, #e8f2ff 0%, #f0f4ff 100%);
  314. position: relative;
  315. overflow: hidden;
  316. }
  317. /* 背景装饰 */
  318. .bg-decoration {
  319. position: absolute;
  320. top: 0;
  321. left: 0;
  322. width: 100%;
  323. height: 100%;
  324. pointer-events: none;
  325. z-index: 0;
  326. }
  327. .bg-circle {
  328. position: absolute;
  329. border-radius: 50%;
  330. background: rgba(255, 255, 255, 0.6);
  331. animation: float 6s ease-in-out infinite;
  332. }
  333. .bg-circle-1 {
  334. width: 200rpx;
  335. height: 200rpx;
  336. top: 10%;
  337. right: -100rpx;
  338. animation-delay: 0s;
  339. }
  340. .bg-circle-2 {
  341. width: 150rpx;
  342. height: 150rpx;
  343. top: 30%;
  344. left: -75rpx;
  345. animation-delay: 2s;
  346. }
  347. .bg-circle-3 {
  348. width: 100rpx;
  349. height: 100rpx;
  350. top: 60%;
  351. right: 20rpx;
  352. animation-delay: 4s;
  353. }
  354. @keyframes float {
  355. 0%,
  356. 100% {
  357. transform: translateY(0px);
  358. }
  359. 50% {
  360. transform: translateY(-20rpx);
  361. }
  362. }
  363. /* 头部区域 */
  364. .header {
  365. text-align: center;
  366. padding: 80rpx 24rpx 60rpx;
  367. position: relative;
  368. z-index: 1;
  369. }
  370. .header-icon {
  371. margin-bottom: 20rpx;
  372. }
  373. .icon-gift {
  374. width: 80rpx;
  375. height: 80rpx;
  376. display: block;
  377. margin: 0 auto;
  378. animation: bounce 2s infinite;
  379. }
  380. @keyframes bounce {
  381. 0%,
  382. 20%,
  383. 50%,
  384. 80%,
  385. 100% {
  386. transform: translateY(0);
  387. }
  388. 40% {
  389. transform: translateY(-10rpx);
  390. }
  391. 60% {
  392. transform: translateY(-5rpx);
  393. }
  394. }
  395. .title {
  396. display: block;
  397. font-size: 48rpx;
  398. font-weight: 700;
  399. color: #4a5568;
  400. margin-bottom: 20rpx;
  401. text-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  402. }
  403. .subtitle {
  404. font-size: 28rpx;
  405. color: #718096;
  406. margin-bottom: 30rpx;
  407. }
  408. .title-decoration {
  409. width: 100rpx;
  410. height: 4rpx;
  411. background: linear-gradient(90deg, #a0aec0, transparent);
  412. margin: 0 auto;
  413. border-radius: 2rpx;
  414. }
  415. /* 标签容器 */
  416. .tabs-container {
  417. padding: 0 24rpx;
  418. margin-bottom: 40rpx;
  419. position: relative;
  420. z-index: 1;
  421. }
  422. .tabs {
  423. display: flex;
  424. background: rgba(255, 255, 255, 0.95);
  425. border-radius: 50rpx;
  426. padding: 8rpx;
  427. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
  428. backdrop-filter: blur(10rpx);
  429. position: relative;
  430. }
  431. .tab {
  432. flex: 1;
  433. text-align: center;
  434. padding: 20rpx 0;
  435. border-radius: 42rpx;
  436. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  437. position: relative;
  438. z-index: 2;
  439. cursor: pointer;
  440. }
  441. .tab-icon {
  442. display: block;
  443. margin-bottom: 6rpx;
  444. }
  445. .tab-text {
  446. font-size: 26rpx;
  447. color: #666;
  448. font-weight: 500;
  449. }
  450. .tab.active .tab-text {
  451. color: #fff;
  452. font-weight: 600;
  453. }
  454. .tab.active .tab-icon {
  455. color: #fff;
  456. }
  457. .tab-slider {
  458. position: absolute;
  459. top: 8rpx;
  460. left: 8rpx;
  461. width: calc(50% - 8rpx);
  462. height: calc(100% - 16rpx);
  463. background: linear-gradient(135deg, #90cdf4, #a2b5f0);
  464. border-radius: 42rpx;
  465. transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  466. z-index: 1;
  467. box-shadow: 0 4rpx 16rpx rgba(144, 205, 244, 0.3);
  468. }
  469. .tab-slider.slide-right {
  470. transform: translateX(100%);
  471. }
  472. /* 内容区域 */
  473. .content {
  474. padding: 0 24rpx;
  475. margin-bottom: 40rpx;
  476. position: relative;
  477. z-index: 1;
  478. }
  479. /* 动画效果 */
  480. .animate-fade-in {
  481. animation: fadeIn 0.5s ease-out;
  482. }
  483. .animate-slide-up {
  484. animation: slideUp 0.5s ease-out;
  485. }
  486. .animate-slide-in {
  487. animation: slideIn 0.5s ease-out both;
  488. }
  489. @keyframes fadeIn {
  490. from {
  491. opacity: 0;
  492. transform: translateY(20rpx);
  493. }
  494. to {
  495. opacity: 1;
  496. transform: translateY(0);
  497. }
  498. }
  499. @keyframes slideUp {
  500. from {
  501. opacity: 0;
  502. transform: translateY(40rpx);
  503. }
  504. to {
  505. opacity: 1;
  506. transform: translateY(0);
  507. }
  508. }
  509. @keyframes slideIn {
  510. from {
  511. opacity: 0;
  512. transform: translateX(-30rpx);
  513. }
  514. to {
  515. opacity: 1;
  516. transform: translateX(0);
  517. }
  518. }
  519. /* 搜索卡片 */
  520. .search-card {
  521. background: rgba(255, 255, 255, 0.95);
  522. border-radius: 24rpx;
  523. padding: 32rpx;
  524. margin-bottom: 24rpx;
  525. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
  526. backdrop-filter: blur(10rpx);
  527. }
  528. .search-header {
  529. margin-bottom: 24rpx;
  530. }
  531. .search-title {
  532. display: flex;
  533. align-items: center;
  534. gap: 8rpx;
  535. }
  536. .search-title-text {
  537. font-size: 32rpx;
  538. font-weight: 600;
  539. color: #333;
  540. }
  541. .search-box {
  542. display: flex;
  543. gap: 16rpx;
  544. align-items: center;
  545. }
  546. .search-input-wrapper {
  547. flex: 1;
  548. display: flex;
  549. align-items: center;
  550. background: #f8f9fa;
  551. border-radius: 16rpx;
  552. padding: 0 20rpx;
  553. height: 80rpx;
  554. border: 2rpx solid transparent;
  555. transition: all 0.3s ease;
  556. }
  557. .search-input-wrapper:focus-within {
  558. border-color: #90cdf4;
  559. box-shadow: 0 0 0 4rpx rgba(144, 205, 244, 0.1);
  560. }
  561. .search-prefix-icon {
  562. font-size: 32rpx;
  563. color: #999;
  564. margin-right: 12rpx;
  565. font-weight: 600;
  566. }
  567. .search-input {
  568. flex: 1;
  569. height: 100%;
  570. border: none;
  571. background: transparent;
  572. font-size: 28rpx;
  573. color: #333;
  574. }
  575. .search-btn {
  576. height: 80rpx;
  577. padding: 0 32rpx;
  578. background: linear-gradient(135deg, #90cdf4, #a2b5f0);
  579. color: #fff;
  580. border: none;
  581. border-radius: 16rpx;
  582. font-size: 28rpx;
  583. font-weight: 600;
  584. box-shadow: 0 4rpx 16rpx rgba(144, 205, 244, 0.2);
  585. transition: all 0.3s ease;
  586. }
  587. .search-btn:active {
  588. transform: translateY(2rpx);
  589. box-shadow: 0 2rpx 8rpx rgba(144, 205, 244, 0.2);
  590. }
  591. .search-btn[disabled] {
  592. background: #ccc;
  593. box-shadow: none;
  594. }
  595. /* 用户结果卡片 */
  596. .user-result-card {
  597. background: rgba(255, 255, 255, 0.95);
  598. border-radius: 24rpx;
  599. padding: 32rpx;
  600. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
  601. backdrop-filter: blur(10rpx);
  602. }
  603. .user-result {
  604. display: flex;
  605. align-items: center;
  606. }
  607. .avatar-wrapper {
  608. position: relative;
  609. margin-right: 24rpx;
  610. }
  611. .avatar {
  612. width: 80rpx;
  613. height: 80rpx;
  614. border-radius: 50%;
  615. }
  616. .avatar-border {
  617. position: absolute;
  618. top: -4rpx;
  619. left: -4rpx;
  620. width: 88rpx;
  621. height: 88rpx;
  622. border-radius: 50%;
  623. border: 2rpx solid #90cdf4;
  624. opacity: 0.4;
  625. }
  626. .info {
  627. flex: 1;
  628. display: flex;
  629. flex-direction: column;
  630. gap: 8rpx;
  631. }
  632. .name {
  633. font-size: 32rpx;
  634. font-weight: 600;
  635. color: #333;
  636. }
  637. .account {
  638. font-size: 26rpx;
  639. color: #999;
  640. }
  641. .invite-btn {
  642. display: flex;
  643. align-items: center;
  644. gap: 8rpx;
  645. height: 64rpx;
  646. padding: 0 24rpx;
  647. background: linear-gradient(135deg, #81c995, #a2d2a4);
  648. color: #fff;
  649. border: none;
  650. border-radius: 32rpx;
  651. font-size: 26rpx;
  652. font-weight: 600;
  653. box-shadow: 0 4rpx 16rpx rgba(129, 201, 149, 0.2);
  654. transition: all 0.3s ease;
  655. }
  656. .invite-btn:active {
  657. transform: translateY(2rpx);
  658. }
  659. .invite-icon {
  660. margin-right: 4rpx;
  661. }
  662. /* 分享卡片 */
  663. .share-card {
  664. background: rgba(255, 255, 255, 0.95);
  665. border-radius: 24rpx;
  666. overflow: hidden;
  667. position: relative;
  668. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
  669. backdrop-filter: blur(10rpx);
  670. }
  671. .share-bg {
  672. position: absolute;
  673. top: 0;
  674. left: 0;
  675. width: 100%;
  676. height: 100%;
  677. overflow: hidden;
  678. }
  679. .share-bg-circle {
  680. position: absolute;
  681. width: 200rpx;
  682. height: 200rpx;
  683. background: linear-gradient(135deg, rgba(144, 205, 244, 0.1), rgba(162, 181, 240, 0.1));
  684. border-radius: 50%;
  685. top: -50rpx;
  686. right: -50rpx;
  687. }
  688. .share-content {
  689. padding: 60rpx 32rpx;
  690. text-align: center;
  691. position: relative;
  692. z-index: 1;
  693. }
  694. .share-icon-wrapper {
  695. position: relative;
  696. display: inline-block;
  697. margin-bottom: 32rpx;
  698. }
  699. .share-icon {
  700. font-size: 80rpx;
  701. position: relative;
  702. z-index: 2;
  703. }
  704. .share-icon-bg {
  705. position: absolute;
  706. top: 50%;
  707. left: 50%;
  708. transform: translate(-50%, -50%);
  709. width: 120rpx;
  710. height: 120rpx;
  711. background: linear-gradient(135deg, rgba(144, 205, 244, 0.15), rgba(162, 181, 240, 0.15));
  712. border-radius: 50%;
  713. z-index: 1;
  714. }
  715. .share-title {
  716. display: block;
  717. font-size: 36rpx;
  718. font-weight: 600;
  719. color: #333;
  720. margin-bottom: 16rpx;
  721. }
  722. .share-desc {
  723. display: block;
  724. font-size: 28rpx;
  725. color: #666;
  726. margin-bottom: 48rpx;
  727. line-height: 1.5;
  728. }
  729. .share-btn {
  730. display: flex;
  731. align-items: center;
  732. justify-content: center;
  733. gap: 12rpx;
  734. width: 320rpx;
  735. height: 80rpx;
  736. background: linear-gradient(135deg, #90cdf4, #a2b5f0);
  737. color: #fff;
  738. border: none;
  739. border-radius: 40rpx;
  740. font-size: 30rpx;
  741. font-weight: 600;
  742. margin: 0 auto;
  743. box-shadow: 0 6rpx 24rpx rgba(144, 205, 244, 0.25);
  744. transition: all 0.3s ease;
  745. }
  746. .share-btn:active {
  747. transform: translateY(2rpx);
  748. }
  749. .share-btn-icon {
  750. margin-right: 8rpx;
  751. }
  752. /* 邀请记录卡片 */
  753. .records-card {
  754. background: rgba(255, 255, 255, 0.95);
  755. border-radius: 24rpx;
  756. padding: 32rpx;
  757. margin: 0 24rpx 40rpx;
  758. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
  759. backdrop-filter: blur(10rpx);
  760. position: relative;
  761. z-index: 1;
  762. }
  763. .records-header {
  764. display: flex;
  765. justify-content: space-between;
  766. align-items: center;
  767. padding-bottom: 24rpx;
  768. margin-bottom: 24rpx;
  769. border-bottom: 2rpx solid #f0f0f0;
  770. }
  771. .records-title-wrapper {
  772. display: flex;
  773. align-items: center;
  774. gap: 12rpx;
  775. }
  776. .records-icon {
  777. margin-right: 8rpx;
  778. }
  779. .records-title {
  780. font-size: 32rpx;
  781. font-weight: 600;
  782. color: #333;
  783. }
  784. .records-count-wrapper {
  785. display: flex;
  786. align-items: center;
  787. gap: 4rpx;
  788. }
  789. .records-count {
  790. font-size: 32rpx;
  791. font-weight: 700;
  792. color: #90cdf4;
  793. }
  794. .records-unit {
  795. font-size: 24rpx;
  796. color: #999;
  797. }
  798. .records-list {
  799. display: flex;
  800. flex-direction: column;
  801. gap: 20rpx;
  802. }
  803. .record-item {
  804. display: flex;
  805. align-items: center;
  806. padding: 24rpx;
  807. background: #f8f9fa;
  808. border-radius: 16rpx;
  809. transition: all 0.3s ease;
  810. }
  811. .record-item:hover {
  812. background: #f0f1f5;
  813. transform: translateX(8rpx);
  814. }
  815. .record-avatar-wrapper {
  816. position: relative;
  817. margin-right: 20rpx;
  818. }
  819. .record-avatar {
  820. width: 60rpx;
  821. height: 60rpx;
  822. border-radius: 50%;
  823. }
  824. .record-avatar-border {
  825. position: absolute;
  826. top: -2rpx;
  827. left: -2rpx;
  828. width: 64rpx;
  829. height: 64rpx;
  830. border-radius: 50%;
  831. border: 2rpx solid #90cdf4;
  832. opacity: 0.3;
  833. }
  834. .record-info {
  835. flex: 1;
  836. display: flex;
  837. flex-direction: column;
  838. gap: 6rpx;
  839. }
  840. .record-name {
  841. font-size: 28rpx;
  842. color: #333;
  843. font-weight: 600;
  844. }
  845. .record-meta {
  846. display: flex;
  847. flex-direction: column;
  848. gap: 4rpx;
  849. }
  850. .record-time {
  851. font-size: 24rpx;
  852. color: #999;
  853. }
  854. .record-type {
  855. font-size: 22rpx;
  856. color: #666;
  857. background: rgba(144, 205, 244, 0.1);
  858. padding: 2rpx 8rpx;
  859. border-radius: 8rpx;
  860. align-self: flex-start;
  861. }
  862. .record-status-wrapper {
  863. display: flex;
  864. align-items: center;
  865. gap: 8rpx;
  866. }
  867. .status-dot {
  868. width: 12rpx;
  869. height: 12rpx;
  870. border-radius: 50%;
  871. transition: all 0.3s ease;
  872. }
  873. .status-dot.status-pending {
  874. background: #ffb366;
  875. }
  876. .status-dot.status-accepted {
  877. background: #81c995;
  878. }
  879. .status-dot.status-rejected {
  880. background: #ff6b6b;
  881. }
  882. .record-status {
  883. font-size: 24rpx;
  884. color: #81c995;
  885. font-weight: 600;
  886. }
  887. /* 空状态 */
  888. .empty1 {
  889. text-align: center;
  890. padding: 80rpx 0;
  891. }
  892. .flex-items-plus {
  893. display: flex;
  894. justify-content: center;
  895. margin-bottom: 24rpx;
  896. opacity: 0.5;
  897. }
  898. button::after {
  899. border: none;
  900. }
  901. .empty-text {
  902. font-size: 28rpx;
  903. color: #999;
  904. margin-bottom: 12rpx;
  905. font-weight: 500;
  906. }
  907. .empty-desc {
  908. font-size: 24rpx;
  909. color: #ccc;
  910. }
  911. </style>