index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. <template>
  2. <view class="matchmaker-workbench">
  3. <!-- 顶部导航栏 -->
  4. <view class="header">
  5. <text class="header-title">红娘工作台</text>
  6. <view class="header-right">
  7. <view class="search-icon" @click="handleSearch"></view>
  8. <!-- 退出红娘工作台按钮 -->
  9. <view class="exit-workbench-btn" @click="openExitPopup">
  10. <text class="switch-icon">🔄</text>
  11. <text class="switch-text">切换首页</text>
  12. </view>
  13. </view>
  14. </view>
  15. <scroll-view scroll-y class="content">
  16. <!-- 欢迎卡片 -->
  17. <view class="welcome-card">
  18. <view class="welcome-text">
  19. <text class="welcome-title">欢迎回来</text>
  20. <text class="heart-icon">❤️</text>
  21. <text class="matchmaker-name">高红娘</text>
  22. </view>
  23. <view class="avatar"></view>
  24. </view>
  25. <!-- 统计卡片 -->
  26. <view class="stats-cards">
  27. <view class="stats-card success">
  28. <text class="stats-number">520</text>
  29. <text class="stats-label">成功撮合</text>
  30. <text class="stats-subtitle">匹配数</text>
  31. </view>
  32. <view class="stats-card points">
  33. <text class="stats-number">23</text>
  34. <text class="stats-label">积分可兑礼</text>
  35. <text class="stats-subtitle">我的积分</text>
  36. <text class="stats-extra">可兑换</text>
  37. </view>
  38. </view>
  39. <!-- 公告卡片 -->
  40. <view class="announcement-card" @click="handleAnnouncement">
  41. <text class="announcement-tag">公告</text>
  42. <text class="announcement-content">恭喜高红娘成功助力丁先生和贾女士牵手成功!</text>
  43. <view class="arrow-right"></view>
  44. </view>
  45. <view class="announcement-card" v-else>
  46. <text class="announcement-tag">公告</text>
  47. <text class="announcement-content">暂无公告</text>
  48. </view>
  49. <!-- 功能菜单 -->
  50. <view class="menu-grid">
  51. <view class="menu-item" @click="navigateToMyResources">
  52. <view class="menu-icon resources"></view>
  53. <text class="menu-text">我的资源</text>
  54. </view>
  55. <view class="menu-item" @click="navigateToQualityResources">
  56. <view class="menu-icon quality"></view>
  57. <text class="menu-text">优质资源</text>
  58. </view>
  59. <view class="menu-item" @click="navigateToCourses">
  60. <view class="menu-icon courses"></view>
  61. <text class="menu-text">课程培训</text>
  62. </view>
  63. <view class="menu-item" @click="navigateToPointsMall">
  64. <view class="menu-icon mall"></view>
  65. <text class="menu-text">积分商城</text>
  66. </view>
  67. <view class="menu-item" @click="navigateToActivityCenter">
  68. <view class="menu-icon activity"></view>
  69. <text class="menu-text">活动中心</text>
  70. </view>
  71. </view>
  72. <!-- 本周最佳红娘 -->
  73. <view class="best-matchmaker-section">
  74. <view class="section-header">
  75. <text class="section-title">
  76. <text class="crown-icon">👑</text>
  77. 本周最佳红娘
  78. </text>
  79. <text class="section-more" @click="navigateToRanking">排行榜 ></text>
  80. </view>
  81. <view class="best-matchmaker-list">
  82. <view class="best-matchmaker-item" v-for="(item, index) in bestMatchmakers" :key="item.matchmaker_id || index">
  83. <text class="rank-number" :class="'rank-' + (index + 1)">{{ index + 1 }}</text>
  84. <image class="avatar-small" :src="item.avatar_url || '/static/default-avatar.svg'" mode="aspectFill"></image>
  85. <view class="matchmaker-info">
  86. <text class="matchmaker-name-small">{{ item.real_name || '红娘' }}</text>
  87. <text class="success-count">成功人数: {{ item.success_couples || 0 }}</text>
  88. </view>
  89. <view class="likes-info">
  90. <text class="heart-small">❤️</text>
  91. <text class="like-count">{{ item.likes || 0 }}</text>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </scroll-view>
  97. <!-- 底部导航 -->
  98. <view class="tabbar">
  99. <view class="tabbar-item active home" @click="navigateToWorkbench">
  100. <view class="tabbar-icon"></view>
  101. <text class="tabbar-text">工作台</text>
  102. </view>
  103. <view class="tabbar-item resources" @click="navigateToMyResources">
  104. <view class="tabbar-icon"></view>
  105. <text class="tabbar-text">我的资源</text>
  106. </view>
  107. <view class="tabbar-item trophy" @click="navigateToRanking">
  108. <view class="tabbar-icon"></view>
  109. <text class="tabbar-text">排行榜</text>
  110. </view>
  111. <view class="tabbar-item message" @click="navigateToMessage">
  112. <view class="tabbar-icon">
  113. <view class="badge">3</view>
  114. </view>
  115. <text class="tabbar-text">消息</text>
  116. </view>
  117. <view class="tabbar-item mine" @click="navigateToMine">
  118. <view class="tabbar-icon"></view>
  119. <text class="tabbar-text">我的</text>
  120. </view>
  121. </view>
  122. </view>
  123. </template>
  124. <script>
  125. import api from '@/utils/api.js'
  126. export default {
  127. data() {
  128. return {
  129. bestMatchmakers: [],
  130. announcements: [],
  131. currentAnnouncementIndex: 0
  132. }
  133. },
  134. computed: {
  135. currentAnnouncement() {
  136. return this.announcements.length > 0 ? this.announcements[this.currentAnnouncementIndex] : null
  137. }
  138. },
  139. onLoad() {
  140. this.loadRankingData()
  141. this.loadAnnouncements()
  142. },
  143. methods: {
  144. // 加载排行榜数据(取前3名)
  145. async loadRankingData() {
  146. try {
  147. const res = await api.matchmaker.getRankingData({ limit: 20 })
  148. let list = []
  149. if (res && Array.isArray(res)) {
  150. list = res
  151. } else if (res && res.data && Array.isArray(res.data)) {
  152. list = res.data
  153. }
  154. // 只取前3名显示
  155. this.bestMatchmakers = list.slice(0, 3)
  156. } catch (e) {
  157. console.error('加载排行榜数据失败:', e)
  158. }
  159. },
  160. // 加载公告数据
  161. async loadAnnouncements() {
  162. try {
  163. const res = await api.home.getNotices()
  164. if (res && Array.isArray(res)) {
  165. this.announcements = res
  166. } else if (res && res.data && Array.isArray(res.data)) {
  167. this.announcements = res.data
  168. }
  169. // 如果有多条公告,自动轮播
  170. if (this.announcements.length > 1) {
  171. this.startAnnouncementCarousel()
  172. }
  173. } catch (e) {
  174. console.error('加载公告失败:', e)
  175. }
  176. },
  177. // 公告轮播
  178. startAnnouncementCarousel() {
  179. setInterval(() => {
  180. this.currentAnnouncementIndex = (this.currentAnnouncementIndex + 1) % this.announcements.length
  181. }, 5000)
  182. },
  183. // 公告点击
  184. handleAnnouncement() {
  185. if (this.currentAnnouncement) {
  186. uni.navigateTo({
  187. url: '/pages/announcement/list'
  188. })
  189. }
  190. },
  191. // 导航到我的资源
  192. navigateToMyResources() {
  193. uni.navigateTo({
  194. url: '/pages/matchmaker-workbench/my-resources'
  195. })
  196. },
  197. // 导航到优质资源
  198. navigateToQualityResources() {
  199. uni.navigateTo({
  200. url: '/pages/matchmaker-workbench/quality-resources'
  201. })
  202. },
  203. // 导航到课程培训
  204. navigateToCourses() {
  205. uni.navigateTo({
  206. url: '/pages/courses/list'
  207. })
  208. },
  209. // 导航到积分商城
  210. navigateToPointsMall() {
  211. uni.navigateTo({
  212. url: '/pages/matchmaker-workbench/points-mall'
  213. })
  214. },
  215. // 导航到活动中心
  216. navigateToActivityCenter() {
  217. uni.navigateTo({
  218. url: '/pages/activities/list'
  219. })
  220. },
  221. // 导航到排行榜
  222. navigateToRanking() {
  223. uni.navigateTo({
  224. url: '/pages/matchmaker-workbench/ranking'
  225. })
  226. },
  227. // 导航到工作台
  228. navigateToWorkbench() {
  229. // 已在工作台,无需跳转
  230. },
  231. // 导航到消息
  232. navigateToMessage() {
  233. uni.navigateTo({
  234. url: '/pages/matchmaker-workbench/message'
  235. })
  236. },
  237. // 导航到我的
  238. navigateToMine() {
  239. uni.navigateTo({
  240. url: '/pages/matchmaker-workbench/mine'
  241. })
  242. }
  243. }
  244. }
  245. </script>
  246. <style lang="scss" scoped>
  247. .matchmaker-workbench {
  248. min-height: 100vh;
  249. background: #FFF9F9;
  250. display: flex;
  251. flex-direction: column;
  252. }
  253. /* 顶部导航栏 */
  254. .header {
  255. display: flex;
  256. align-items: center;
  257. justify-content: space-between;
  258. padding: 25rpx 30rpx;
  259. padding-top: calc(25rpx + env(safe-area-inset-top));
  260. background: #FFF9F9;
  261. border-bottom: 1rpx solid #F0F0F0;
  262. .header-title {
  263. font-size: 38rpx;
  264. font-weight: bold;
  265. color: #9C27B0;
  266. }
  267. .header-right {
  268. display: flex;
  269. align-items: center;
  270. gap: 20rpx;
  271. .search-icon,
  272. .settings-icon {
  273. width: 44rpx;
  274. height: 44rpx;
  275. background-size: contain;
  276. background-repeat: no-repeat;
  277. background-position: center;
  278. }
  279. .search-icon {
  280. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
  281. }
  282. .settings-icon {
  283. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/></svg>');
  284. .exit-workbench-btn {
  285. display: flex;
  286. align-items: center;
  287. justify-content: center;
  288. }
  289. /* 退出工作台按钮样式 */
  290. .exit-workbench-btn {
  291. position: relative;
  292. width: auto;
  293. height: auto;
  294. display: flex;
  295. align-items: center;
  296. justify-content: center;
  297. background: transparent;
  298. border-radius: 0;
  299. transition: all 0.3s ease;
  300. padding: 10rpx 20rpx;
  301. color: #E91E63;
  302. font-weight: 600;
  303. border: 2rpx solid #E91E63;
  304. border-radius: 25rpx;
  305. margin-left: 20rpx;
  306. &:active {
  307. opacity: 0.8;
  308. transform: scale(0.98);
  309. background: rgba(233, 30, 99, 0.1);
  310. }
  311. .switch-icon {
  312. font-size: 28rpx;
  313. margin-right: 8rpx;
  314. }
  315. .switch-text {
  316. font-size: 26rpx;
  317. color: #E91E63;
  318. font-weight: 600;
  319. }
  320. }
  321. }
  322. }
  323. .content {
  324. flex: 1;
  325. padding: 20rpx 20rpx 120rpx;
  326. display: flex;
  327. flex-direction: column;
  328. }
  329. /* 欢迎卡片 + 统计卡片合并 */
  330. .welcome-card {
  331. display: flex;
  332. justify-content: space-between;
  333. align-items: center;
  334. padding: 30rpx;
  335. background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
  336. border-radius: 20rpx;
  337. margin-bottom: 20rpx;
  338. .welcome-text {
  339. display: flex;
  340. align-items: center;
  341. gap: 10rpx;
  342. .welcome-title {
  343. font-size: 38rpx;
  344. color: #333;
  345. }
  346. .heart-icon {
  347. font-size: 32rpx;
  348. }
  349. .matchmaker-name {
  350. font-size: 40rpx;
  351. font-weight: bold;
  352. color: #333;
  353. }
  354. }
  355. .avatar {
  356. width: 100rpx;
  357. height: 100rpx;
  358. border-radius: 50%;
  359. background: rgba(255, 255, 255, 0.3);
  360. }
  361. }
  362. /* 统计卡片 */
  363. .stats-cards {
  364. display: flex;
  365. gap: 20rpx;
  366. margin-bottom: 20rpx;
  367. .stats-card {
  368. flex: 1;
  369. padding: 25rpx;
  370. border-radius: 15rpx;
  371. background: #FFFFFF;
  372. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  373. .stats-row {
  374. display: flex;
  375. align-items: center;
  376. gap: 10rpx;
  377. margin-bottom: 8rpx;
  378. }
  379. .stats-number {
  380. font-size: 48rpx;
  381. font-weight: bold;
  382. }
  383. .stats-tag {
  384. font-size: 20rpx;
  385. padding: 4rpx 12rpx;
  386. border-radius: 6rpx;
  387. font-weight: 500;
  388. &.orange {
  389. color: #FF6B8A;
  390. border: 1rpx solid #FF6B8A;
  391. background: rgba(255, 107, 138, 0.1);
  392. }
  393. &.purple {
  394. color: #9C27B0;
  395. border: 1rpx solid #9C27B0;
  396. background: rgba(156, 39, 176, 0.1);
  397. }
  398. }
  399. .stats-label {
  400. display: block;
  401. font-size: 28rpx;
  402. margin-bottom: 8rpx;
  403. }
  404. .stats-subtitle {
  405. display: block;
  406. font-size: 24rpx;
  407. color: #999;
  408. }
  409. .stats-extra {
  410. display: block;
  411. font-size: 22rpx;
  412. color: #999;
  413. margin-top: 8rpx;
  414. }
  415. &.success {
  416. .stats-number {
  417. color: #FF6B8A;
  418. }
  419. .stats-label {
  420. color: #333;
  421. }
  422. }
  423. &.points {
  424. .stats-number {
  425. color: #9C27B0;
  426. }
  427. .stats-label {
  428. color: #333;
  429. }
  430. }
  431. }
  432. }
  433. /* 公告卡片 */
  434. .announcement-card {
  435. display: flex;
  436. align-items: center;
  437. justify-content: space-between;
  438. padding: 25rpx 30rpx;
  439. background: #FFFFFF;
  440. border-radius: 20rpx;
  441. margin-bottom: 20rpx;
  442. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  443. position: relative;
  444. .announcement-tag {
  445. display: inline-block;
  446. background: #FF9800;
  447. color: #FFFFFF;
  448. font-size: 22rpx;
  449. padding: 6rpx 16rpx;
  450. border-radius: 12rpx;
  451. margin-right: 15rpx;
  452. font-weight: bold;
  453. }
  454. .announcement-content {
  455. flex: 1;
  456. font-size: 26rpx;
  457. color: #333;
  458. line-height: 1.4;
  459. }
  460. .arrow-right {
  461. width: 24rpx;
  462. height: 24rpx;
  463. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg>');
  464. background-size: contain;
  465. background-repeat: no-repeat;
  466. background-position: center;
  467. margin-left: 15rpx;
  468. }
  469. }
  470. /* 功能菜单 */
  471. .menu-grid {
  472. display: grid;
  473. grid-template-columns: repeat(5, 1fr);
  474. gap: 25rpx;
  475. padding: 35rpx 20rpx;
  476. background: #FFFFFF;
  477. border-radius: 20rpx;
  478. margin-bottom: 20rpx;
  479. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  480. .menu-item {
  481. display: flex;
  482. flex-direction: column;
  483. align-items: center;
  484. gap: 15rpx;
  485. .menu-icon {
  486. width: 90rpx;
  487. height: 90rpx;
  488. border-radius: 50%;
  489. background-size: 50rpx 50rpx;
  490. background-repeat: no-repeat;
  491. background-position: center;
  492. &.resources {
  493. background-color: #E8F5E9;
  494. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234CAF50"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>');
  495. }
  496. &.quality {
  497. background-color: #FFF3E0;
  498. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FF9800"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>');
  499. }
  500. &.courses {
  501. background-color: #E3F2FD;
  502. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232196F3"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 19h14v-2H5v2zm0-4h14v-2H5v2zm0-4h14v-2H5v2z"/></svg>');
  503. }
  504. &.mall {
  505. background-color: #F3E5F5;
  506. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></svg>');
  507. }
  508. &.activity {
  509. background-color: #FFEBEE;
  510. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23F44336"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>');
  511. }
  512. }
  513. .menu-text {
  514. font-size: 26rpx;
  515. color: #333;
  516. }
  517. }
  518. }
  519. /* 本周最佳红娘 */
  520. .best-matchmaker-section {
  521. flex: 1;
  522. padding: 30rpx;
  523. background: #FFFFFF;
  524. border-radius: 20rpx;
  525. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  526. display: flex;
  527. flex-direction: column;
  528. .section-header {
  529. display: flex;
  530. justify-content: space-between;
  531. align-items: center;
  532. margin-bottom: 20rpx;
  533. .section-title {
  534. display: flex;
  535. align-items: center;
  536. font-size: 30rpx;
  537. font-weight: bold;
  538. color: red;
  539. .crown-icon {
  540. font-size: 32rpx;
  541. margin-right: 10rpx;
  542. }
  543. }
  544. .section-more {
  545. font-size: 24rpx;
  546. color: #9C27B0;
  547. }
  548. }
  549. .best-matchmaker-list {
  550. flex: 1;
  551. display: flex;
  552. flex-direction: column;
  553. justify-content: space-between;
  554. .best-matchmaker-item {
  555. display: flex;
  556. align-items: center;
  557. gap: 20rpx;
  558. padding: 25rpx 20rpx;
  559. background: #FAFAFA;
  560. border-radius: 15rpx;
  561. .rank-number {
  562. width: 45rpx;
  563. height: 45rpx;
  564. display: flex;
  565. align-items: center;
  566. justify-content: center;
  567. font-size: 28rpx;
  568. font-weight: bold;
  569. color: #FFF;
  570. border-radius: 50%;
  571. background: #FFD700;
  572. &.rank-1 {
  573. background: #FFD700;
  574. }
  575. &.rank-2 {
  576. background: #C0C0C0;
  577. }
  578. &.rank-3 {
  579. background: #CD7F32;
  580. }
  581. }
  582. .avatar-small {
  583. width: 80rpx;
  584. height: 80rpx;
  585. border-radius: 50%;
  586. background: #F0F0F0;
  587. }
  588. .matchmaker-info {
  589. flex: 1;
  590. .matchmaker-name-small {
  591. display: block;
  592. font-size: 32rpx;
  593. font-weight: bold;
  594. color: #333;
  595. margin-bottom: 8rpx;
  596. }
  597. .success-count {
  598. display: block;
  599. font-size: 26rpx;
  600. color: #999;
  601. }
  602. }
  603. .likes-info {
  604. display: flex;
  605. align-items: center;
  606. gap: 10rpx;
  607. .heart-small {
  608. font-size: 28rpx;
  609. }
  610. .like-count {
  611. font-size: 28rpx;
  612. color: #E91E63;
  613. font-weight: bold;
  614. }
  615. }
  616. }
  617. }
  618. }
  619. /* 底部导航 */
  620. .tabbar {
  621. position: fixed;
  622. bottom: 0;
  623. left: 0;
  624. right: 0;
  625. height: 100rpx;
  626. background: #FFFFFF;
  627. border-top: 1rpx solid #F0F0F0;
  628. display: flex;
  629. justify-content: space-around;
  630. align-items: center;
  631. padding-bottom: env(safe-area-inset-bottom);
  632. .tabbar-item {
  633. display: flex;
  634. flex-direction: column;
  635. align-items: center;
  636. gap: 8rpx;
  637. padding: 10rpx 0;
  638. .tabbar-icon {
  639. width: 44rpx;
  640. height: 44rpx;
  641. background-size: contain;
  642. background-repeat: no-repeat;
  643. background-position: center;
  644. position: relative;
  645. .badge {
  646. position: absolute;
  647. top: -8rpx;
  648. right: -8rpx;
  649. background: #FF4444;
  650. color: #FFFFFF;
  651. font-size: 20rpx;
  652. font-weight: bold;
  653. width: 32rpx;
  654. height: 32rpx;
  655. display: flex;
  656. align-items: center;
  657. justify-content: center;
  658. border-radius: 16rpx;
  659. }
  660. }
  661. .tabbar-text {
  662. font-size: 20rpx;
  663. color: #999;
  664. }
  665. &.active {
  666. .tabbar-text {
  667. color: #9C27B0;
  668. font-weight: bold;
  669. }
  670. }
  671. &.home .tabbar-icon {
  672. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>');
  673. }
  674. &.resources .tabbar-icon {
  675. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>');
  676. }
  677. &.active.resources .tabbar-icon {
  678. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>');
  679. }
  680. &.trophy .tabbar-icon {
  681. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2zM5 8V7h2v3.82C5.84 10.4 5 9.3 5 8zm14 0c0 1.3-.84 2.4-2 2.82V7h2v1z"/></svg>');
  682. }
  683. &.active.trophy .tabbar-icon {
  684. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2zM5 8V7h2v3.82C5.84 10.4 5 9.3 5 8zm14 0c0 1.3-.84 2.4-2 2.82V7h2v1z"/></svg>');
  685. }
  686. &.message .tabbar-icon {
  687. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></svg>');
  688. }
  689. &.active.message .tabbar-icon {
  690. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></svg>');
  691. }
  692. &.mine .tabbar-icon {
  693. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
  694. }
  695. &.active.mine .tabbar-icon {
  696. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
  697. }
  698. }
  699. }
  700. </style>