message.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. <template>
  2. <view class="matchmaker-message">
  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. <scroll-view scroll-y class="content">
  10. <!-- 加载中 -->
  11. <view v-if="loading" class="loading-container">
  12. <text>加载中...</text>
  13. </view>
  14. <!-- 会话列表 -->
  15. <view v-else-if="conversationList.length > 0">
  16. <view
  17. v-for="conversation in conversationList"
  18. :key="conversation.conversationID"
  19. class="message-item user-message"
  20. @click="openChat(conversation)"
  21. >
  22. <image
  23. v-if="conversation.userProfile.avatar"
  24. :src="conversation.userProfile.avatar"
  25. class="message-avatar-img"
  26. />
  27. <view v-else class="message-avatar">
  28. {{ conversation.userProfile.nick || conversation.userProfile.userID.charAt(0) }}
  29. </view>
  30. <view class="message-body">
  31. <text class="message-type">{{ conversation.userProfile.nick || conversation.userProfile.userID }}</text>
  32. <text class="message-content">{{ getLastMessageText(conversation.lastMessage) }}</text>
  33. </view>
  34. <view class="message-right">
  35. <text class="message-time">{{ formatTime(conversation.lastMessage.lastTime) }}</text>
  36. <view v-if="conversation.unreadCount > 0" class="unread-badge">
  37. {{ conversation.unreadCount > 99 ? '99+' : conversation.unreadCount }}
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <!-- 空状态 -->
  43. <view v-else class="empty-container">
  44. <text>暂无消息</text>
  45. </view>
  46. </scroll-view>
  47. <!-- 底部导航 -->
  48. <view class="tabbar">
  49. <view class="tabbar-item home" @click="navigateToWorkbench">
  50. <view class="tabbar-icon"></view>
  51. <text class="tabbar-text">工作台</text>
  52. </view>
  53. <view class="tabbar-item resources" @click="navigateToMyResources">
  54. <view class="tabbar-icon"></view>
  55. <text class="tabbar-text">我的资源</text>
  56. </view>
  57. <view class="tabbar-item trophy" @click="navigateToRanking">
  58. <view class="tabbar-icon"></view>
  59. <text class="tabbar-text">排行榜</text>
  60. </view>
  61. <view class="tabbar-item message active" @click="navigateToMessage">
  62. <view class="tabbar-icon">
  63. <view class="badge">3</view>
  64. </view>
  65. <text class="tabbar-text">消息</text>
  66. </view>
  67. <view class="tabbar-item mine" @click="navigateToMine">
  68. <view class="tabbar-icon"></view>
  69. <text class="tabbar-text">我的</text>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. import timManager from '@/utils/tim.js'
  76. import TIM from '@/utils/tim-wx-sdk.js'
  77. export default {
  78. data() {
  79. return {
  80. loading: true,
  81. conversationList: [],
  82. matchmakerInfo: null,
  83. imUserId: '',
  84. totalUnreadCount: 0
  85. }
  86. },
  87. async onLoad() {
  88. await this.initIM()
  89. },
  90. onShow() {
  91. // 页面显示时刷新会话列表
  92. if (this.imUserId) {
  93. this.loadConversationList()
  94. }
  95. },
  96. onUnload() {
  97. // 页面卸载时移除监听
  98. this.removeListeners()
  99. },
  100. methods: {
  101. // 初始化 IM
  102. async initIM() {
  103. try {
  104. this.loading = true
  105. // 1. 获取当前登录用户ID
  106. const userId = uni.getStorageSync('userId')
  107. if (!userId) {
  108. uni.showToast({ title: '请先登录', icon: 'none' })
  109. return
  110. }
  111. // 2. 获取红娘信息
  112. const res = await uni.request({
  113. url: 'http://localhost:8081/api/matchmaker/current',
  114. method: 'GET',
  115. data: { userId }
  116. })
  117. if (res[1].data.code !== 200) {
  118. uni.showToast({ title: '获取红娘信息失败', icon: 'none' })
  119. return
  120. }
  121. this.matchmakerInfo = res[1].data.data
  122. this.imUserId = this.matchmakerInfo.imUserId // m_1
  123. console.log('✅ 红娘信息:', this.matchmakerInfo)
  124. // 3. 获取 UserSig
  125. const sigRes = await uni.request({
  126. url: `http://localhost:1004/api/im/getUserSig?userId=${this.imUserId}`,
  127. method: 'GET'
  128. })
  129. if (sigRes[1].data.code !== 200) {
  130. uni.showToast({ title: '获取UserSig失败', icon: 'none' })
  131. return
  132. }
  133. const userSig = sigRes[1].data.data
  134. console.log('✅ 获取到 UserSig')
  135. // 4. 登录 IM
  136. await timManager.login(this.imUserId, userSig)
  137. console.log('✅ 红娘已登录 IM:', this.imUserId)
  138. // 5. 监听事件
  139. this.addListeners()
  140. // 6. 加载会话列表
  141. await this.loadConversationList()
  142. } catch (error) {
  143. console.error('❌ 初始化 IM 失败:', error)
  144. uni.showToast({ title: '初始化失败', icon: 'none' })
  145. } finally {
  146. this.loading = false
  147. }
  148. },
  149. // 加载会话列表
  150. async loadConversationList() {
  151. try {
  152. const tim = timManager.getTim()
  153. const { data } = await tim.getConversationList()
  154. this.conversationList = data.conversationList
  155. // 计算总未读数
  156. this.totalUnreadCount = this.conversationList.reduce((total, conv) => {
  157. return total + conv.unreadCount
  158. }, 0)
  159. console.log('✅ 会话列表:', this.conversationList)
  160. } catch (error) {
  161. console.error('❌ 加载会话列表失败:', error)
  162. }
  163. },
  164. // 添加事件监听
  165. addListeners() {
  166. const tim = timManager.getTim()
  167. // 监听新消息
  168. tim.on(TIM.EVENT.MESSAGE_RECEIVED, this.onMessageReceived)
  169. // 监听会话列表更新
  170. tim.on(TIM.EVENT.CONVERSATION_LIST_UPDATED, this.onConversationListUpdated)
  171. },
  172. // 移除事件监听
  173. removeListeners() {
  174. const tim = timManager.getTim()
  175. tim.off(TIM.EVENT.MESSAGE_RECEIVED, this.onMessageReceived)
  176. tim.off(TIM.EVENT.CONVERSATION_LIST_UPDATED, this.onConversationListUpdated)
  177. },
  178. // 收到新消息
  179. onMessageReceived(event) {
  180. console.log('📩 收到新消息:', event.data)
  181. // 刷新会话列表
  182. this.loadConversationList()
  183. },
  184. // 会话列表更新
  185. onConversationListUpdated(event) {
  186. console.log('🔄 会话列表更新:', event.data)
  187. this.conversationList = event.data
  188. // 更新总未读数
  189. this.totalUnreadCount = this.conversationList.reduce((total, conv) => {
  190. return total + conv.unreadCount
  191. }, 0)
  192. },
  193. // 打开聊天页面
  194. openChat(conversation) {
  195. const targetUserId = conversation.userProfile.userID
  196. uni.navigateTo({
  197. url: `/pages/message/chat?targetUserId=${targetUserId}&fromMatchmaker=true`
  198. })
  199. },
  200. // 获取最后一条消息的文本
  201. getLastMessageText(lastMessage) {
  202. if (!lastMessage) return ''
  203. switch (lastMessage.type) {
  204. case TIM.TYPES.MSG_TEXT:
  205. return lastMessage.payload.text
  206. case TIM.TYPES.MSG_IMAGE:
  207. return '[图片]'
  208. case TIM.TYPES.MSG_AUDIO:
  209. return '[语音]'
  210. case TIM.TYPES.MSG_VIDEO:
  211. return '[视频]'
  212. case TIM.TYPES.MSG_FILE:
  213. return '[文件]'
  214. default:
  215. return '[消息]'
  216. }
  217. },
  218. // 格式化时间
  219. formatTime(timestamp) {
  220. if (!timestamp) return ''
  221. const now = new Date()
  222. const msgTime = new Date(timestamp * 1000)
  223. const diff = now - msgTime
  224. // 一分钟内
  225. if (diff < 60000) {
  226. return '刚刚'
  227. }
  228. // 一小时内
  229. if (diff < 3600000) {
  230. return Math.floor(diff / 60000) + '分钟前'
  231. }
  232. // 今天
  233. if (msgTime.toDateString() === now.toDateString()) {
  234. return msgTime.getHours() + ':' + String(msgTime.getMinutes()).padStart(2, '0')
  235. }
  236. // 昨天
  237. const yesterday = new Date(now)
  238. yesterday.setDate(yesterday.getDate() - 1)
  239. if (msgTime.toDateString() === yesterday.toDateString()) {
  240. return '昨天'
  241. }
  242. // 更早
  243. return (msgTime.getMonth() + 1) + '-' + msgTime.getDate()
  244. },
  245. // 返回上一页
  246. goBack() {
  247. uni.navigateBack()
  248. },
  249. // 导航到工作台
  250. navigateToWorkbench() {
  251. uni.redirectTo({
  252. url: '/pages/matchmaker-workbench/index'
  253. })
  254. },
  255. // 导航到我的资源
  256. navigateToMyResources() {
  257. uni.redirectTo({
  258. url: '/pages/matchmaker-workbench/my-resources'
  259. })
  260. },
  261. // 导航到排行榜
  262. navigateToRanking() {
  263. uni.redirectTo({
  264. url: '/pages/matchmaker-workbench/ranking'
  265. })
  266. },
  267. // 导航到消息
  268. navigateToMessage() {
  269. // 已在消息页面,无需跳转
  270. },
  271. // 导航到我的
  272. navigateToMine() {
  273. uni.redirectTo({
  274. url: '/pages/matchmaker-workbench/mine'
  275. })
  276. }
  277. }
  278. }
  279. </script>
  280. <style lang="scss" scoped>
  281. .matchmaker-message {
  282. min-height: 100vh;
  283. background: #FFF9F9;
  284. display: flex;
  285. flex-direction: column;
  286. }
  287. /* 顶部导航栏 */
  288. .header {
  289. display: flex;
  290. align-items: center;
  291. justify-content: space-between;
  292. padding: 25rpx 30rpx;
  293. padding-top: calc(25rpx + env(safe-area-inset-top));
  294. background: #FFF9F9;
  295. border-bottom: 1rpx solid #F0F0F0;
  296. .back-btn {
  297. width: 70rpx;
  298. height: 70rpx;
  299. display: flex;
  300. align-items: center;
  301. justify-content: center;
  302. background: rgba(240, 240, 240, 0.5);
  303. border-radius: 50%;
  304. 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>');
  305. background-size: 40rpx 40rpx;
  306. background-repeat: no-repeat;
  307. background-position: center;
  308. }
  309. .header-title {
  310. font-size: 38rpx;
  311. font-weight: bold;
  312. color: #333;
  313. }
  314. .placeholder {
  315. width: 70rpx;
  316. }
  317. }
  318. .content {
  319. flex: 1;
  320. padding: 20rpx 20rpx 120rpx;
  321. }
  322. /* 消息项 */
  323. .message-item {
  324. background: #FFFFFF;
  325. border-radius: 20rpx;
  326. padding: 25rpx;
  327. margin-bottom: 20rpx;
  328. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  329. position: relative;
  330. &.system-notification {
  331. background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
  332. border: 2rpx solid #F8BBD0;
  333. &.active {
  334. border-color: #E91E63;
  335. }
  336. .message-type {
  337. display: block;
  338. font-size: 32rpx;
  339. font-weight: bold;
  340. color: #333;
  341. margin-bottom: 15rpx;
  342. }
  343. .message-time {
  344. display: block;
  345. font-size: 24rpx;
  346. color: #999;
  347. margin-bottom: 15rpx;
  348. text-align: right;
  349. }
  350. .message-content {
  351. display: block;
  352. font-size: 28rpx;
  353. color: #333;
  354. line-height: 1.5;
  355. margin-bottom: 15rpx;
  356. }
  357. .message-footer {
  358. display: block;
  359. font-size: 24rpx;
  360. color: #666;
  361. line-height: 1.4;
  362. }
  363. }
  364. &.match-success {
  365. display: flex;
  366. background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
  367. border: 2rpx solid #D1C4E9;
  368. .message-icon {
  369. width: 60rpx;
  370. height: 60rpx;
  371. border-radius: 50%;
  372. margin-right: 20rpx;
  373. background-size: 40rpx 40rpx;
  374. background-repeat: no-repeat;
  375. background-position: center;
  376. }
  377. .message-icon.heart {
  378. background-color: #F8BBD0;
  379. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23E91E63"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
  380. }
  381. .message-body {
  382. flex: 1;
  383. }
  384. .message-type {
  385. display: block;
  386. font-size: 30rpx;
  387. font-weight: bold;
  388. color: #333;
  389. margin-bottom: 10rpx;
  390. }
  391. .message-content {
  392. display: block;
  393. font-size: 26rpx;
  394. color: #666;
  395. line-height: 1.4;
  396. }
  397. .message-time {
  398. font-size: 24rpx;
  399. color: #999;
  400. margin-top: auto;
  401. }
  402. }
  403. &.user-message {
  404. display: flex;
  405. background: #FFFFFF;
  406. border: 2rpx solid #E0E0E0;
  407. align-items: center;
  408. .message-avatar {
  409. width: 60rpx;
  410. height: 60rpx;
  411. border-radius: 50%;
  412. background: linear-gradient(135deg, #9C27B0 0%, #BA68C8 100%);
  413. color: #FFFFFF;
  414. font-size: 28rpx;
  415. font-weight: bold;
  416. display: flex;
  417. align-items: center;
  418. justify-content: center;
  419. margin-right: 20rpx;
  420. flex-shrink: 0;
  421. }
  422. .message-avatar-img {
  423. width: 60rpx;
  424. height: 60rpx;
  425. border-radius: 50%;
  426. margin-right: 20rpx;
  427. flex-shrink: 0;
  428. }
  429. .message-body {
  430. flex: 1;
  431. min-width: 0;
  432. }
  433. .message-type {
  434. display: block;
  435. font-size: 30rpx;
  436. font-weight: bold;
  437. color: #333;
  438. margin-bottom: 10rpx;
  439. }
  440. .message-content {
  441. display: block;
  442. font-size: 26rpx;
  443. color: #666;
  444. line-height: 1.4;
  445. overflow: hidden;
  446. text-overflow: ellipsis;
  447. white-space: nowrap;
  448. }
  449. .message-right {
  450. display: flex;
  451. flex-direction: column;
  452. align-items: flex-end;
  453. margin-left: 20rpx;
  454. }
  455. .message-time {
  456. font-size: 24rpx;
  457. color: #999;
  458. margin-bottom: 10rpx;
  459. }
  460. .unread-badge {
  461. background: #E91E63;
  462. color: #FFFFFF;
  463. font-size: 20rpx;
  464. padding: 4rpx 10rpx;
  465. border-radius: 20rpx;
  466. min-width: 36rpx;
  467. text-align: center;
  468. }
  469. }
  470. }
  471. /* 加载和空状态 */
  472. .loading-container,
  473. .empty-container {
  474. display: flex;
  475. justify-content: center;
  476. align-items: center;
  477. padding: 100rpx 0;
  478. color: #999;
  479. font-size: 28rpx;
  480. }
  481. /* 时间分组 */
  482. .time-group {
  483. display: flex;
  484. justify-content: center;
  485. margin: 20rpx 0;
  486. .time-label {
  487. display: inline-block;
  488. background: #FFF3E0;
  489. color: #FF9800;
  490. font-size: 24rpx;
  491. padding: 8rpx 20rpx;
  492. border-radius: 20rpx;
  493. font-weight: bold;
  494. }
  495. }
  496. /* 底部导航 */
  497. .tabbar {
  498. position: fixed;
  499. bottom: 0;
  500. left: 0;
  501. right: 0;
  502. height: 100rpx;
  503. background: #FFFFFF;
  504. border-top: 1rpx solid #F0F0F0;
  505. display: flex;
  506. justify-content: space-around;
  507. align-items: center;
  508. padding-bottom: env(safe-area-inset-bottom);
  509. .tabbar-item {
  510. display: flex;
  511. flex-direction: column;
  512. align-items: center;
  513. gap: 8rpx;
  514. padding: 10rpx 0;
  515. .tabbar-icon {
  516. width: 44rpx;
  517. height: 44rpx;
  518. background-size: contain;
  519. background-repeat: no-repeat;
  520. background-position: center;
  521. position: relative;
  522. .badge {
  523. position: absolute;
  524. top: -8rpx;
  525. right: -8rpx;
  526. background: #FF4444;
  527. color: #FFFFFF;
  528. font-size: 20rpx;
  529. font-weight: bold;
  530. width: 32rpx;
  531. height: 32rpx;
  532. display: flex;
  533. align-items: center;
  534. justify-content: center;
  535. border-radius: 16rpx;
  536. }
  537. }
  538. .tabbar-text {
  539. font-size: 20rpx;
  540. color: #999;
  541. }
  542. &.active .tabbar-text {
  543. color: #9C27B0;
  544. font-weight: bold;
  545. }
  546. &.home .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="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>');
  548. }
  549. &.home.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="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>');
  551. }
  552. &.resources .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="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>');
  554. }
  555. &.resources.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="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>');
  557. }
  558. &.trophy .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="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>');
  560. }
  561. &.trophy.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="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>');
  563. }
  564. &.message .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="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>');
  566. }
  567. &.message.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="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>');
  569. }
  570. &.mine .tabbar-icon {
  571. 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>');
  572. }
  573. &.mine.active .tabbar-icon {
  574. 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>');
  575. }
  576. }
  577. }
  578. </style>