You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

809 lines
22 KiB

5 months ago
5 months ago
2 months ago
2 months ago
2 months ago
5 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <script setup>
  2. import {computed, onMounted, ref} from 'vue'
  3. import {useRoute, useRouter} from 'vue-router'
  4. import {ElMessage} from 'element-plus'
  5. import ChangePassword from '@/components/dialogs/changePassword.vue'
  6. import {useAdminStore} from '@/store'
  7. import {storeToRefs} from 'pinia'
  8. import {filterMenu, getRoutePath} from "@/utils/menuUtils.js";
  9. import API from '@/util/http.js'
  10. import bell from '@/assets/SvgIcons/bell.svg'
  11. import noMessage from '@/assets/images/no-message.svg'
  12. import goTop from '@/assets/SvgIcons/go-top.svg'
  13. import {getOrderPage} from '@/utils/goToCheck.js'
  14. import {groupMessages} from "@/utils/getMessage.js"
  15. import {findMenuById,permissionMapping} from "@/utils/menuTreePermission.js"
  16. import {useMessageStore} from '@/store/index.js'
  17. // ------------------ ICONS ------------------
  18. const icons = import.meta.glob('@/assets/SvgIcons/*.svg', {eager: true})
  19. const menuNameMap = {
  20. '工作台': 'workbench',
  21. '金币管理': 'gold-management',
  22. '现金管理': 'cash-management',
  23. '活动管理': 'activity-management',
  24. '频道管理': 'channel-management',
  25. '权限管理': 'permission-management',
  26. }
  27. const getIconPath = (menuName) => {
  28. const englishName = menuNameMap[menuName] || menuName;
  29. const possibleKeys = [
  30. `@/assets/SvgIcons/${englishName}.svg`,
  31. `./SvgIcons/${englishName}.svg`,
  32. `/src/assets/SvgIcons/${englishName}.svg`
  33. ]
  34. for (const key of possibleKeys) {
  35. if (icons[key]) {
  36. const iconModule = icons[key]
  37. return iconModule.default || iconModule
  38. }
  39. }
  40. }
  41. // ------------------ 刷新数据 ------------------
  42. const refreshData = async () => {
  43. try {
  44. ElMessage({message: '数据刷新中,请稍候...', type: 'info'});
  45. const response = await API({url: '/Mysql', method: 'POST', data: {}});
  46. if (response && response.code === 200) {
  47. const currentRoute = route.fullPath;
  48. router.replace('/blank');
  49. setTimeout(() => router.replace(currentRoute), 10);
  50. ElMessage.success('数据刷新成功');
  51. } else {
  52. ElMessage.error('数据刷新失败:' + (response?.msg || '未知错误'));
  53. }
  54. } catch (error) {
  55. console.error(error)
  56. ElMessage.error('数据刷新异常,请重试');
  57. }
  58. }
  59. // ------------------ 菜单逻辑 ------------------
  60. const route = useRoute()
  61. const router = useRouter()
  62. const adminStore = useAdminStore()
  63. const {adminData, menuTree, flag} = storeToRefs(adminStore)
  64. const menuList = ref(filterMenu(menuTree.value))
  65. function findBestMatch(menuList, path) {
  66. let bestMatch = ''
  67. function traverse(menus) {
  68. for (const item of menus) {
  69. const itemPath = getRoutePath(item)
  70. if (path.startsWith(itemPath) && itemPath.length > bestMatch.length) {
  71. bestMatch = itemPath
  72. }
  73. if (item.children?.length) traverse(item.children)
  74. }
  75. }
  76. traverse(menuList)
  77. return bestMatch || path
  78. }
  79. const activeMenu = computed(() => findBestMatch(menuList.value, route.path))
  80. // ------------------ 用户信息 / 密码修改 ------------------
  81. const messageVisible = ref(false)
  82. const openMessage = () => (messageVisible.value = true)
  83. const closeMessage = () => (messageVisible.value = false)
  84. const message = function () {
  85. openMessage()
  86. }
  87. const showPasswordDialog = ref(false)
  88. const pwdRef = ref()
  89. const openChangePassword = () => (showPasswordDialog.value = true)
  90. const onPwdDialogClosed = () => pwdRef.value?.resetFields()
  91. // ------------------ 退出登录 ------------------
  92. function logout() {
  93. const machineId = localStorage.getItem('machineId')
  94. localStorage.removeItem('token')
  95. adminStore.clearState()
  96. router.push('/login?machineId=' + machineId)
  97. ElMessage.success('退出成功')
  98. }
  99. // ------------------ 员工数据开关 ------------------
  100. const toggleFlag = () => {
  101. const newFlag = flag.value === 1 ? 0 : 1
  102. adminStore.setFlag(newFlag)
  103. ElMessage.success(newFlag === 1 ? '员工数据已隐藏' : '员工数据已显示')
  104. }
  105. // ------------------ 消息中心(完全修复版) ------------------
  106. const messageStore = useMessageStore()
  107. const {messages} = storeToRefs(messageStore)
  108. //根据用户id查询消息状态
  109. const selectStatusById = () => {
  110. // 定义权限检查函数
  111. const hasPermission = (permission) => findMenuById(menuTree.value, permission);
  112. // 初始化状态数组
  113. const status = [];
  114. // ===== 收款流程状态 =====
  115. // 地区财务收款待审核
  116. if (hasPermission(permissionMapping.area_finance_collection_pending)) {
  117. status.push(0);
  118. }
  119. // 地区负责人收款待审核
  120. else if (hasPermission(permissionMapping.area_manager_collection_pending)) {
  121. status.push(0);
  122. }
  123. // ===== 退款流程状态 =====
  124. // 地区财务退款审核
  125. if (hasPermission(permissionMapping.audit_area_finance_refund)) {
  126. status.push(10);
  127. }
  128. // 地区负责人退款审核
  129. else if (hasPermission(permissionMapping.audit_area_manager_refund)) {
  130. status.push(20);
  131. }
  132. // 总部财务退款审核
  133. else if (hasPermission(permissionMapping.audit_headquarters_refund)) {
  134. status.push(30);
  135. }
  136. // 执行人待处理
  137. else if (hasPermission(permissionMapping.view_execution_details)) {
  138. status.push(40);
  139. }
  140. // 去重并返回结果(单一角色下实际不会有重复)
  141. return [...new Set(status)];
  142. };
  143. console.log('权限测试',selectStatusById());
  144. // 获取消息
  145. const getMessage = async () => {
  146. try {
  147. let params = selectStatusById();
  148. const res = await API({
  149. url: '/getMessage',
  150. method: 'POST',
  151. data: params
  152. });
  153. if (res?.data) {
  154. const cleanList = res.data.filter(i => i.flag !== 1)
  155. messageStore.setMessages(cleanList)
  156. }
  157. } catch (e) {
  158. console.error("getMessage error:", e)
  159. }
  160. }
  161. // 点击铃铛 → 打开弹窗并刷新
  162. const showMessageDialog = ref(false)
  163. const openMessageDialog = async () => {
  164. showMessageDialog.value = true
  165. await getMessage() // 等待消息更新
  166. }
  167. // 关闭消息窗口
  168. const closeMessageDialog = () => showMessageDialog.value = false
  169. // 小红点(完全响应式)
  170. const messageDot = computed(() => messages.value.length > 0)
  171. // 消息数量(完全响应式)
  172. const messageNum = computed(() => messages.value.length)
  173. // 按日期分组(computed)
  174. const messageList = computed(() => groupMessages(messages.value))
  175. // 按日期生成最终结构(computed)
  176. const groupedMessages = computed(() => {
  177. const result = {}
  178. messageList.value.forEach(item => {
  179. if (!result[item.group]) result[item.group] = []
  180. result[item.group].push(item)
  181. })
  182. return result
  183. })
  184. // 显示全部 or 显示前两条
  185. const showAll = ref(false)
  186. const displayMessages = computed(() => {
  187. if (showAll.value) return groupedMessages.value
  188. let count = 0
  189. const limited = {}
  190. const groupOrder = ['今天', '昨天', '更早']
  191. for (const g of groupOrder) {
  192. const group = groupedMessages.value[g]
  193. if (!group) continue
  194. limited[g] = []
  195. for (const item of group) {
  196. if (count < 2) {
  197. limited[g].push(item)
  198. count++
  199. }
  200. }
  201. if (limited[g].length === 0) delete limited[g]
  202. if (count >= 2) break
  203. }
  204. return limited
  205. })
  206. const toggleShowAll = () => showAll.value = !showAll.value
  207. // 返回顶部
  208. const scrollContainer = ref(null)
  209. const scrollToTop = () => scrollContainer.value?.scrollTo({top: 0, behavior: 'smooth'})
  210. // 点击消息 → 已读 + 跳转
  211. const handleMessageClick = async (item) => {
  212. const res = await API({
  213. url: '/getMessage/update',
  214. method: 'POST',
  215. data: {id: item.id}
  216. });
  217. if (res.code === 200) {
  218. closeMessageDialog()
  219. await router.push(getOrderPage(item.status))
  220. await getMessage()
  221. ElMessage.success('跳转成功')
  222. } else {
  223. ElMessage.error('跳转失败')
  224. }
  225. }
  226. onMounted(() => getMessage())
  227. </script>
  228. <template>
  229. <div class="main-container">
  230. <!-- 背景毛玻璃层作为内容容器 -->
  231. <div class="background-glass">
  232. <!-- 侧边栏 -->
  233. <div class="sidebar-container">
  234. <el-aside class="sidebar-layout">
  235. <div class="logo">
  236. <img src="../assets/logo.png" alt="logo" style="width: 9vh; height: 9vh"/>
  237. </div>
  238. <div class="menu-scroll-container">
  239. <el-menu :router="true" :default-active="activeMenu" style="min-height: 80vh;border:none;">
  240. <!-- 递归渲染菜单层级 -->
  241. <template v-for="menu in menuList" :key="menu.id">
  242. <!-- 有子菜单的父级菜单menuType=2 且存在children -->
  243. <el-sub-menu v-if="menu.children && menu.children.length > 0" :index="menu.id.toString()">
  244. <template #title>
  245. <img
  246. :src="getIconPath(menu.menuName)"
  247. :alt="`${menu.menuName}图标`"
  248. style="width: 4vh; height: 4vh; margin-right: 4px;"
  249. >
  250. <span>{{ menu.menuName }}</span>
  251. </template>
  252. <!-- 子菜单 -->
  253. <template v-for="child in menu.children" :key="child.id">
  254. <!-- 子菜单为叶子节点无children -->
  255. <el-menu-item v-if="!child.children || child.children.length === 0" :index="getRoutePath(child)">
  256. <el-icon style="margin-right: 4px;">
  257. <Folder/>
  258. </el-icon>
  259. <span>{{ child.menuName }}</span>
  260. </el-menu-item>
  261. <!-- 子菜单有下级 -->
  262. <el-sub-menu v-else :index="child.id.toString()">
  263. <template #title>
  264. <el-icon style="margin-right: 4px;">
  265. <Folder/>
  266. </el-icon>
  267. <span>{{ child.menuName }}</span>
  268. </template>
  269. <!-- 递归 下一级-->
  270. <template v-for="grandChild in child.children" :key="grandChild.id">
  271. <el-menu-item :index="getRoutePath(grandChild)">
  272. <el-icon style="margin-right: 4px;">
  273. <Folder/>
  274. </el-icon>
  275. <span>{{ grandChild.menuName }}</span>
  276. </el-menu-item>
  277. </template>
  278. </el-sub-menu>
  279. </template>
  280. </el-sub-menu>
  281. <!-- 无子菜单的一级菜单 -->
  282. <el-menu-item v-else :index="getRoutePath(menu)">
  283. <img
  284. :src="getIconPath(menu.menuName)"
  285. :alt="`${menu.menuName}图标`"
  286. style="width: 4vh; height: 4vh; margin-right: 4px;"
  287. >
  288. <span>{{ menu.menuName }}</span>
  289. </el-menu-item>
  290. </template>
  291. </el-menu>
  292. </div>
  293. <div style="display: flex">
  294. <!-- 底部固定的设置中心 -->
  295. <div class="settings-container">
  296. <el-dropdown placement="top-start">
  297. <span class="el-dropdown-link">
  298. <!-- 暂时使用静态路径确保设置图标正常显示 -->
  299. <img src="@/assets/SvgIcons/setting.svg" alt="设置" style="width: 4vh; height: 4vh"/>
  300. <span>设置中心</span>
  301. <el-icon class="arrow-icon">
  302. <ArrowUp/>
  303. </el-icon>
  304. </span>
  305. <template #dropdown>
  306. <el-dropdown-menu>
  307. <!-- <el-dropdown-item @click="refreshData()">数据刷新</el-dropdown-item>-->
  308. <!-- 员工数据开关 -->
  309. <el-dropdown-item @click="toggleFlag()">
  310. {{ flag === 1 ? '显示员工数据' : '隐藏员工数据' }}
  311. </el-dropdown-item>
  312. <el-dropdown-item @click="message()">查看个人信息</el-dropdown-item>
  313. <el-dropdown-item @click="openChangePassword">修改密码</el-dropdown-item>
  314. <el-dropdown-item @click="logout">退出登录</el-dropdown-item>
  315. </el-dropdown-menu>
  316. </template>
  317. </el-dropdown>
  318. </div>
  319. <!-- 消息提示 这里的 小红点不用el-badge 他在切换状态会抽一下 应该是dom问题 -->
  320. <div class="message-container">
  321. <div style="position: relative;">
  322. <el-image :src="bell" style="width: 28px; height: 28px;" @click="openMessageDialog"></el-image>
  323. <span v-show="messageDot" class="dot"></span>
  324. </div>
  325. </div>
  326. </div>
  327. </el-aside>
  328. </div>
  329. <!-- 右侧内容区域 -->
  330. <div class="content-container">
  331. <!-- 头部
  332. <el-header class="header">
  333. </el-header> -->
  334. <!-- 主内容区域 -->
  335. <div class="main-area">
  336. <el-main>
  337. <router-view></router-view>
  338. </el-main>
  339. </div>
  340. </div>
  341. </div>
  342. <!-- 查看个人信息 -->
  343. <el-dialog v-model="messageVisible" title="查看个人信息" width="500px">
  344. <el-form :model="adminData">
  345. <el-form-item label="用户姓名" label-width="100px" label-position="left">
  346. <span class="message-font">{{ adminData.adminName }}</span>
  347. </el-form-item>
  348. <el-form-item label="精网号" label-width="100px" label-position="left">
  349. <span class="message-font">{{ adminData.account }}</span>
  350. </el-form-item>
  351. <el-form-item label="地区" label-width="100px" label-position="left">
  352. <span class="message-font">{{ adminData.markets }}</span>
  353. </el-form-item>
  354. <el-form-item label="注册时间" label-width="100px" label-position="left">
  355. <span class="message-font">{{ adminData.createTime }}</span>
  356. </el-form-item>
  357. </el-form>
  358. <template #footer>
  359. <div>
  360. <el-button text @click="closeMessage()">关闭</el-button>
  361. </div>
  362. </template>
  363. </el-dialog>
  364. <!-- 自定义密码修改弹窗组件 -->
  365. <el-dialog v-model="showPasswordDialog" :center="true" width="470px" @closed="onPwdDialogClosed">
  366. <ChangePassword ref="pwdRef" @confirm="showPasswordDialog = false"/>
  367. </el-dialog>
  368. <!--消息推送的弹窗-->
  369. <el-dialog style="background: #F3FAFE" v-model="showMessageDialog" title="" width="500px">
  370. <div class="message-title">
  371. <el-divider
  372. class="divider"
  373. direction="vertical"
  374. ></el-divider>
  375. 消息中心 ({{ messageNum }})
  376. </div>
  377. <!-- todo 这是为了样式显示 一定要改逻辑-->
  378. <div v-if="messageNum === 0">
  379. <div class="no-message">
  380. <el-image :src="noMessage"></el-image>
  381. <p class="no-message-text">暂无未办消息快去处理工作吧</p>
  382. </div>
  383. </div>
  384. <div v-else
  385. ref="scrollContainer"
  386. style="max-height: 60vh; overflow-y: auto;">
  387. <!-- 按时间分组的消息列表 -->
  388. <div
  389. v-for="(group, time) in displayMessages"
  390. :key="time"
  391. style="margin-bottom: 16px;"
  392. >
  393. <div class="time-header">
  394. {{ time }} <span class="little-dot"></span>
  395. <el-divider
  396. style="height: 2px; align-self: stretch;flex: 1;background: #CEE5FE; border: none;"
  397. ></el-divider>
  398. </div>
  399. <div
  400. v-for="item in group"
  401. :key="item.id"
  402. class="message-item"
  403. >
  404. <div style="display: flex; margin-bottom: 10px">
  405. <span class="red-dot"></span>
  406. <span class="message-card-title">{{ item.title }}</span>
  407. <div
  408. class="message-time"
  409. :style="{ color: item.czTime.includes('分钟') ? 'red' : '' }"
  410. >
  411. {{ item.czTime }}
  412. </div>
  413. </div>
  414. <p class="message-desc">{{ item.desc }}</p>
  415. <el-button
  416. type="primary"
  417. style="margin: 0 auto; display: block;"
  418. @click="handleMessageClick(item)"
  419. >
  420. 前往查看
  421. </el-button>
  422. </div>
  423. <el-divider
  424. style="height: 1px; align-self: stretch;flex: 1;background: #CEE5FE; border: none;"
  425. ></el-divider>
  426. </div>
  427. <!-- 控制按钮 -->
  428. <div>
  429. <el-button
  430. type="text"
  431. v-if="messageNum > 2"
  432. class="view-all"
  433. @click="toggleShowAll"
  434. >
  435. {{ showAll ? '收起' : '查看全部' }}
  436. </el-button>
  437. <div v-if="showAll" @click="scrollToTop" class="go-top">
  438. <el-image
  439. :src="goTop"
  440. style="width: 20px; height: 20px;"
  441. fit="contain"
  442. />
  443. <span>返回顶部</span>
  444. </div>
  445. </div>
  446. </div>
  447. </el-dialog>
  448. </div>
  449. </template>
  450. <style scoped>
  451. /* 主容器,设置背景图并居中 */
  452. .main-container {
  453. position: fixed;
  454. top: 0;
  455. left: 0;
  456. right: 0;
  457. bottom: 0;
  458. background-image: url('@/assets/backgroundBlue.png');
  459. background-size: cover;
  460. background-position: center center;
  461. background-repeat: no-repeat;
  462. overflow: hidden;
  463. }
  464. /* 背景毛玻璃层(作为内容容器) */
  465. .background-glass {
  466. position: absolute;
  467. top: 1vh;
  468. left: 1vh;
  469. right: 1vh;
  470. bottom: 1vh;
  471. background-image: url('@/assets/blue-background.png');
  472. background-size: cover;
  473. z-index: 1;
  474. display: flex;
  475. flex-direction: row;
  476. padding: 10px;
  477. border-radius: 12px;
  478. }
  479. /* 侧边栏容器 */
  480. .sidebar-container {
  481. flex-shrink: 0;
  482. }
  483. .logo {
  484. display: flex;
  485. align-items: center;
  486. justify-content: center;
  487. height: 12vh;
  488. }
  489. /* 中间可滚动菜单容器 */
  490. .menu-scroll-container {
  491. flex: 1;
  492. overflow-y: auto;
  493. padding: 10px 0;
  494. }
  495. /* 底部设置中心样式 */
  496. .settings-container {
  497. padding: 10px 0 10px 20px; /* 上,右, 下,左 */
  498. display: flex;
  499. align-items: center; /* 垂直居中 */
  500. }
  501. /* 调整下拉菜单的样式,确保它向上弹出 */
  502. .el-dropdown-link:focus {
  503. /* 移除底部的异常效果 */
  504. outline: none;
  505. text-decoration: none;
  506. }
  507. .el-dropdown-link {
  508. display: flex;
  509. align-items: center;
  510. cursor: pointer;
  511. gap: 10px; /* 图标和文字左右间距 */
  512. }
  513. .sidebar-layout {
  514. width: 15vw;
  515. height: 100%;
  516. background: #E7F4FD; /* 浅蓝色背景 */
  517. /* backdrop-filter: blur(5px); 毛玻璃效果 --消耗性能 */
  518. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* 添加阴影增强层次感 */
  519. border-radius: 12px;
  520. display: flex;
  521. flex-direction: column;
  522. position: relative;
  523. transition: all 0.3s ease;
  524. }
  525. /* 内容区域容器 */
  526. .content-container {
  527. flex: 1;
  528. display: flex;
  529. flex-direction: column;
  530. margin-left: 5px;
  531. gap: 5px;
  532. height: 100%;
  533. overflow: hidden;
  534. }
  535. /* 主内容区域容器 */
  536. .main-area {
  537. flex: 1;
  538. background: #E7F4FD;
  539. /* 半透明浅色背景 */
  540. /* backdrop-filter: blur(5px); */
  541. /* 毛玻璃效果 */
  542. border-radius: 12px;
  543. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  544. /* 添加阴影增强层次感 */
  545. overflow: hidden;
  546. display: flex;
  547. flex-direction: column;
  548. }
  549. /* 主内容区域样式 */
  550. .el-main {
  551. height: 100%;
  552. padding: 1px 8px 10px 8px;
  553. background: transparent;
  554. overflow-y: auto;
  555. /* 应用自定义滚动条 */
  556. }
  557. /* 确保el-menu撑满容器 */
  558. .sidebar-layout .el-menu {
  559. width: 100%;
  560. }
  561. /* 侧边栏菜单样式 适配浅色背景 */
  562. .el-menu {
  563. background: transparent !important;
  564. }
  565. /* 工作台,金币管理,现金管理 */
  566. ::v-deep(.el-sub-menu__title:hover),
  567. ::v-deep(.el-menu-item:hover) {
  568. background: #E5EBFE;
  569. }
  570. /* 子菜单展开时和背景同色 */
  571. ::v-deep(.el-sub-menu__title),
  572. ::v-deep(.el-menu-item) {
  573. background: #E7F4FD;
  574. }
  575. .message-font {
  576. /* 个人信息字体样式 */
  577. font-size: 16px;
  578. font-weight: bold;
  579. }
  580. /* 确保全局el-container适应容器 */
  581. :deep(.el-container) {
  582. /* vue3的深度选择器,用于覆盖element-plus的默认样式 */
  583. min-height: 100%;
  584. width: 100%;
  585. background: transparent;
  586. }
  587. /* 为侧边栏和主内容区域添加滚动条样式 */
  588. .menu-scroll-container,
  589. .el-main {
  590. scrollbar-width: thin;
  591. /* Firefox */
  592. scrollbar-color: rgba(0, 0, 0, 0.3) rgba(255, 255, 255, 0.2);
  593. /* Firefox滑块和轨道颜色 */
  594. }
  595. /* 小红点 */
  596. .dot {
  597. position: absolute;
  598. top: -2px;
  599. right: -2px;
  600. width: 8px;
  601. height: 8px;
  602. background: #F23C39;
  603. border-radius: 50%;
  604. }
  605. /* 消息中心整体容器 */
  606. .message-container {
  607. padding: 10px 50px 10px 50px; /* 上,右, 下,左 */
  608. display: flex;
  609. align-items: center; /* 垂直居中 */
  610. }
  611. /* 消息中心标题 */
  612. .message-title {
  613. display: flex;
  614. font-size: 16px;
  615. color: black;
  616. .divider {
  617. align-items: flex-start;
  618. gap: 36px;
  619. align-self: stretch;
  620. height: 20px;
  621. border-left: 3px solid #266EFF;
  622. }
  623. }
  624. /* 无消息的样式 */
  625. .no-message {
  626. text-align: center;
  627. position: relative;
  628. .no-message-text {
  629. position: absolute;
  630. top: 60%;
  631. left: 50%;
  632. /* 水平垂直居中 */
  633. transform: translate(-50%, -50%);
  634. /* 文字样式 */
  635. font-weight: bold;
  636. margin: 0;
  637. /* 可添加更多样式(如字体大小、阴影等) */
  638. font-size: 14px;
  639. }
  640. }
  641. /* 有消息的样式 */
  642. .time-header {
  643. font-size: 14px;
  644. color: #666;
  645. display: flex;
  646. align-items: center;
  647. gap: 8px;
  648. }
  649. .message-item {
  650. height: 100px;
  651. padding: 10px 10px 10px 10px;
  652. border-radius: 4px;
  653. border: 1px solid #E5E5E5;
  654. background: #FCFEFF;
  655. margin-bottom: 10px;
  656. }
  657. .message-card-title {
  658. font-weight: bold;
  659. margin-right: 4px;
  660. }
  661. /* 圆点样式 */
  662. .red-dot {
  663. width: 6px;
  664. height: 6px;
  665. margin-right: 9px;
  666. border-radius: 50%;
  667. background-color: red;
  668. }
  669. .message-desc {
  670. font-size: 13px;
  671. color: #666;
  672. margin: 4px 0 15px 15px;
  673. }
  674. .message-time {
  675. margin-left: auto;
  676. font-size: 13px;
  677. color: #999;
  678. }
  679. .view-all {
  680. display: block;
  681. margin: 0 auto 16px;
  682. }
  683. .little-dot {
  684. display: inline-block;
  685. width: 8px; /* 圆点直径 */
  686. height: 8px;
  687. border-radius: 50%; /* 圆形 */
  688. background-color: #CEE5FE;;
  689. }
  690. /* 返回最上*/
  691. .go-top {
  692. display: flex;
  693. flex-direction: column;
  694. align-items: center;
  695. gap: 4px;
  696. cursor: pointer;
  697. padding: 8px;
  698. }
  699. </style>