From 76cde2bc853cc4d491749e46dbef83064271d09a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 20 Feb 2023 11:08:41 +0800
Subject: [PATCH] 配置地址更新,定时器清除,事件绑定

---
 src/api/video/index.js |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/api/video/index.js b/src/api/video/index.js
index b1b99e1..92594ad 100644
--- a/src/api/video/index.js
+++ b/src/api/video/index.js
@@ -2,13 +2,24 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2022-11-15 15:10:41
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2023-02-17 10:34:10
+ * @LastEditTime: 2023-02-20 10:18:43
  * @FilePath: \srs-police-affairs\src\api\video\index.js
  * @Description: 
  * 
  * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved. 
  */
 import request from "@/router/axios.js"
+
+
+let equipmentNum = ''
+
+if (process.env.NODE_ENV == 'development') {
+    // 开发
+    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_EQUIPMENT
+} else {
+    // 部署
+    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_INTRANET_EQUIPMENT
+}
 
 /**
  * 获取设备列表
@@ -20,10 +31,7 @@
  */
 export const getVideoList = (page, count, query, params = {}) => {
     return request({
-        // 内网
-        url: '/device/query/devices/36110000002009999000/channels',
-        // 外网
-        // url: '/device/query/devices/34020000002000000003/channels',
+        url: `/device/query/devices/${equipmentNum}/channels`,
         method: 'get',
         requestBaseUrl: 'outside',
         params: {
@@ -42,10 +50,7 @@
  */
 export const getDevices = (channelId) => {
     return request({
-        // 内网
-        url: `/play/start/36110000002009999000/${channelId}`,
-        // 外网
-        // url: `/play/start/34020000002000000003/${channelId}`,
+        url: `/play/start/${equipmentNum}/${channelId}`,
         method: 'get',
         requestBaseUrl: 'outside'
     })
@@ -172,10 +177,7 @@
         url: '/api/deviceChannel/deviceChannel/getDeviceChannelByMileage',
         method: 'get',
         params: {
-            // 内网
-            deviceId: '36110000002009999000',
-            // 外网
-            // deviceId: '34020000002000000003',
+            deviceId: equipmentNum,
             ...params
         }
     })

--
Gitblit v1.9.3