Browse Source

fix: 修复通道快照获取失败问题
1. 修复了通道快照未放行导致的无法获取快照问题

kindring 1 năm trước cách đây
mục cha
commit
9317ca1cda

+ 1 - 0
src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java

@@ -89,6 +89,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
             matchers.add("/aiLib/aialarm");
             matchers.add("/ai/unread");
             matchers.add("/js/**");
+            matchers.add("/api/device/query/snap/**");
             matchers.addAll(userSetting.getInterfaceAuthenticationExcludes());
             // 可以直接访问的静态数据
             web.ignoring().antMatchers(matchers.toArray(new String[0]));

+ 1 - 1
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java

@@ -641,7 +641,7 @@ public class DeviceQuery {
 	@Parameter(name = "deviceId", description = "设备国标编号", required = true)
 	@Parameter(name = "channelId", description = "通道国标编号", required = true)
 	public void getSnap(HttpServletResponse resp, @PathVariable String deviceId, @PathVariable String channelId) {
-
+		logger.info("[web api] /snap/{deviceId}/{channelId} 请求截图");
 		try {
 			final InputStream in = Files.newInputStream(new File("snap" + File.separator + deviceId + "_" + channelId + ".jpg").toPath());
 			resp.setContentType(MediaType.IMAGE_PNG_VALUE);

+ 2 - 2
web_src/config/index.js

@@ -3,8 +3,8 @@
 // see http://vuejs-templates.github.io/webpack for documentation.
 
 const path = require('path')
-// const baseUrl = "https://127.0.0.1:19200"
-const baseUrl = "https://hofuniot.cn:29072"
+const baseUrl = "https://127.0.0.1:19200"
+// const baseUrl = "https://hofuniot.cn:29072"
 const ZLMServer = "https://192.168.1.60:29010"
 module.exports = {
   dev: {