浏览代码

摄像头回放时间宽度问题

wangtao 2 年之前
父节点
当前提交
e8f38ee497
共有 4 个文件被更改,包括 22 次插入26 次删除
  1. 2 2
      public/static/config.js
  2. 18 22
      src/utils/request.js
  3. 1 1
      src/views/device/camera/index.vue
  4. 1 1
      src/views/device/camera2/index.vue

+ 2 - 2
public/static/config.js

@@ -13,8 +13,8 @@ var PLATFROM_CONFIG = {};
 //PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/af"
 
 //PLATFROM_CONFIG.baseUrl = "http://101.133.214.75:81/af"
-//PLATFROM_CONFIG.baseUrl = "http://172.16.120.85:8082"
-//PLATFROM_CONFIG.baseUrl = "http://172.16.120.49/af"
+// PLATFROM_CONFIG.baseUrl = "http://172.16.120.85:8082"
+// PLATFROM_CONFIG.baseUrl = "http://172.16.120.49/securityapi/"
 PLATFROM_CONFIG.baseUrl = "http://10.21.39.1:8082" //生产
     //alarming WEBSOCKET
 let userInfo = window.localStorage.getItem("key");

+ 18 - 22
src/utils/request.js

@@ -47,30 +47,26 @@ service.interceptors.request.use(config => {
 service.interceptors.response.use(response => {
     if (response.data.status === 'SUCCESS') {
         return response.data;
-    }
-}, error => {
-    console.log(error.response)
-        // if (error.response == undefined) {
-        //     Cookies.remove("vue_admin_template_token1708")
-        // }
-    if (error.response.data.status == "ERROR" && error.response.data.code == "401") {
-        MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
-            confirmButtonText: '重新登录',
-            cancelButtonText: '取消',
-            type: 'warning'
-        }).then(() => {
-            store.dispatch('logout').then(() => {
-                location.href = '/#/login';
-            })
-        }).catch(() => {});
     } else {
-        Message({
-            showClose: true,
-            message: (error.response.data.msg).split(":")[1],
-            type: 'error'
-        });
-        return {}
+        if (response.data.code == "401") {
+            MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
+                confirmButtonText: '重新登录',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                store.dispatch('logout').then(() => {
+                    location.href = '/#/login';
+                })
+            }).catch(() => {});
+        }
     }
+}, error => {
+    Message({
+        showClose: true,
+        message: (error.response.data.msg).split(":")[1],
+        type: 'error'
+    });
+    return {}
 })
 
 export default service

+ 1 - 1
src/views/device/camera/index.vue

@@ -162,7 +162,7 @@
       :total="totalCount"
     >
     </el-pagination>
-    <el-dialog title="回放时间选择" :visible.sync="dialogFormVisible3" width="3000">
+    <el-dialog title="回放时间选择" :visible.sync="dialogFormVisible3" width="600">
       <div class="block">
         <el-date-picker
           @change="dateData"

+ 1 - 1
src/views/device/camera2/index.vue

@@ -228,7 +228,7 @@
         <el-button type="primary" @click="cancel">关 闭</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="回放时间选择" :visible.sync="dialogFormVisible3" width="3000" @close='closeDialog'>
+    <el-dialog title="回放时间选择" :visible.sync="dialogFormVisible3" width="600" @close='closeDialog'>
       <div class="block">
         <el-date-picker
           @change="dateData"