qx
3 天以前 201e38e8f961269c3961e0709563338536196242
src/main.js
@@ -17,7 +17,7 @@
import "./assets/icons";
import "./permission";
import { getDicts } from "@/api/system/dict/data";
import { getConfigKey, yidu } from "@/api/system/config";
import { getConfigKey,yidu } from "@/api/system/config";
import {
  parseTime,
  resetForm,
@@ -97,7 +97,7 @@
};
// 全局通知方法,添加“已读”按钮
Vue.prototype.$showNotification = function (type, title, message, onClick, noticeId) {
 Vue.prototype.$showNotification = function (type, title, message, onClick, noticeId) {
  console.log('触发通知:', { type, title, message, noticeId, noticeIdType: typeof noticeId }); // 调试:记录 noticeId 和类型
  const h = this.$createElement;
  const notification = this.$notify({
@@ -136,6 +136,7 @@
  notificationManager.addNotification(notification); // 添加到通知管理
};
// 监听路由变化
router.afterEach(() => {
  console.log('路由切换完成,当前路径:', router.currentRoute.path);
@@ -149,7 +150,7 @@
  router,
  store,
  render: (h) => h(App),
  mounted() {
 mounted() {
    const token = store.state.user.token || Cookies.get('token') || '';
    if (token && !isWebSocketInitialized) {
      console.log('初始化 WebSocket,Token:', token);