ranking.vue 18 KB

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