wenhongquan преди 3 години
родител
ревизия
ebdf1e72ac

+ 5 - 4
.env.dev

@@ -2,14 +2,15 @@
 
 NODE_ENV = development
 
-VITE_API_SERVER = 'http://61.147.254.211:30876'
-VITE_MAP_SERVER = 'http://61.147.254.211:21009'
+VITE_API_SERVER = 'http://10.11.208.17:30876'
+VITE_MAP_SERVER = 'http://10.11.208.19:21009'
+VITE_MAP_KEY = '38025fbc9e3f4e1fb64b34b2b55080ab'
 VITE_LOGIN_SERVER = 'http://10.11.208.32:9999'
+
 VITE_DH_SERVER = 'http://sqdh.xt.wenhq.top:8083'
 VITE_SP_USER = 'huashe1'
-VITE_MAP_KEY = '38025fbc9e3f4e1fb64b34b2b55080ab'
 VITE_MAP_SOLUTION = '12887'
 VITE_URL_YXJC = 'http://10.11.208.13:30080/tles-hcdp-web/#/OperationMonitoring'
 VITE_URL_ZHDD = 'http://10.11.208.13:30080/tles-hcdp-web/#/HCdpView'
 VITE_URL_YJZH = 'http://10.11.208.12:31000/sqpchd/#/home'
-VITE_URL_YXJCS = 'http://10.11.208.39:9999/screen/#/home/country-home'
+VITE_URL_YXJCS = 'http://10.11.208.39:9999/screen/#/home/country-home'

+ 7 - 8
index.html

@@ -15,19 +15,19 @@
     <script src="./lib/jsencrypt.min.js"></script>
     <!-- <script src="./flexible.js"></script> -->
     <script src="./login.js?time=2"></script>
-    <script src="./webClient/defaultConfig.js?time=111"></script>
-    <script src="./webClient/initWebSocket.js?time=111"></script>
-    <script src="./webClient/webClient_initWnd.js?time=114"></script>
+    <script src="./webClient/defaultConfig.js?time=113"></script>
+    <script src="./webClient/initWebSocket.js?time=113"></script>
+    <script src="./webClient/webClient_initWnd.js?time=1167"></script>
 
 
 
     <!--    <script src="../webClient/defaultConfig.js"></script>-->
     <!--    <script src="../webClient/initWebSocket.js"></script>-->
     <!--    <script src="../webClient/webClient_initWnd.js"></script>-->
-    <script src="./js/common.js?time=1"></script>
+    <script src="./js/common.js?time=3"></script>
 
-    <script src="./meeting.js?time=1"></script>
-    <script src="./js/videoplay.js?time=1"></script>
+    <script src="./meeting.js?time=14"></script>
+    <script src="./js/videoplay.js?time=2"></script>
 
     <!-- <script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.g6-3.1.1/build/g6.js"></script> -->
     <link rel="stylesheet" href="<%- mapurl %>/minemapapi/v2.1.0/minemap.css">
@@ -112,7 +112,6 @@
                 function() {
                     // debugger
                     clearInterval(tid);
-                    // console.log("------------")
                     tid = setInterval(refreshRem, 300);
                 },
                 false,
@@ -133,4 +132,4 @@
     <script type="module" src="/src/main.ts"></script>
 </body>
 
-</html>
+</html>

+ 5 - 5
public/js/common.js

@@ -1,9 +1,9 @@
 var setting = {
     username: window.spuser,
-    password: 'huashe123',
-    ip: '10.55.134.3',
-    host: 'http',
-    port: '6699',
+    password: "huashe123",
+    ip: "10.55.134.30",
+    host: "http",
+    port: "8314",
 };
 setting.URL = setting.host + "://" + setting.ip + ":" + setting.port;
-localStorage.setItem("url", setting.URL);
+localStorage.setItem("url", setting.URL);

+ 179 - 179
public/main.js

@@ -3,9 +3,9 @@
 var setting = {
     username: window.spuser,
     password: "huashe123",
-    ip: "10.55.134.3",
+    ip: "10.55.134.30",
     host: "http",
-    port: "6699",
+    port: "8314",
 };
 
 setting.URL = setting.host + "://" + setting.ip + ":" + setting.port;
@@ -13,180 +13,180 @@ setting.URL = setting.host + "://" + setting.ip + ":" + setting.port;
 localStorage.setItem("url", setting.URL);
 
 window.onload = () => {
-    window.addEventListener(
-        "message",
-        async(e) => {
-            // 指定域名 防止xss 攻击
-            //   if (e.origin != "") return;
-
-            if (e.data === "onload") {
-                // 登陆 && 保活
-                var package = new Package(setting.URL, {
-                    username: setting.username,
-                    password: setting.password,
-                });
-                if (localStorage.getItem('token')) {
-                    await package.keepalive();
-                } else {
-                    await package.login();
-                }
-            }
-            // 打开单兵视频
-            if (e.data.key === "danbing") {
-                const meeting = new Meeting();
-                await meeting.getLocalUserInfo();
-                const res = await meeting.queryUser(e.data.value);
-
-                meeting.localUserInfo.name = "danbing_Meeting";
-
-                await meeting.creatMeeting();
-                await meeting.startInvite({
-                    userName: res.userName,
-                    userId: res.userCode,
-                    region: res.paasId,
-                    type: "single",
-                    // speak:'true',
-                    number: res.userPhone,
-                    deviceId: e.data.deviceId,
-                    channelId: e.data.channelId,
-                });
-                $(".video-container").css({
-                    visibility: "visible"
-                })
-                await meeting.openClient(
-                    () => {
-
-                        $(".video-action").one("click", () => {
-                            meeting.closeClient();
-                            meeting.closeVideo();
-                            meeting.deleteMeeting();
-                            $(".video-container").css({
-                                visibility: "hidden"
-                            })
-                            window.parent.postMessage("closeIframe", "*");
-                        })
-                        meeting.playVideo({
-                            type: "single",
-                            number: res.userPhone,
-                            deviceId: e.data.deviceId,
-                            channelId: e.data.channelId,
-                        })
-                    }
-                )
-            } else if (e.data.key === "video") {
-                const meeting = new Meeting();
-                console.log(e.data.channelId);
-                $(".video-container").css({
-                    visibility: "visible"
-                })
-                await meeting.openClient(
-                    () => {
-                        $(".video-action").one("click", () => {
-                            meeting.closeClient();
-                            meeting.closeVideo();
-                            meeting.deleteMeeting();
-                            $(".video-container").css({
-                                visibility: "hidden"
-                            })
-                            window.parent.postMessage("closeIframe", "*");
-                        })
-                        meeting.playVideo({
-                            type: "single",
-                            deviceId: e.data.deviceId,
-                            channelId: e.data.channelId,
-                        })
-                    }
-                )
-            }
-
-            // 视频会议
-            if (e.data === "creatMeeting") {
-                const meeting = new Meeting();
-
-                // close video meeting iframe
-                $("#closeMeAction").click(() => {
-                    try {
-                        meeting.closeClient();
-                        meeting.closeVideo();
-                        meeting.deleteMeeting();
-
-                    } catch (e) {
-
-                    }
-
-                    $(".video-container").css({
-                        visibility: "hidden"
-                    })
-                    $(".video-user-content").css({
-                        display: "none"
-                    })
-                    $(".user-list-container").css({
-                        visibility: "hidden"
-                    })
-                    window.parent.postMessage("closeIframe", "*");
-                });
-
-                $(".user-list-container").css({
-                    visibility: "visible"
-                })
-
-                // 创建会议并打开窗口
-                $("#createMeAction").click(async() => {
-                    $(".video-user-content").css({
-                        display: "flex"
-                    })
-                    await meeting.getLocalUserInfo();
-                    // const res = await meeting.queryUser(e.data.value);
-                    meeting.localUserInfo.name = "video_Meeting";
-                    await meeting.creatMeeting();
-                    // await meeting.startInvite();
-                    await meeting.openClient();
-                    $(".video-container").css({
-                        visibility: "visible"
-                    })
-                });
-                $(".video-action").click(() => {
-                    try {
-                        meeting.closeClient();
-                        meeting.closeVideo();
-                        meeting.deleteMeeting();
-                    } catch (e) {}
-
-                    $(".video-container").css({
-                        visibility: "hidden"
-                    })
-                })
-
-                // 添加人员, 并播放视频
-                $(".user-list").click(async(e) => {
-                    console.log(e, e.target, e.target.className, e.target.dataset, "+++");
-                    if (e.target.className === "videoAction" && e.target.dataset.code) {
-                        const res = await meeting.queryUser(e.target.dataset.code);
-                        await meeting.startInvite({
-                            userName: res.userName,
-                            userId: res.userCode,
-                            region: res.paasId,
-                            type: "client",
-                            // speak:'true',
-                            number: res.userPhone,
-                            deviceId: res.deviceId,
-                            channelId: res.chnId,
-                        });
-                        // await meeting.playVideo(meeting.InvitedMembers);
-                        meeting.playVideo({
-                            type: "client",
-                            number: res.userPhone,
-                            userId: res.userCode,
-                            deviceId: res.deviceId,
-                            channelId: res.chnId,
-                        })
-                    }
-                });
-            }
-            if (e.data === "openClient") {
-                await meeting.openClient();
-            }
-        },
-        false
-    );
-};
+    // window.addEventListener(
+    //     "message",
+    //     async(e) => {
+    //         // 指定域名 防止xss 攻击
+    //         //   if (e.origin != "") return;
+    //
+    //         if (e.data === "onload") {
+    //             // 登陆 && 保活
+    //             var package = new Package(setting.URL, {
+    //                 username: setting.username,
+    //                 password: setting.password,
+    //             });
+    //             if (localStorage.getItem('token')) {
+    //                 await package.keepalive();
+    //             } else {
+    //                 await package.login();
+    //             }
+    //         }
+    //         // 打开单兵视频
+    //         if (e.data.key === "danbing") {
+    //             const meeting = new Meeting();
+    //             await meeting.getLocalUserInfo();
+    //             const res = await meeting.queryUser(e.data.value);
+    //
+    //             meeting.localUserInfo.name = "danbing_Meeting";
+    //
+    //             await meeting.creatMeeting();
+    //             await meeting.startInvite({
+    //                 userName: res.userName,
+    //                 userId: res.userCode,
+    //                 region: res.paasId,
+    //                 type: "single",
+    //                 // speak:'true',
+    //                 number: res.userPhone,
+    //                 deviceId: e.data.deviceId,
+    //                 channelId: e.data.channelId,
+    //             });
+    //             $(".video-container").css({
+    //                 visibility: "visible"
+    //             })
+    //             await meeting.openClient(
+    //                 () => {
+    //
+    //                     $(".video-action").one("click", () => {
+    //                         meeting.closeClient();
+    //                         meeting.closeVideo();
+    //                         meeting.deleteMeeting();
+    //                         $(".video-container").css({
+    //                             visibility: "hidden"
+    //                         })
+    //                         window.parent.postMessage("closeIframe", "*");
+    //                     })
+    //                     meeting.playVideo({
+    //                         type: "single",
+    //                         number: res.userPhone,
+    //                         deviceId: e.data.deviceId,
+    //                         channelId: e.data.channelId,
+    //                     })
+    //                 }
+    //             )
+    //         } else if (e.data.key === "video") {
+    //             const meeting = new Meeting();
+    //             console.log(e.data.channelId);
+    //             $(".video-container").css({
+    //                 visibility: "visible"
+    //             })
+    //             await meeting.openClient(
+    //                 () => {
+    //                     $(".video-action").one("click", () => {
+    //                         meeting.closeClient();
+    //                         meeting.closeVideo();
+    //                         meeting.deleteMeeting();
+    //                         $(".video-container").css({
+    //                             visibility: "hidden"
+    //                         })
+    //                         window.parent.postMessage("closeIframe", "*");
+    //                     })
+    //                     meeting.playVideo({
+    //                         type: "single",
+    //                         deviceId: e.data.deviceId,
+    //                         channelId: e.data.channelId,
+    //                     })
+    //                 }
+    //             )
+    //         }
+    //
+    //         // 视频会议
+    //         if (e.data === "creatMeeting") {
+    //             const meeting = new Meeting();
+    //
+    //             // close video meeting iframe
+    //             $("#closeMeAction").click(() => {
+    //                 try {
+    //                     meeting.closeClient();
+    //                     meeting.closeVideo();
+    //                     meeting.deleteMeeting();
+    //
+    //                 } catch (e) {
+    //
+    //                 }
+    //
+    //                 $(".video-container").css({
+    //                     visibility: "hidden"
+    //                 })
+    //                 $(".video-user-content").css({
+    //                     display: "none"
+    //                 })
+    //                 $(".user-list-container").css({
+    //                     visibility: "hidden"
+    //                 })
+    //                 window.parent.postMessage("closeIframe", "*");
+    //             });
+    //
+    //             $(".user-list-container").css({
+    //                 visibility: "visible"
+    //             })
+    //
+    //             // 创建会议并打开窗口
+    //             $("#createMeAction").click(async() => {
+    //                 $(".video-user-content").css({
+    //                     display: "flex"
+    //                 })
+    //                 await meeting.getLocalUserInfo();
+    //                 // const res = await meeting.queryUser(e.data.value);
+    //                 meeting.localUserInfo.name = "video_Meeting";
+    //                 await meeting.creatMeeting();
+    //                 // await meeting.startInvite();
+    //                 await meeting.openClient();
+    //                 $(".video-container").css({
+    //                     visibility: "visible"
+    //                 })
+    //             });
+    //             $(".video-action").click(() => {
+    //                 try {
+    //                     meeting.closeClient();
+    //                     meeting.closeVideo();
+    //                     meeting.deleteMeeting();
+    //                 } catch (e) {}
+    //
+    //                 $(".video-container").css({
+    //                     visibility: "hidden"
+    //                 })
+    //             })
+    //
+    //             // 添加人员, 并播放视频
+    //             $(".user-list").click(async(e) => {
+    //                 console.log(e, e.target, e.target.className, e.target.dataset, "+++");
+    //                 if (e.target.className === "videoAction" && e.target.dataset.code) {
+    //                     const res = await meeting.queryUser(e.target.dataset.code);
+    //                     await meeting.startInvite({
+    //                         userName: res.userName,
+    //                         userId: res.userCode,
+    //                         region: res.paasId,
+    //                         type: "client",
+    //                         // speak:'true',
+    //                         number: res.userPhone,
+    //                         deviceId: res.deviceId,
+    //                         channelId: res.chnId,
+    //                     });
+    //                     // await meeting.playVideo(meeting.InvitedMembers);
+    //                     meeting.playVideo({
+    //                         type: "client",
+    //                         number: res.userPhone,
+    //                         userId: res.userCode,
+    //                         deviceId: res.deviceId,
+    //                         channelId: res.chnId,
+    //                     })
+    //                 }
+    //             });
+    //         }
+    //         if (e.data === "openClient") {
+    //             await meeting.openClient();
+    //         }
+    //     },
+    //     false
+    // );
+};

+ 12 - 4
public/meeting.js

@@ -120,6 +120,7 @@ Meeting.prototype = {
     //初始化视频窗口实例,先获取自己用户code,再初始化窗口,严格按照封装参数传,别漏了
     getUserCode(callback) {
         let self = this;
+
         $.ajax({
             type: "GET",
             url: setting.URL + "/ras/user/info",
@@ -130,12 +131,19 @@ Meeting.prototype = {
                 xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
             },
             success: (res) => {
+                if(typeof res === 'string'){
+                    res=JSON.parse(res);
+                }
+
+                console.log(res && res.userCode)
                 //obj
                 if (res && res.userCode) {
                     let {
                         userCode
                     } = res;
                     //初始化websocket;
+
+
                     return self.initSocket(userCode, callback);
                 }
             },
@@ -150,7 +158,7 @@ Meeting.prototype = {
             wndSpaceing: 0,
             embedVideoMode: true,
             playerCtrlBarEnable: false,
-            displayMode: 1,
+            displayMode: 3,
             playMode: 0,
             playParams: {},
             webControlExpend: true
@@ -349,7 +357,7 @@ Meeting.prototype = {
         $.ajax({
             type: 'GET',
             url: setting.URL + "/imu/group/list" + s,
-            contentType: "application/json", //如果提交的是json数据类型,则必须有此参数,表示提交的数据类型 
+            contentType: "application/json", //如果提交的是json数据类型,则必须有此参数,表示提交的数据类型
             dateType: 'json',
             beforeSend: function(xhr) {
                 xhr.setRequestHeader("X-Subject-Token", localStorage.getItem("token"));
@@ -559,7 +567,7 @@ Meeting.prototype = {
             setTimeout(() => {
                 this[this.targetid].showBrower(false);
             }, 100);
-            
+
 
         } catch (E) {}
     },
@@ -630,4 +638,4 @@ Meeting.prototype = {
         _this.initWnd();
 
     }
-};
+};

+ 3 - 3
public/webClient/defaultConfig.js

@@ -13,6 +13,6 @@ let defaultConfig = { // 默认配置,可以通过option覆盖
     // 协议
     protocol: location.protocol === "file:" ? "http" : location.protocol.split(":")[0],
     // 开发环境配置
-    loginIp: '10.55.134.3', // DEMO采用登陆页面的地址,   若第三方自行开发,请填写大华服务器对应的IP
-    port: '6699' //  DEMO采用登陆页面的映射端口,若第三方自行开发,请填写大华服务器对应的端口
-};
+    loginIp: '10.55.134.30', // DEMO采用登陆页面的地址,   若第三方自行开发,请填写大华服务器对应的IP
+    port: '8314' //  DEMO采用登陆页面的映射端口,若第三方自行开发,请填写大华服务器对应的端口
+};

+ 12 - 7
public/webClient/initWebSocket.js

@@ -62,6 +62,7 @@ class InitWebSocketClass {
 
     initWebSocket() {
         // 初始化WebSocket
+
         return new Promise((resolve, reject) => {
             try {
                 if (typeof WebSocket === "function") {
@@ -154,14 +155,18 @@ class InitWebSocketClass {
             loginIp: this.settings.letLoginIp,
             method: "login",
             params: {
-                loginPort: 8314,
-                protocol: this.settings.protocol,
+                loginPort: "8320",
+                // protocol: this.settings.protocol,
                 token: this.settings.token,
-                userName: this.settings.letUserName
+                userName: this.settings.letUserName,
+                userId: this.settings.letUserCode,
+                browser: "chrome",
+                version: "80.0.3987.100",
+                platform: "win64",
             },
             userCode: this.settings.letUserCode,
-            socketCode: this.socketCode,
-            webTitle: document.title // 视频存在的tab业标题不能重复
+            // socketCode: this.socketCode,
+            // webTitle: document.title // 视频存在的tab业标题不能重复
         };
         console.log(params);
         this.webSocketSend(JSON.stringify(params));
@@ -188,7 +193,7 @@ class InitWebSocketClass {
                     loginIp: this.settings.letLoginIp,
                     method: "heartbeat",
                     userCode: this.settings.letUserCode,
-                    socketCode: this.socketCode
+                    // socketCode: this.socketCode
                 };
                 if (this.websocket) {
                     this.webSocketSend(JSON.stringify(params));
@@ -339,4 +344,4 @@ class InitWebSocketClass {
     }
 }
 
-window.InitWebSocketClass = InitWebSocketClass;
+window.InitWebSocketClass = InitWebSocketClass;

+ 3 - 3
public/webClient/webClient_initWnd.js

@@ -275,7 +275,7 @@ class VideoPlay {
         // 创建视频窗口
     createVideoDialog(obj) {
             const {
-                rows = 2, cols = 2, wndSpaceing = 0, embedVideoMode = true, playerCtrlBarEnable = false, displayMode = 0, playMode = 0, playParams = {}, webControlExpend = false
+                rows = 2, cols = 2, wndSpaceing = 0, embedVideoMode = true, playerCtrlBarEnable = false, displayMode = 3, playMode = 0, playParams = {}, webControlExpend = false
             } = obj;
             let playParamsObj = null;
             playMode === 0 ? playParamsObj = {} : playParamsObj = playParams;
@@ -283,7 +283,7 @@ class VideoPlay {
                 "loginIp": this.settings.letLoginIp,
                 "userCode": this.settings.letUserCode,
                 "socketCode": this.socketCode,
-                "method": "CreateVideoDialog",
+                "method": "createCtrl",
                 "params": {
                     "handleName": this.handleName,
                     "rows": rows,
@@ -521,4 +521,4 @@ class VideoPlay {
         });
         this.webSocketSend(params);
     }
-}
+}

BIN
src/assets/header1@2x.png


BIN
src/assets/header2@2x.png


BIN
src/assets/header@2x.png


+ 35 - 25
src/layout/BaseLayout/index.tsx

@@ -155,6 +155,12 @@ export default defineComponent({
 
     // login da hua
     onMounted(async () => {
+      const meeting = new Meeting();
+      meeting.openClient(() => {
+        // console.log("======")
+        meeting.settargetId("vPlayArea");
+        window.metting = meeting;
+      });
 
       var dv = document.getElementsByClassName('videoifram')[0];
       var x = 0;
@@ -173,7 +179,7 @@ export default defineComponent({
         t = dv.offsetTop;
         //开关打开
         isDown = true;
-        //设置样式  
+        //设置样式
         dv.style.cursor = 'move';
       }
       //鼠标移动
@@ -199,12 +205,12 @@ export default defineComponent({
           }catch(E){
             console.log(E)
           }
-          
+
         }, 1);
-       
-          
-          
-      
+
+
+
+
 
       }
       //鼠标抬起事件
@@ -283,7 +289,7 @@ export default defineComponent({
          if(window.metting){
           setTimeout(() => {
             cremetting11();
-            
+
           }, 1000);
          }else{
           const meeting = new Meeting();
@@ -291,26 +297,26 @@ export default defineComponent({
           window.metting = meeting;
           setTimeout(() => {
             cremetting11();
-            
+
           }, 1000);
          }
-        
+
        }else{
         const meeting = new Meeting();
         meeting.openClient(() => {
-          
+
           meeting.settargetId("vPlayArea");
           window.metting = meeting;
           setTimeout(() => {
             cremetting11();
-            
+
           }, 1000);
-         
+
         });
 
        }
-      
-        
+
+
 
         async function cremetting11(){
 
@@ -322,10 +328,10 @@ export default defineComponent({
           dothing();
 
          async function dothing(){
-          
+
           if(!isc) return;
           isc = false;
-            
+
             await window.metting.getLocalUserInfo();
           const res = await window.metting.queryUser('5212541339435008');
 
@@ -344,24 +350,28 @@ export default defineComponent({
             memberNumber: ""// 成员号码
           };
           window.theSocket&&window.theSocket.createGroupChat(chartParams);
-        
+
           commonstore.isclick = false;
-          
+
 
           }
-          
-         
-          
+
+
+
         }
 
-  
+
         })
-        
+
+
+
+
       } catch (error) {
-        
+        console.error(error)
+
       }
 
-     
+
 
     });
     const timetext = ref("-");

+ 3 - 3
src/store/useMainStore.ts

@@ -45,8 +45,8 @@ export default defineStore<'main', MainStateType, {}, MainActionsType>('main', {
         console.log(err);
       }
     },
-    setEventListshow(isshow) { 
-       this.isshoweventlist = isshow; 
+    setEventListshow(isshow) {
+       this.isshoweventlist = isshow;
     },
     async getUserInfo(ticket) {
       try {
@@ -66,7 +66,7 @@ export default defineStore<'main', MainStateType, {}, MainActionsType>('main', {
     pushReqToken(cancelToken) {
       this.cancelReqToken.push(cancelToken);
     },
-    removeToken() { 
+    removeToken() {
        window.localStorage.removeItem('Authorization');
     },
     clearReqToken() {

+ 8 - 4
src/store/useMarkerStore.ts

@@ -96,10 +96,14 @@ export default defineStore<'marker', MarkerStateType, {}, MainActionsType>(
       },
       async initDHUser() {
         const { data } = await getDHUserToken();
-        if (data.token) { 
-          localStorage.setItem('token', data.token.toString());
-          localStorage.setItem('userId', data.userId.toString());
-          localStorage.setItem('userName', data.userName.toString());
+        if (data.token) {
+          // localStorage.setItem('token', data.token.toString());
+          // localStorage.setItem('userId', data.userId.toString());
+          // localStorage.setItem('userName', data.userName.toString());
+
+          localStorage.setItem('token','S4NbecfYB19QUJHT4T8M7G_6566288360343616')
+          localStorage.setItem('userId', 'S4NbecfYB19QUJHT4T8M7G');
+          localStorage.setItem('userName', 'system');
         }
       },
       async getAllsingleDevice() {

+ 14 - 14
src/utils/request.ts

@@ -80,20 +80,20 @@ axios.interceptors.response.use(
   },
   (error) => {
     // ElMessage.error({ message: '系统异常, 请稍后重试!' });
-    const {
-      status,
-      config: { url },
-    } = error.response;
-    if (status === 401 && url?.includes(DA_HUA_URL_PREFIX)) {
-      clearTimeout(timer);
-      const dahuaStore = useDaHuaStore();
-      dahuaStore.timer && clearInterval(dahuaStore.timer);
-
-      timer = setTimeout(() => {
-        dahuaStore.DAHUALogin();
-      }, 1000);
-    }
-    throw Error(error);
+    // const {
+    //   status,
+    //   config: { url },
+    // } = error.response;
+    // if (status === 401 && url?.includes(DA_HUA_URL_PREFIX)) {
+    //   clearTimeout(timer);
+    //   const dahuaStore = useDaHuaStore();
+    //   dahuaStore.timer && clearInterval(dahuaStore.timer);
+    //
+    //   timer = setTimeout(() => {
+    //     dahuaStore.DAHUALogin();
+    //   }, 1000);
+    // }
+    // throw Error(error);
   },
 );
 

+ 2 - 2
vite.config.ts

@@ -33,8 +33,8 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
       force: true,
       proxy: {
         '/api': {
-          target: 'http://61.147.254.211:30876/YJZH-SQ/',
-          // target: 'http://sqpcbg.xt.wenhq.top:8083/',
+          // target: 'http://61.147.254.211:30876/YJZH-SQ/',
+          target: 'http://10.11.208.17:30876/YJZH-SQ/',
           changeOrigin: true,
           // rewrite: (path) => path.replace(/^\/api/, ''),
         },