CzRger пре 7 месеци
родитељ
комит
c16202b987
2 измењених фајлова са 9 додато и 1 уклоњено
  1. 1 1
      src/router/index.ts
  2. 8 0
      src/views/web/list/index.vue

+ 1 - 1
src/router/index.ts

@@ -73,7 +73,7 @@ export const initMainRouter = async () => {
             router.addRoute(manageRouter)
         }
         themeConfig = {
-            mainColor: '#2E81FF',
+            mainColor: '#f82828',
             logo: 'https://element-plus.org/images/element-plus-logo.svg',
             title: '海南社管智慧搜索平台',
             subTitle: 'HAI NAN SHE GUAN ZHI HUI SOU SUO PING TAI'

+ 8 - 0
src/views/web/list/index.vue

@@ -404,7 +404,15 @@ onMounted(() => {
     if (index) {
       state.cascaderParams.value = index.split(',').map(v => Number(v))
     }
+    let loading = null
     const ws: any = new WebSocket('/ws-api/smart-ws?userId=1388061846031220738')
+    ws.onerror = () => {
+      loading = ElLoading.service({
+          lock: true,
+          text: '智搜服务连接失败……',
+          background: 'rgba(0, 0, 0, 0.7)',
+      })
+    }
     let sessionId = ''
     let lastCountParams = ''
     let lastCountStep = 0