diff --git a/public/config/config.json b/public/config/config.json index c9c4ded..f3dbda1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title": "安全生产智慧监管系统", - "baseUrl": "http://10.8.50.210:6909/safe-server/", + "baseUrl": "http://192.168.83.37:6909/safe-server/", "mediaBaseUrl": "http://10.8.50.210:8099", "lat": "39.908447", "lng": "116.258555", diff --git a/public/config/config.json b/public/config/config.json index c9c4ded..f3dbda1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title": "安全生产智慧监管系统", - "baseUrl": "http://10.8.50.210:6909/safe-server/", + "baseUrl": "http://192.168.83.37:6909/safe-server/", "mediaBaseUrl": "http://10.8.50.210:8099", "lat": "39.908447", "lng": "116.258555", diff --git a/src/api/index.ts b/src/api/index.ts index c6da9c8..74784c8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -75,6 +75,9 @@ const mes = response.data.data.filter((item: any, index: number) => index < 2).join(',') ElMessage.error(mes) } + else if (response.data.code === 500 && response.data.msg) { + ElMessage.error(response.data.msg) + } else { // 这里做错误提 ElMessage.error(`${response.data.message}` || '发生错误') @@ -133,7 +136,6 @@ type: 'error', }) } - return Promise.reject(error) }, ) diff --git a/public/config/config.json b/public/config/config.json index c9c4ded..f3dbda1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title": "安全生产智慧监管系统", - "baseUrl": "http://10.8.50.210:6909/safe-server/", + "baseUrl": "http://192.168.83.37:6909/safe-server/", "mediaBaseUrl": "http://10.8.50.210:8099", "lat": "39.908447", "lng": "116.258555", diff --git a/src/api/index.ts b/src/api/index.ts index c6da9c8..74784c8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -75,6 +75,9 @@ const mes = response.data.data.filter((item: any, index: number) => index < 2).join(',') ElMessage.error(mes) } + else if (response.data.code === 500 && response.data.msg) { + ElMessage.error(response.data.msg) + } else { // 这里做错误提 ElMessage.error(`${response.data.message}` || '发生错误') @@ -133,7 +136,6 @@ type: 'error', }) } - return Promise.reject(error) }, ) diff --git a/src/views/ycjg/ssjk/control-noPlugin.vue b/src/views/ycjg/ssjk/control-noPlugin.vue index 480d611..e2bec2a 100644 --- a/src/views/ycjg/ssjk/control-noPlugin.vue +++ b/src/views/ycjg/ssjk/control-noPlugin.vue @@ -197,11 +197,7 @@ verticalSpeed: '30', zoomSpeed: '30', } - ptzControl(deviceData.value.nvrIndexCode, deviceData.value.cameraIndexCode, params).then((res) => { - if (res.code === 500) { - ElMessage.error(res.msg) - } - }) + ptzControl(deviceData.value.nvrIndexCode, deviceData.value.cameraIndexCode, params).then((res) => {}) } // 上下左右 @@ -213,7 +209,7 @@ horizonSpeed: '30', verticalSpeed: '30', } - ptzControl(deviceData.value.nvrIndexCode, deviceData.value.cameraIndexCode, params).then(() => {}) + ptzControl(deviceData.value.nvrIndexCode, deviceData.value.cameraIndexCode, params).then((res) => {}) } }