Преглед на файлове

fix:修改长链接刷新调用

贾宇博 преди 1 месец
родител
ревизия
4d873c9873
променени са 3 файла, в които са добавени 12 реда и са изтрити 4 реда
  1. 1 1
      src/layout/components/Sidebar/index.vue
  2. 9 0
      src/layout/index.vue
  3. 2 3
      src/views/equity/message/index.vue

+ 1 - 1
src/layout/components/Sidebar/index.vue

@@ -79,6 +79,6 @@ const unreadCount = ref(0);  // 存储未读消息数量
 onMounted(() => {
   // getOnList();
   
-  sidebarStore.getOnList()
+  // sidebarStore.getOnList()
 });
 </script>

+ 9 - 0
src/layout/index.vue

@@ -21,8 +21,12 @@ import defaultSettings from '@/settings'
 
 import useAppStore from '@/store/modules/app'
 import useSettingsStore from '@/store/modules/settings'
+import useSidebarStore from "@/store/modules/sidebar";
+
+import { onMounted } from 'vue'
 
 const settingsStore = useSettingsStore()
+const sidebarStore = useSidebarStore()
 const theme = computed(() => settingsStore.theme);
 const sideTheme = computed(() => settingsStore.sideTheme);
 const sidebar = computed(() => useAppStore().sidebar);
@@ -60,6 +64,11 @@ const settingRef = ref(null);
 function setLayout() {
   settingRef.value.openSetting();
 }
+
+onMounted(() =>{
+  console.log('系统刷新》》》》》》》》');
+  sidebarStore.getOnList()
+})
 </script>
 
 <style lang="scss" scoped>

+ 2 - 3
src/views/equity/message/index.vue

@@ -391,7 +391,7 @@ function handleRead(row) {
   proxy.$modal.confirm('是否确认将消息状态设置为已读?')
     .then(() => MessageSetRead(_equityMessageIds))  // 调用API
     .then(() => {
-      sidebarStore.getOnList()
+      // sidebarStore.getOnList()
       proxy.$modal.msgSuccess("设置成功");
       getList();
     })
@@ -412,7 +412,7 @@ const handleCellClick = (row, column) => {
       MessageSetRead(row.equityMessageId)
         .then(response => {
           proxy.$modal.msgSuccess("消息已标记为已读");
-          sidebarStore.getOnList()
+          // sidebarStore.getOnList()
           row.isRead = '1'; // 前端同步更新状态,防止重复调用
         })
         .catch(error => {
@@ -445,7 +445,6 @@ const cellStyle = ({ row, column, rowIndex, columnIndex }) => {
 
 
 
-
 getList();
 </script>
 <style scoped>