From 5808f76456ca0d40de5074f132b73a5a488e3e13 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 09 Dec 2025 09:12:03 +0800
Subject: [PATCH] Merge branch 'refs/heads/feature/v9.0/9.0.1' into test

---
 src/page/index/index.vue |   47 +++++++++++++++++++++++++----------------------
 1 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/src/page/index/index.vue b/src/page/index/index.vue
index c761232..995cd73 100644
--- a/src/page/index/index.vue
+++ b/src/page/index/index.vue
@@ -24,23 +24,26 @@
         </div>
       </div>
     </div>
+    <GlobalWS />
     <!-- <wechat></wechat> -->
   </div>
 </template>
 <script>
-import index from '@/mixins/index'
-import wechat from './wechat.vue'
+import index from '@/mixins/index';
+import wechat from './wechat.vue';
 //import { validatenull } from 'utils/validate';
-import { mapGetters } from 'vuex'
-import tags from './tags.vue'
-import search from './search.vue'
-import logo from './logo.vue'
-import top from './top/index.vue'
-import sidebar from './sidebar/index.vue'
+import { mapGetters } from 'vuex';
+import tags from './tags.vue';
+import search from './search.vue';
+import logo from './logo.vue';
+import top from './top/index.vue';
+import sidebar from './sidebar/index.vue';
+import GlobalWS from '@/page/index/GlobalWS.vue';
 
 export default {
   mixins: [index],
   components: {
+    GlobalWS,
     top,
     logo,
     tags,
@@ -49,10 +52,10 @@
     wechat,
   },
   name: 'index',
-  provide () {
+  provide() {
     return {
       index: this,
-    }
+    };
   },
   computed: {
     ...mapGetters([
@@ -64,27 +67,27 @@
       'menu',
       'setting',
     ]),
-    validSidebar () {
+    validSidebar() {
       return !(
         (this.$route.meta || {}).menu === false || (this.$route.query || {}).menu === 'false'
-      )
+      );
     },
   },
   props: [],
   methods: {
     //打开菜单
-    openMenu (item = {}) {
+    openMenu(item = {}) {
       this.$store.dispatch('GetMenu', item.id).then(data => {
         if (data.length !== 0) {
-          this.$router.$avueRouter.formatRoutes(data, true)
+          this.$router.$avueRouter.formatRoutes(data, true);
 
           // 获取url里面的redirect
-          const redirect = decodeURIComponent(this.$route.query.redirect || '')
+          const redirect = decodeURIComponent(this.$route.query.redirect || '');
           if (redirect) {
-            console.log('redirect', redirect)
-            const [path, queryString] = redirect.split('?')
-            const query = queryString ? Object.fromEntries(new URLSearchParams(queryString)) : {}
-            this.$router.push({ path, query })
+            console.log('redirect', redirect);
+            const [path, queryString] = redirect.split('?');
+            const query = queryString ? Object.fromEntries(new URLSearchParams(queryString)) : {};
+            this.$router.push({ path, query });
           }
         }
         //当点击顶部菜单后默认打开第一个菜单
@@ -108,10 +111,10 @@
             }, itemActive.meta)
           });
         }*/
-      })
+      });
     },
   },
-}
+};
 </script>
 
 <style lang="scss" scoped>
@@ -130,6 +133,6 @@
   background: transparent;
   padding: 0 10px;
   --el-color-primary: rgba(20, 65, 255, 1);
-    height: pxToVh(55);
+  height: pxToVh(55);
 }
 </style>

--
Gitblit v1.9.3