ranking.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. <template>
  2. <view class="matchmaker-ranking">
  3. <!-- 顶部导航栏 -->
  4. <view class="header">
  5. <view class="back-btn" @click="goBack"></view>
  6. <text class="header-title">红娘排行榜</text>
  7. <view class="placeholder"></view>
  8. </view>
  9. <!-- 更新提示 -->
  10. <view class="update-info">
  11. <text class="update-text">每天17点自动更新数据</text>
  12. </view>
  13. <!-- 本周最佳榜标题 -->
  14. <view class="section-title-wrapper">
  15. <text class="section-title">
  16. <text class="title-icon">👩‍❤️‍💋‍👨</text>
  17. 本周最佳榜
  18. <text class="title-icon">👩‍❤️‍💋‍👨</text>
  19. </text>
  20. </view>
  21. <!-- 榜说明 -->
  22. <view class="ranking-description">
  23. <text class="description-text">榜单综合万粉以下红娘的日牵线数,用户好评数 等综合因素,上榜为前20的红娘</text>
  24. </view>
  25. <!-- 前三名展示 -->
  26. <view class="top-three-container" v-if="topThree.length >= 3">
  27. <view class="top-three-item second" @click="goToDetail(topThree[1])">
  28. <text class="rank-number">2</text>
  29. <image class="avatar-large" :src="topThree[1].avatar_url || defaultAvatar" mode="aspectFill"></image>
  30. <text class="matchmaker-name">{{ topThree[1].real_name }}</text>
  31. <text class="success-count">成功人数: {{ topThree[1].success_couples || 0 }}</text>
  32. <view class="like-btn" :class="{ liked: topThree[1].hasLiked }" @click.stop="handleLike(topThree[1])">
  33. {{ topThree[1].hasLiked ? '已点赞' : '点赞' }}
  34. </view>
  35. </view>
  36. <view class="top-three-item first" @click="goToDetail(topThree[0])">
  37. <text class="rank-number">1</text>
  38. <image class="avatar-large" :src="topThree[0].avatar_url || defaultAvatar" mode="aspectFill"></image>
  39. <text class="matchmaker-name">{{ topThree[0].real_name }}</text>
  40. <text class="success-count">成功人数: {{ topThree[0].success_couples || 0 }}</text>
  41. <view class="like-btn" :class="{ liked: topThree[0].hasLiked }" @click.stop="handleLike(topThree[0])">
  42. {{ topThree[0].hasLiked ? '已点赞' : '点赞' }}
  43. </view>
  44. </view>
  45. <view class="top-three-item third" @click="goToDetail(topThree[2])">
  46. <text class="rank-number">3</text>
  47. <image class="avatar-large" :src="topThree[2].avatar_url || defaultAvatar" mode="aspectFill"></image>
  48. <text class="matchmaker-name">{{ topThree[2].real_name }}</text>
  49. <text class="success-count">成功人数: {{ topThree[2].success_couples || 0 }}</text>
  50. <view class="like-btn" :class="{ liked: topThree[2].hasLiked }" @click.stop="handleLike(topThree[2])">
  51. {{ topThree[2].hasLiked ? '已点赞' : '点赞' }}
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 排行榜列表 -->
  56. <scroll-view scroll-y class="ranking-list">
  57. <view class="ranking-item" v-for="(item, index) in restList" :key="item.matchmaker_id" @click="goToDetail(item)">
  58. <text class="rank-number-normal">{{ index + 4 }}</text>
  59. <image class="avatar-small" :src="item.avatar_url || defaultAvatar" mode="aspectFill"></image>
  60. <view class="matchmaker-info">
  61. <text class="matchmaker-name-normal">{{ item.real_name }}</text>
  62. <text class="success-count-normal">成功: {{ item.success_couples || 0 }} | 点赞: {{ item.weeklyLikes || 0 }}</text>
  63. <text class="user-rating">等级: {{ item.level_name || '青铜红娘' }}</text>
  64. </view>
  65. <view class="like-btn-small" :class="{ liked: item.hasLiked }" @click.stop="handleLike(item)">
  66. {{ item.hasLiked ? '已赞' : '点赞' }}
  67. </view>
  68. </view>
  69. <view v-if="loading" class="loading-tip">加载中...</view>
  70. <view v-if="!loading && restList.length === 0" class="empty-tip">暂无更多红娘</view>
  71. </scroll-view>
  72. <!-- 底部导航 -->
  73. <view class="tabbar">
  74. <view class="tabbar-item home" @click="navigateToWorkbench">
  75. <view class="tabbar-icon"></view>
  76. <text class="tabbar-text">工作台</text>
  77. </view>
  78. <view class="tabbar-item resources" @click="navigateToMyResources">
  79. <view class="tabbar-icon"></view>
  80. <text class="tabbar-text">我的资源</text>
  81. </view>
  82. <view class="tabbar-item trophy active" @click="navigateToRanking">
  83. <view class="tabbar-icon"></view>
  84. <text class="tabbar-text">排行榜</text>
  85. </view>
  86. <view class="tabbar-item message" @click="navigateToMessage">
  87. <view class="tabbar-icon">
  88. <view v-if="unreadCount > 0" class="badge">{{ unreadCount }}</view>
  89. </view>
  90. <text class="tabbar-text">消息</text>
  91. </view>
  92. <view class="tabbar-item mine" @click="navigateToMine">
  93. <view class="tabbar-icon"></view>
  94. <text class="tabbar-text">我的</text>
  95. </view>
  96. </view>
  97. </view>
  98. </template>
  99. <script>
  100. import api from '@/utils/api.js'
  101. export default {
  102. data() {
  103. return {
  104. loading: false,
  105. rankingList: [],
  106. defaultAvatar: '/static/default-avatar.svg',
  107. userId: null
  108. }
  109. },
  110. computed: {
  111. // 前三名
  112. topThree() {
  113. return this.rankingList.slice(0, 3)
  114. },
  115. // 第4名及以后
  116. restList() {
  117. return this.rankingList.slice(3)
  118. },
  119. // 全局未读消息数
  120. unreadCount() {
  121. return this.$store.getters.getTotalUnread || 0
  122. }
  123. },
  124. onLoad() {
  125. // 获取当前用户ID
  126. const userInfo = uni.getStorageSync('userInfo')
  127. if (userInfo && userInfo.userId) {
  128. this.userId = userInfo.userId
  129. }
  130. // 加载排行榜数据
  131. this.loadRankingData()
  132. },
  133. methods: {
  134. // 返回上一页
  135. goBack() {
  136. uni.navigateBack()
  137. },
  138. // 加载排行榜数据(使用本周排行榜API)
  139. async loadRankingData() {
  140. this.loading = true
  141. try {
  142. // 使用本周排行榜API,传入userId以获取点赞状态
  143. const res = await api.matchmaker.getWeeklyRanking({
  144. limit: 20,
  145. userId: this.userId
  146. })
  147. console.log('API原始返回数据:', JSON.stringify(res))
  148. let dataList = []
  149. if (res && Array.isArray(res)) {
  150. dataList = res
  151. } else if (res && res.data && Array.isArray(res.data)) {
  152. dataList = res.data
  153. } else if (res && typeof res === 'object') {
  154. // 可能直接返回的是对象数组
  155. dataList = Object.values(res).filter(item => typeof item === 'object' && item.matchmakerId)
  156. }
  157. this.rankingList = dataList.map(item => this.formatMatchmaker(item))
  158. console.log('格式化后的排行榜数据:', JSON.stringify(this.rankingList.slice(0, 3)))
  159. } catch (e) {
  160. console.error('加载排行榜数据失败:', e)
  161. uni.showToast({
  162. title: '加载失败',
  163. icon: 'none'
  164. })
  165. } finally {
  166. this.loading = false
  167. }
  168. },
  169. // 格式化红娘数据(统一字段名)
  170. formatMatchmaker(item) {
  171. return {
  172. ...item,
  173. matchmaker_id: item.matchmakerId || item.matchmaker_id,
  174. real_name: item.realName || item.real_name,
  175. avatar_url: item.avatarUrl || item.avatar_url,
  176. success_couples: item.successCouples || item.success_couples,
  177. level_name: item.levelName || item.level_name,
  178. weeklyLikes: item.weekly_likes || item.weeklyLikes || 0,
  179. hasLiked: item.has_liked || item.hasLiked || false
  180. }
  181. },
  182. // 点赞
  183. async handleLike(matchmaker) {
  184. // 检查是否已点赞
  185. if (matchmaker.hasLiked) {
  186. uni.showToast({
  187. title: '本周已点赞过该红娘',
  188. icon: 'none'
  189. })
  190. return
  191. }
  192. // 检查是否登录
  193. if (!this.userId) {
  194. uni.showToast({
  195. title: '请先登录',
  196. icon: 'none'
  197. })
  198. return
  199. }
  200. try {
  201. const matchmakerId = matchmaker.matchmaker_id || matchmaker.matchmakerId
  202. const res = await api.matchmaker.likeMatchmaker(this.userId, matchmakerId)
  203. if (res && (res.code === 200 || res.liked)) {
  204. uni.showToast({
  205. title: '点赞成功',
  206. icon: 'success'
  207. })
  208. // 更新本地状态 - 直接修改数据,不重新加载
  209. matchmaker.hasLiked = true
  210. matchmaker.weeklyLikes = (matchmaker.weeklyLikes || 0) + 1
  211. // 强制更新视图
  212. this.$forceUpdate()
  213. } else {
  214. uni.showToast({
  215. title: res.message || '点赞失败',
  216. icon: 'none'
  217. })
  218. }
  219. } catch (e) {
  220. console.error('点赞失败:', e)
  221. uni.showToast({
  222. title: e.message || '点赞失败',
  223. icon: 'none'
  224. })
  225. }
  226. },
  227. // 导航到工作台
  228. navigateToWorkbench() {
  229. uni.redirectTo({
  230. url: '/pages/matchmaker-workbench/index'
  231. })
  232. },
  233. // 导航到我的资源
  234. navigateToMyResources() {
  235. uni.redirectTo({
  236. url: '/pages/matchmaker-workbench/my-resources'
  237. })
  238. },
  239. // 导航到排行榜
  240. navigateToRanking() {
  241. // 已在排行榜页面,无需跳转
  242. },
  243. // 导航到消息
  244. navigateToMessage() {
  245. uni.redirectTo({
  246. url: '/pages/matchmaker-workbench/message'
  247. })
  248. },
  249. // 导航到我的
  250. navigateToMine() {
  251. uni.redirectTo({
  252. url: '/pages/matchmaker-workbench/mine'
  253. })
  254. },
  255. // 跳转到红娘详情
  256. goToDetail(matchmaker) {
  257. const id = matchmaker.matchmaker_id || matchmaker.matchmakerId
  258. if (id) {
  259. uni.navigateTo({
  260. url: `/pages/matchmakers/detail?id=${id}`
  261. })
  262. }
  263. }
  264. }
  265. }
  266. </script>
  267. <style lang="scss" scoped>
  268. .matchmaker-ranking {
  269. min-height: 100vh;
  270. background: linear-gradient(135deg, #FFF3F6 0%, #FFE4E8 100%);
  271. display: flex;
  272. flex-direction: column;
  273. }
  274. /* 顶部导航栏 */
  275. .header {
  276. display: flex;
  277. align-items: center;
  278. justify-content: space-between;
  279. padding: 25rpx 30rpx;
  280. padding-top: calc(25rpx + env(safe-area-inset-top));
  281. background: #FFF9F9;
  282. border-bottom: 1rpx solid #F0F0F0;
  283. .back-btn {
  284. width: 70rpx;
  285. height: 70rpx;
  286. display: flex;
  287. align-items: center;
  288. justify-content: center;
  289. background: rgba(240, 240, 240, 0.5);
  290. border-radius: 50%;
  291. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>');
  292. background-size: 40rpx 40rpx;
  293. background-repeat: no-repeat;
  294. background-position: center;
  295. }
  296. .header-title {
  297. font-size: 38rpx;
  298. font-weight: bold;
  299. color: #333;
  300. }
  301. .placeholder {
  302. width: 70rpx;
  303. }
  304. }
  305. /* 更新提示 */
  306. .update-info {
  307. background: #FFF3E0;
  308. padding: 15rpx;
  309. text-align: center;
  310. .update-text {
  311. font-size: 24rpx;
  312. color: #FF9800;
  313. }
  314. }
  315. /* 本周最佳榜标题 */
  316. .section-title-wrapper {
  317. text-align: center;
  318. margin: 30rpx 0 15rpx;
  319. .section-title {
  320. display: inline-block;
  321. font-size: 36rpx;
  322. font-weight: bold;
  323. color: #E91E63;
  324. line-height: 1.4;
  325. .title-icon {
  326. font-size: 40rpx;
  327. margin: 0 10rpx;
  328. }
  329. }
  330. }
  331. /* 榜说明 */
  332. .ranking-description {
  333. padding: 0 30rpx 25rpx;
  334. .description-text {
  335. display: block;
  336. font-size: 26rpx;
  337. color: #666;
  338. line-height: 1.5;
  339. text-align: center;
  340. }
  341. }
  342. /* 前三名展示 */
  343. .top-three-container {
  344. display: flex;
  345. justify-content: space-around;
  346. align-items: flex-end;
  347. padding: 0 20rpx 40rpx;
  348. background: #FFF9F9;
  349. border-radius: 20rpx;
  350. margin: 0 20rpx 20rpx;
  351. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  352. .top-three-item {
  353. display: flex;
  354. flex-direction: column;
  355. align-items: center;
  356. padding: 20rpx;
  357. border-radius: 20rpx;
  358. position: relative;
  359. &.first {
  360. background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
  361. width: 280rpx;
  362. height: 400rpx;
  363. order: 2;
  364. margin-bottom: 30rpx;
  365. }
  366. &.second {
  367. background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
  368. width: 240rpx;
  369. height: 350rpx;
  370. order: 1;
  371. }
  372. &.third {
  373. background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
  374. width: 240rpx;
  375. height: 350rpx;
  376. order: 3;
  377. }
  378. .rank-number {
  379. position: absolute;
  380. top: 20rpx;
  381. left: 20rpx;
  382. font-size: 48rpx;
  383. font-weight: bold;
  384. color: #FFFFFF;
  385. }
  386. .avatar-large {
  387. width: 120rpx;
  388. height: 120rpx;
  389. border-radius: 50%;
  390. background: rgba(255, 255, 255, 0.3);
  391. margin: 40rpx 0 20rpx;
  392. }
  393. .matchmaker-name {
  394. font-size: 32rpx;
  395. font-weight: bold;
  396. color: #FFFFFF;
  397. margin-bottom: 15rpx;
  398. }
  399. .success-count {
  400. font-size: 28rpx;
  401. color: #FFFFFF;
  402. margin-bottom: 30rpx;
  403. }
  404. .like-btn {
  405. padding: 12rpx 35rpx;
  406. background: rgba(255, 255, 255, 0.2);
  407. color: #FFFFFF;
  408. border-radius: 25rpx;
  409. font-size: 26rpx;
  410. font-weight: bold;
  411. border: 2rpx solid #FFFFFF;
  412. &.liked {
  413. background: rgba(255, 255, 255, 0.5);
  414. color: rgba(255, 255, 255, 0.8);
  415. border-color: rgba(255, 255, 255, 0.5);
  416. }
  417. }
  418. }
  419. }
  420. .ranking-list {
  421. flex: 1;
  422. padding: 0 20rpx 120rpx;
  423. .ranking-item {
  424. display: flex;
  425. align-items: center;
  426. background: #FFFFFF;
  427. border-radius: 20rpx;
  428. padding: 25rpx;
  429. margin-bottom: 20rpx;
  430. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  431. .rank-number-normal {
  432. width: 50rpx;
  433. height: 50rpx;
  434. display: flex;
  435. align-items: center;
  436. justify-content: center;
  437. font-size: 28rpx;
  438. font-weight: bold;
  439. color: #999;
  440. border-radius: 50%;
  441. background: #F0F0F0;
  442. margin-right: 20rpx;
  443. }
  444. .avatar-small {
  445. width: 80rpx;
  446. height: 80rpx;
  447. border-radius: 50%;
  448. background: #F0F0F0;
  449. margin-right: 20rpx;
  450. }
  451. .matchmaker-info {
  452. flex: 1;
  453. .matchmaker-name-normal {
  454. display: block;
  455. font-size: 32rpx;
  456. font-weight: bold;
  457. color: #333;
  458. margin-bottom: 8rpx;
  459. }
  460. .success-count-normal,
  461. .user-rating {
  462. display: block;
  463. font-size: 24rpx;
  464. color: #666;
  465. margin-bottom: 4rpx;
  466. }
  467. }
  468. .like-btn-small {
  469. padding: 10rpx 30rpx;
  470. background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
  471. color: #FFFFFF;
  472. border-radius: 25rpx;
  473. font-size: 26rpx;
  474. font-weight: bold;
  475. &.liked {
  476. background: #CCCCCC;
  477. color: #999999;
  478. }
  479. }
  480. }
  481. .loading-tip,
  482. .empty-tip {
  483. text-align: center;
  484. padding: 40rpx;
  485. font-size: 28rpx;
  486. color: #999;
  487. }
  488. }
  489. /* 底部导航 */
  490. .tabbar {
  491. position: fixed;
  492. bottom: 0;
  493. left: 0;
  494. right: 0;
  495. height: 100rpx;
  496. background: #FFFFFF;
  497. border-top: 1rpx solid #F0F0F0;
  498. display: flex;
  499. justify-content: space-around;
  500. align-items: center;
  501. padding-bottom: env(safe-area-inset-bottom);
  502. .tabbar-item {
  503. display: flex;
  504. flex-direction: column;
  505. align-items: center;
  506. gap: 8rpx;
  507. padding: 10rpx 0;
  508. .tabbar-icon {
  509. width: 44rpx;
  510. height: 44rpx;
  511. background-size: contain;
  512. background-repeat: no-repeat;
  513. background-position: center;
  514. position: relative;
  515. .badge {
  516. position: absolute;
  517. top: -8rpx;
  518. right: -8rpx;
  519. background: #FF4444;
  520. color: #FFFFFF;
  521. font-size: 20rpx;
  522. font-weight: bold;
  523. width: 32rpx;
  524. height: 32rpx;
  525. display: flex;
  526. align-items: center;
  527. justify-content: center;
  528. border-radius: 16rpx;
  529. }
  530. }
  531. .tabbar-text {
  532. font-size: 20rpx;
  533. color: #999;
  534. }
  535. &.active .tabbar-text {
  536. color: #9C27B0;
  537. font-weight: bold;
  538. }
  539. &.home .tabbar-icon {
  540. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>');
  541. }
  542. &.home.active .tabbar-icon {
  543. background-image: url('data:image/svg+xml,<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>');
  544. }
  545. &.resources .tabbar-icon {
  546. background-image: url('data:image/svg+xml,<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>');
  547. }
  548. &.resources.active .tabbar-icon {
  549. background-image: url('data:image/svg+xml,<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>');
  550. }
  551. &.trophy .tabbar-icon {
  552. 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>');
  553. }
  554. &.trophy.active .tabbar-icon {
  555. 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>');
  556. }
  557. &.message .tabbar-icon {
  558. background-image: url('data:image/svg+xml,<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>');
  559. }
  560. &.message.active .tabbar-icon {
  561. background-image: url('data:image/svg+xml,<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>');
  562. }
  563. &.mine .tabbar-icon {
  564. background-image: url('data:image/svg+xml,<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>');
  565. }
  566. &.mine.active .tabbar-icon {
  567. background-image: url('data:image/svg+xml,<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>');
  568. }
  569. }
  570. }
  571. </style>