Commit 6484f52e4624f9c2dbd03443080adf6db6b800b4
1 parent
e46bf8a8
同时支持打包为Jar和War
Showing
46 changed files
with
189 additions
and
160 deletions
pom.xml
src/main/java/com/genersoft/iot/vmp/ServletInitializer.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp; | |
| 2 | - | |
| 3 | -import org.springframework.boot.builder.SpringApplicationBuilder; | |
| 4 | -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | |
| 5 | - | |
| 6 | -public class ServletInitializer extends SpringBootServletInitializer { | |
| 7 | - | |
| 8 | - @Override | |
| 9 | - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
| 10 | - return application.sources(VManageBootstrap.class); | |
| 11 | - } | |
| 12 | - | |
| 13 | -} |
src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
| 1 | 1 | package com.genersoft.iot.vmp; |
| 2 | 2 | |
| 3 | -import java.util.logging.LogManager; | |
| 4 | - | |
| 5 | 3 | import com.genersoft.iot.vmp.conf.druid.EnableDruidSupport; |
| 6 | -import com.genersoft.iot.vmp.storager.impl.RedisCatchStorageImpl; | |
| 7 | 4 | import com.genersoft.iot.vmp.utils.GitUtil; |
| 8 | 5 | import com.genersoft.iot.vmp.utils.SpringBeanFactory; |
| 9 | 6 | import org.slf4j.Logger; |
| 10 | 7 | import org.slf4j.LoggerFactory; |
| 11 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 12 | 8 | import org.springframework.boot.SpringApplication; |
| 13 | 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 10 | +import org.springframework.boot.builder.SpringApplicationBuilder; | |
| 14 | 11 | import org.springframework.boot.web.servlet.ServletComponentScan; |
| 12 | +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | |
| 15 | 13 | import org.springframework.context.ConfigurableApplicationContext; |
| 16 | 14 | import org.springframework.scheduling.annotation.EnableScheduling; |
| 17 | 15 | |
| 16 | +import javax.servlet.ServletContext; | |
| 17 | +import javax.servlet.ServletException; | |
| 18 | +import javax.servlet.SessionCookieConfig; | |
| 19 | +import javax.servlet.SessionTrackingMode; | |
| 20 | +import java.util.Collections; | |
| 21 | + | |
| 18 | 22 | /** |
| 19 | 23 | * 启动类 |
| 20 | 24 | */ |
| ... | ... | @@ -22,7 +26,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; |
| 22 | 26 | @SpringBootApplication |
| 23 | 27 | @EnableScheduling |
| 24 | 28 | @EnableDruidSupport |
| 25 | -public class VManageBootstrap extends LogManager { | |
| 29 | +public class VManageBootstrap extends SpringBootServletInitializer { | |
| 26 | 30 | |
| 27 | 31 | private final static Logger logger = LoggerFactory.getLogger(VManageBootstrap.class); |
| 28 | 32 | |
| ... | ... | @@ -41,6 +45,21 @@ public class VManageBootstrap extends LogManager { |
| 41 | 45 | context.close(); |
| 42 | 46 | VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args); |
| 43 | 47 | } |
| 44 | - | |
| 45 | 48 | |
| 49 | + @Override | |
| 50 | + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
| 51 | + return application.sources(VManageBootstrap.class); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void onStartup(ServletContext servletContext) throws ServletException { | |
| 56 | + super.onStartup(servletContext); | |
| 57 | + | |
| 58 | + servletContext.setSessionTrackingModes( | |
| 59 | + Collections.singleton(SessionTrackingMode.COOKIE) | |
| 60 | + ); | |
| 61 | + SessionCookieConfig sessionCookieConfig = servletContext.getSessionCookieConfig(); | |
| 62 | + sessionCookieConfig.setHttpOnly(true); | |
| 63 | + | |
| 64 | + } | |
| 46 | 65 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/conf/ApiAccessFilter.java
| ... | ... | @@ -10,6 +10,7 @@ import org.slf4j.Logger; |
| 10 | 10 | import org.slf4j.LoggerFactory; |
| 11 | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 12 | 12 | import org.springframework.http.HttpStatus; |
| 13 | +import org.springframework.stereotype.Component; | |
| 13 | 14 | import org.springframework.util.ObjectUtils; |
| 14 | 15 | import org.springframework.web.filter.OncePerRequestFilter; |
| 15 | 16 | |
| ... | ... | @@ -23,6 +24,7 @@ import java.io.IOException; |
| 23 | 24 | * @author lin |
| 24 | 25 | */ |
| 25 | 26 | @WebFilter(filterName = "ApiAccessFilter", urlPatterns = "/api/*", asyncSupported=true) |
| 27 | +@Component | |
| 26 | 28 | public class ApiAccessFilter extends OncePerRequestFilter { |
| 27 | 29 | |
| 28 | 30 | private final static Logger logger = LoggerFactory.getLogger(ApiAccessFilter.class); |
| ... | ... | @@ -48,7 +50,7 @@ public class ApiAccessFilter extends OncePerRequestFilter { |
| 48 | 50 | |
| 49 | 51 | filterChain.doFilter(servletRequest, servletResponse); |
| 50 | 52 | |
| 51 | - if (uriName != null && userSetting.getLogInDatebase()) { | |
| 53 | + if (uriName != null && userSetting != null && userSetting.getLogInDatebase() != null && userSetting.getLogInDatebase()) { | |
| 52 | 54 | |
| 53 | 55 | LogDto logDto = new LogDto(); |
| 54 | 56 | logDto.setName(uriName); | ... | ... |
src/main/java/com/genersoft/iot/vmp/conf/ServiceInfo.java
0 → 100644
| 1 | +package com.genersoft.iot.vmp.conf; | |
| 2 | + | |
| 3 | +import org.slf4j.Logger; | |
| 4 | +import org.slf4j.LoggerFactory; | |
| 5 | +import org.springframework.boot.web.context.WebServerInitializedEvent; | |
| 6 | +import org.springframework.context.ApplicationListener; | |
| 7 | +import org.springframework.stereotype.Component; | |
| 8 | + | |
| 9 | +@Component | |
| 10 | +public class ServiceInfo implements ApplicationListener<WebServerInitializedEvent> { | |
| 11 | + | |
| 12 | + private final Logger logger = LoggerFactory.getLogger(ServiceInfo.class); | |
| 13 | + | |
| 14 | + private static int serverPort; | |
| 15 | + | |
| 16 | + public static int getServerPort() { | |
| 17 | + return serverPort; | |
| 18 | + } | |
| 19 | + | |
| 20 | + @Override | |
| 21 | + public void onApplicationEvent(WebServerInitializedEvent event) { | |
| 22 | + // 项目启动获取启动的端口号 | |
| 23 | + ServiceInfo.serverPort = event.getWebServer().getPort(); | |
| 24 | + logger.info("项目启动获取启动的端口号: " + ServiceInfo.serverPort); | |
| 25 | + } | |
| 26 | + | |
| 27 | + public void setServerPort(int serverPort) { | |
| 28 | + ServiceInfo.serverPort = serverPort; | |
| 29 | + } | |
| 30 | +} | ... | ... |
src/main/java/com/genersoft/iot/vmp/conf/security/UrlTokenHandler.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.conf.security; | |
| 2 | - | |
| 3 | -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | |
| 4 | - | |
| 5 | -import javax.servlet.ServletContext; | |
| 6 | -import javax.servlet.ServletException; | |
| 7 | -import javax.servlet.SessionCookieConfig; | |
| 8 | -import javax.servlet.SessionTrackingMode; | |
| 9 | -import java.util.Collections; | |
| 10 | - | |
| 11 | -public class UrlTokenHandler extends SpringBootServletInitializer { | |
| 12 | - | |
| 13 | - @Override | |
| 14 | - public void onStartup(ServletContext servletContext) throws ServletException { | |
| 15 | - super.onStartup(servletContext); | |
| 16 | - | |
| 17 | - servletContext.setSessionTrackingModes( | |
| 18 | - Collections.singleton(SessionTrackingMode.COOKIE) | |
| 19 | - ); | |
| 20 | - SessionCookieConfig sessionCookieConfig = servletContext.getSessionCookieConfig(); | |
| 21 | - sessionCookieConfig.setHttpOnly(true); | |
| 22 | - | |
| 23 | - } | |
| 24 | -} |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl; |
| 2 | 2 | |
| 3 | +import com.genersoft.iot.vmp.conf.ServiceInfo; | |
| 3 | 4 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 4 | 5 | import com.genersoft.iot.vmp.conf.UserSetting; |
| 5 | 6 | import com.genersoft.iot.vmp.gb28181.auth.DigestServerAuthenticationHelper; |
| ... | ... | @@ -79,6 +80,19 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen |
| 79 | 80 | RequestEventExt evtExt = (RequestEventExt) evt; |
| 80 | 81 | String requestAddress = evtExt.getRemoteIpAddress() + ":" + evtExt.getRemotePort(); |
| 81 | 82 | logger.info("[注册请求] 开始处理: {}", requestAddress); |
| 83 | +// MBeanServer beanServer = ManagementFactory.getPlatformMBeanServer(); | |
| 84 | +// QueryExp protocol = Query.match(Query.attr("protocol"), Query.value("HTTP/1.1")); | |
| 85 | +//// ObjectName name = new ObjectName("*:type=Connector,*"); | |
| 86 | +// ObjectName name = new ObjectName("*:*"); | |
| 87 | +// Set<ObjectName> objectNames = beanServer.queryNames(name, protocol); | |
| 88 | +// for (ObjectName objectName : objectNames) { | |
| 89 | +// String catalina = objectName.getDomain(); | |
| 90 | +// if ("Catalina".equals(catalina)) { | |
| 91 | +// System.out.println(objectName.getKeyProperty("port")); | |
| 92 | +// } | |
| 93 | +// } | |
| 94 | + | |
| 95 | + System.out.println(ServiceInfo.getServerPort()); | |
| 82 | 96 | SIPRequest request = (SIPRequest)evt.getRequest(); |
| 83 | 97 | Response response = null; |
| 84 | 98 | boolean passwordCorrect = false; | ... | ... |
web_src/build/utils.js
| ... | ... | @@ -47,7 +47,8 @@ exports.cssLoaders = function (options) { |
| 47 | 47 | if (options.extract) { |
| 48 | 48 | return ExtractTextPlugin.extract({ |
| 49 | 49 | use: loaders, |
| 50 | - fallback: 'vue-style-loader' | |
| 50 | + fallback: 'vue-style-loader', | |
| 51 | + publicPath: '../../' | |
| 51 | 52 | }) |
| 52 | 53 | } else { |
| 53 | 54 | return ['vue-style-loader'].concat(loaders) | ... | ... |
web_src/config/index.js
| ... | ... | @@ -8,8 +8,8 @@ module.exports = { |
| 8 | 8 | dev: { |
| 9 | 9 | |
| 10 | 10 | // Paths |
| 11 | - assetsSubDirectory: 'static', | |
| 12 | - assetsPublicPath: '/', | |
| 11 | + assetsSubDirectory: './static', | |
| 12 | + assetsPublicPath: './', | |
| 13 | 13 | proxyTable: { |
| 14 | 14 | '/debug': { |
| 15 | 15 | target: 'http://localhost:38080', |
| ... | ... | @@ -61,7 +61,7 @@ module.exports = { |
| 61 | 61 | // Paths |
| 62 | 62 | assetsRoot: path.resolve(__dirname, '../../src/main/resources/static/'), |
| 63 | 63 | assetsSubDirectory: './static', |
| 64 | - assetsPublicPath: '/', | |
| 64 | + assetsPublicPath: './', | |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * Source Maps | ... | ... |
web_src/src/components/CloudRecord.vue
| ... | ... | @@ -133,7 +133,7 @@ |
| 133 | 133 | let that = this; |
| 134 | 134 | this.$axios({ |
| 135 | 135 | method: 'get', |
| 136 | - url:`/record_proxy/${that.mediaServerId}/api/record/list`, | |
| 136 | + url:`./record_proxy/${that.mediaServerId}/api/record/list`, | |
| 137 | 137 | params: { |
| 138 | 138 | page: that.currentPage, |
| 139 | 139 | count: that.count |
| ... | ... | @@ -185,7 +185,7 @@ |
| 185 | 185 | let that = this; |
| 186 | 186 | this.$axios({ |
| 187 | 187 | method: 'delete', |
| 188 | - url:`/record_proxy/api/record/delete`, | |
| 188 | + url:`./record_proxy/api/record/delete`, | |
| 189 | 189 | params: { |
| 190 | 190 | page: that.currentPage, |
| 191 | 191 | count: that.count | ... | ... |
web_src/src/components/CloudRecordDetail.vue
| ... | ... | @@ -241,7 +241,7 @@ |
| 241 | 241 | let that = this; |
| 242 | 242 | that.$axios({ |
| 243 | 243 | method: 'get', |
| 244 | - url:`/record_proxy/${that.mediaServerId}/api/record/file/list`, | |
| 244 | + url:`./record_proxy/${that.mediaServerId}/api/record/file/list`, | |
| 245 | 245 | params: { |
| 246 | 246 | app: that.recordFile.app, |
| 247 | 247 | stream: that.recordFile.stream, |
| ... | ... | @@ -340,7 +340,7 @@ |
| 340 | 340 | let that = this; |
| 341 | 341 | this.$axios({ |
| 342 | 342 | method: 'delete', |
| 343 | - url:`/record_proxy/${that.mediaServerId}/api/record/delete`, | |
| 343 | + url:`./record_proxy/${that.mediaServerId}/api/record/delete`, | |
| 344 | 344 | params: { |
| 345 | 345 | page: that.currentPage, |
| 346 | 346 | count: that.count |
| ... | ... | @@ -359,7 +359,7 @@ |
| 359 | 359 | that.dateFilesObj = {}; |
| 360 | 360 | this.$axios({ |
| 361 | 361 | method: 'get', |
| 362 | - url:`/record_proxy/${that.mediaServerId}/api/record/date/list`, | |
| 362 | + url:`./record_proxy/${that.mediaServerId}/api/record/date/list`, | |
| 363 | 363 | params: { |
| 364 | 364 | app: that.recordFile.app, |
| 365 | 365 | stream: that.recordFile.stream |
| ... | ... | @@ -408,7 +408,7 @@ |
| 408 | 408 | let that = this; |
| 409 | 409 | this.$axios({ |
| 410 | 410 | method: 'get', |
| 411 | - url:`/record_proxy/${that.mediaServerId}/api/record/file/download/task/add`, | |
| 411 | + url:`./record_proxy/${that.mediaServerId}/api/record/file/download/task/add`, | |
| 412 | 412 | params: { |
| 413 | 413 | app: that.recordFile.app, |
| 414 | 414 | stream: that.recordFile.stream, |
| ... | ... | @@ -433,7 +433,7 @@ |
| 433 | 433 | let that = this; |
| 434 | 434 | this.$axios({ |
| 435 | 435 | method: 'get', |
| 436 | - url:`/record_proxy/${that.mediaServerId}/api/record/file/download/task/list`, | |
| 436 | + url:`./record_proxy/${that.mediaServerId}/api/record/file/download/task/list`, | |
| 437 | 437 | params: { |
| 438 | 438 | isEnd: isEnd, |
| 439 | 439 | } | ... | ... |
web_src/src/components/DeviceList.vue
| ... | ... | @@ -152,7 +152,7 @@ export default { |
| 152 | 152 | this.getDeviceListLoading = true; |
| 153 | 153 | this.$axios({ |
| 154 | 154 | method: 'get', |
| 155 | - url: `/api/device/query/devices`, | |
| 155 | + url: `./api/device/query/devices`, | |
| 156 | 156 | params: { |
| 157 | 157 | page: this.currentPage, |
| 158 | 158 | count: this.count |
| ... | ... | @@ -182,7 +182,7 @@ export default { |
| 182 | 182 | }).then(() => { |
| 183 | 183 | this.$axios({ |
| 184 | 184 | method: 'delete', |
| 185 | - url: `/api/device/query/devices/${row.deviceId}/delete` | |
| 185 | + url: `./api/device/query/devices/${row.deviceId}/delete` | |
| 186 | 186 | }).then((res) => { |
| 187 | 187 | this.getDeviceList(); |
| 188 | 188 | }).catch((error) => { |
| ... | ... | @@ -208,7 +208,7 @@ export default { |
| 208 | 208 | let that = this; |
| 209 | 209 | this.$axios({ |
| 210 | 210 | method: 'get', |
| 211 | - url: '/api/device/query/devices/' + itemData.deviceId + '/sync' | |
| 211 | + url: './api/device/query/devices/' + itemData.deviceId + '/sync' | |
| 212 | 212 | }).then((res) => { |
| 213 | 213 | console.log("刷新设备结果:" + JSON.stringify(res)); |
| 214 | 214 | if (res.data.code !== 0) { |
| ... | ... | @@ -242,7 +242,7 @@ export default { |
| 242 | 242 | await this.$axios({ |
| 243 | 243 | method: 'get', |
| 244 | 244 | async: false, |
| 245 | - url: `/api/device/query/${deviceId}/sync_status/`, | |
| 245 | + url: `./api/device/query/${deviceId}/sync_status/`, | |
| 246 | 246 | }).then((res) => { |
| 247 | 247 | if (res.data.code == 0) { |
| 248 | 248 | if (res.data.data.errorMsg !== null) { |
| ... | ... | @@ -261,7 +261,7 @@ export default { |
| 261 | 261 | let that = this; |
| 262 | 262 | this.$axios({ |
| 263 | 263 | method: 'post', |
| 264 | - url: '/api/device/query/transport/' + row.deviceId + '/' + row.streamMode | |
| 264 | + url: './api/device/query/transport/' + row.deviceId + '/' + row.streamMode | |
| 265 | 265 | }).then(function (res) { |
| 266 | 266 | |
| 267 | 267 | }).catch(function (e) { | ... | ... |
web_src/src/components/GBRecordDetail.vue
| ... | ... | @@ -197,7 +197,7 @@ |
| 197 | 197 | this.detailFiles = []; |
| 198 | 198 | this.$axios({ |
| 199 | 199 | method: 'get', |
| 200 | - url: '/api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + this.endTime | |
| 200 | + url: './api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + this.endTime | |
| 201 | 201 | }).then((res)=>{ |
| 202 | 202 | this.recordsLoading = false; |
| 203 | 203 | if(res.data.code === 0) { |
| ... | ... | @@ -249,7 +249,7 @@ |
| 249 | 249 | } else { |
| 250 | 250 | this.$axios({ |
| 251 | 251 | method: 'get', |
| 252 | - url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + | |
| 252 | + url: './api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + | |
| 253 | 253 | this.endTime |
| 254 | 254 | }).then((res)=> { |
| 255 | 255 | if (res.data.code === 0) { |
| ... | ... | @@ -273,7 +273,7 @@ |
| 273 | 273 | console.log('前端控制:播放'); |
| 274 | 274 | this.$axios({ |
| 275 | 275 | method: 'get', |
| 276 | - url: '/api/playback/resume/' + this.streamId | |
| 276 | + url: './api/playback/resume/' + this.streamId | |
| 277 | 277 | }).then((res)=> { |
| 278 | 278 | this.$refs["recordVideoPlayer"].play(this.videoUrl) |
| 279 | 279 | }); |
| ... | ... | @@ -282,14 +282,14 @@ |
| 282 | 282 | console.log('前端控制:暂停'); |
| 283 | 283 | this.$axios({ |
| 284 | 284 | method: 'get', |
| 285 | - url: '/api/playback/pause/' + this.streamId | |
| 285 | + url: './api/playback/pause/' + this.streamId | |
| 286 | 286 | }).then(function (res) {}); |
| 287 | 287 | }, |
| 288 | 288 | gbScale(command){ |
| 289 | 289 | console.log('前端控制:倍速 ' + command); |
| 290 | 290 | this.$axios({ |
| 291 | 291 | method: 'get', |
| 292 | - url: `/api/playback/speed/${this.streamId }/${command}` | |
| 292 | + url: `./api/playback/speed/${this.streamId }/${command}` | |
| 293 | 293 | }).then(function (res) {}); |
| 294 | 294 | }, |
| 295 | 295 | downloadRecord: function (row) { |
| ... | ... | @@ -311,7 +311,7 @@ |
| 311 | 311 | }else { |
| 312 | 312 | this.$axios({ |
| 313 | 313 | method: 'get', |
| 314 | - url: '/api/gb_record/download/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' + | |
| 314 | + url: './api/gb_record/download/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' + | |
| 315 | 315 | row.endTime + '&downloadSpeed=4' |
| 316 | 316 | }).then( (res)=> { |
| 317 | 317 | if (res.data.code === 0) { |
| ... | ... | @@ -332,7 +332,7 @@ |
| 332 | 332 | this.videoUrl = ''; |
| 333 | 333 | this.$axios({ |
| 334 | 334 | method: 'get', |
| 335 | - url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId | |
| 335 | + url: './api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId | |
| 336 | 336 | }).then((res)=> { |
| 337 | 337 | if (callback) callback(res) |
| 338 | 338 | }); |
| ... | ... | @@ -342,7 +342,7 @@ |
| 342 | 342 | this.videoUrl = ''; |
| 343 | 343 | this.$axios({ |
| 344 | 344 | method: 'get', |
| 345 | - url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId | |
| 345 | + url: './api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId | |
| 346 | 346 | }).then(function (res) { |
| 347 | 347 | if (callback) callback() |
| 348 | 348 | }); | ... | ... |
web_src/src/components/Login.vue
web_src/src/components/ParentPlatformList.vue
| ... | ... | @@ -128,7 +128,7 @@ export default { |
| 128 | 128 | var that = this; |
| 129 | 129 | that.$axios({ |
| 130 | 130 | method: 'delete', |
| 131 | - url:`/api/platform/delete/${platform.serverGBId}` | |
| 131 | + url:`./api/platform/delete/${platform.serverGBId}` | |
| 132 | 132 | }).then(function (res) { |
| 133 | 133 | if (res.data.code === 0) { |
| 134 | 134 | that.$message({ |
| ... | ... | @@ -162,7 +162,7 @@ export default { |
| 162 | 162 | |
| 163 | 163 | this.$axios({ |
| 164 | 164 | method: 'get', |
| 165 | - url:`/api/platform/query/${that.count}/${that.currentPage}` | |
| 165 | + url:`./api/platform/query/${that.count}/${that.currentPage}` | |
| 166 | 166 | }).then(function (res) { |
| 167 | 167 | if (res.data.code === 0) { |
| 168 | 168 | that.total = res.data.data.total; | ... | ... |
web_src/src/components/PushVideoList.vue
| ... | ... | @@ -171,7 +171,7 @@ export default { |
| 171 | 171 | this.getDeviceListLoading = true; |
| 172 | 172 | this.$axios({ |
| 173 | 173 | method: 'get', |
| 174 | - url: `/api/push/list`, | |
| 174 | + url: `./api/push/list`, | |
| 175 | 175 | params: { |
| 176 | 176 | page: that.currentPage, |
| 177 | 177 | count: that.count, |
| ... | ... | @@ -197,7 +197,7 @@ export default { |
| 197 | 197 | this.getListLoading = true; |
| 198 | 198 | this.$axios({ |
| 199 | 199 | method: 'get', |
| 200 | - url: '/api/push/getPlayUrl', | |
| 200 | + url: './api/push/getPlayUrl', | |
| 201 | 201 | params: { |
| 202 | 202 | app: row.app, |
| 203 | 203 | stream: row.stream, |
| ... | ... | @@ -223,7 +223,7 @@ export default { |
| 223 | 223 | let that = this; |
| 224 | 224 | that.$axios({ |
| 225 | 225 | method: "post", |
| 226 | - url: "/api/push/stop", | |
| 226 | + url: "./api/push/stop", | |
| 227 | 227 | params: { |
| 228 | 228 | app: row.app, |
| 229 | 229 | streamId: row.stream |
| ... | ... | @@ -247,7 +247,7 @@ export default { |
| 247 | 247 | let that = this; |
| 248 | 248 | that.$axios({ |
| 249 | 249 | method: "delete", |
| 250 | - url: "/api/push/remove_form_gb", | |
| 250 | + url: "./api/push/remove_form_gb", | |
| 251 | 251 | data: row |
| 252 | 252 | }).then((res) => { |
| 253 | 253 | if (res.data.code === 0) { |
| ... | ... | @@ -274,7 +274,7 @@ export default { |
| 274 | 274 | let that = this; |
| 275 | 275 | that.$axios({ |
| 276 | 276 | method: "delete", |
| 277 | - url: "/api/push/batchStop", | |
| 277 | + url: "./api/push/batchStop", | |
| 278 | 278 | data: { |
| 279 | 279 | gbStreams: this.multipleSelection |
| 280 | 280 | } | ... | ... |
web_src/src/components/StreamProxyList.vue
| ... | ... | @@ -167,7 +167,7 @@ |
| 167 | 167 | let that = this; |
| 168 | 168 | this.$axios({ |
| 169 | 169 | method: 'get', |
| 170 | - url:`/api/proxy/list`, | |
| 170 | + url:`./api/proxy/list`, | |
| 171 | 171 | params: { |
| 172 | 172 | page: that.currentPage, |
| 173 | 173 | count: that.count |
| ... | ... | @@ -190,7 +190,7 @@ |
| 190 | 190 | addOnvif: function(){ |
| 191 | 191 | this.$axios({ |
| 192 | 192 | method: 'get', |
| 193 | - url:`/api/onvif/search?timeout=3000`, | |
| 193 | + url:`./api/onvif/search?timeout=3000`, | |
| 194 | 194 | }).then((res) =>{ |
| 195 | 195 | if (res.data.code === 0 ){ |
| 196 | 196 | if (res.data.data.length > 0) { |
| ... | ... | @@ -218,7 +218,7 @@ |
| 218 | 218 | let that = this; |
| 219 | 219 | this.$axios({ |
| 220 | 220 | method: 'get', |
| 221 | - url:`/api/push/getPlayUrl`, | |
| 221 | + url:`./api/push/getPlayUrl`, | |
| 222 | 222 | params: { |
| 223 | 223 | app: row.app, |
| 224 | 224 | stream: row.stream, |
| ... | ... | @@ -247,7 +247,7 @@ |
| 247 | 247 | let that = this; |
| 248 | 248 | that.$axios({ |
| 249 | 249 | method:"delete", |
| 250 | - url:"/api/proxy/del", | |
| 250 | + url:"./api/proxy/del", | |
| 251 | 251 | params:{ |
| 252 | 252 | app: row.app, |
| 253 | 253 | stream: row.stream |
| ... | ... | @@ -263,7 +263,7 @@ |
| 263 | 263 | this.$set(row, 'startBtnLoading', true) |
| 264 | 264 | this.$axios({ |
| 265 | 265 | method: 'get', |
| 266 | - url:`/api/proxy/start`, | |
| 266 | + url:`./api/proxy/start`, | |
| 267 | 267 | params: { |
| 268 | 268 | app: row.app, |
| 269 | 269 | stream: row.stream |
| ... | ... | @@ -295,7 +295,7 @@ |
| 295 | 295 | let that = this; |
| 296 | 296 | this.$axios({ |
| 297 | 297 | method: 'get', |
| 298 | - url:`/api/proxy/stop`, | |
| 298 | + url:`./api/proxy/stop`, | |
| 299 | 299 | params: { |
| 300 | 300 | app: row.app, |
| 301 | 301 | stream: row.stream | ... | ... |
web_src/src/components/UserManager.vue
| ... | ... | @@ -99,7 +99,7 @@ export default { |
| 99 | 99 | this.getUserListLoading = true; |
| 100 | 100 | this.$axios({ |
| 101 | 101 | method: 'get', |
| 102 | - url: `/api/user/users`, | |
| 102 | + url: `./api/user/users`, | |
| 103 | 103 | params: { |
| 104 | 104 | page: that.currentPage, |
| 105 | 105 | count: that.count |
| ... | ... | @@ -141,7 +141,7 @@ export default { |
| 141 | 141 | }).then(() => { |
| 142 | 142 | this.$axios({ |
| 143 | 143 | method: 'delete', |
| 144 | - url: `/api/user/delete?id=${row.id}` | |
| 144 | + url: `./api/user/delete?id=${row.id}` | |
| 145 | 145 | }).then((res) => { |
| 146 | 146 | this.getUserList(); |
| 147 | 147 | }).catch((error) => { | ... | ... |
web_src/src/components/channelList.vue
| ... | ... | @@ -206,7 +206,7 @@ export default { |
| 206 | 206 | if (typeof (this.$route.params.deviceId) == "undefined") return; |
| 207 | 207 | this.$axios({ |
| 208 | 208 | method: 'get', |
| 209 | - url: `/api/device/query/devices/${this.$route.params.deviceId}/channels`, | |
| 209 | + url: `./api/device/query/devices/${this.$route.params.deviceId}/channels`, | |
| 210 | 210 | params: { |
| 211 | 211 | page: that.currentPage, |
| 212 | 212 | count: that.count, |
| ... | ... | @@ -238,7 +238,7 @@ export default { |
| 238 | 238 | let that = this; |
| 239 | 239 | this.$axios({ |
| 240 | 240 | method: 'get', |
| 241 | - url: '/api/play/start/' + deviceId + '/' + channelId | |
| 241 | + url: './api/play/start/' + deviceId + '/' + channelId | |
| 242 | 242 | }).then(function (res) { |
| 243 | 243 | console.log(res) |
| 244 | 244 | that.isLoging = false; |
| ... | ... | @@ -278,7 +278,7 @@ export default { |
| 278 | 278 | var that = this; |
| 279 | 279 | this.$axios({ |
| 280 | 280 | method: 'get', |
| 281 | - url: '/api/play/stop/' + this.deviceId + "/" + itemData.channelId | |
| 281 | + url: './api/play/stop/' + this.deviceId + "/" + itemData.channelId | |
| 282 | 282 | }).then(function (res) { |
| 283 | 283 | that.initData(); |
| 284 | 284 | }).catch(function (error) { |
| ... | ... | @@ -334,7 +334,7 @@ export default { |
| 334 | 334 | if (!this.showTree) { |
| 335 | 335 | this.$axios({ |
| 336 | 336 | method: 'get', |
| 337 | - url: `/api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`, | |
| 337 | + url: `./api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`, | |
| 338 | 338 | params: { |
| 339 | 339 | page: this.currentPage, |
| 340 | 340 | count: this.count, |
| ... | ... | @@ -358,7 +358,7 @@ export default { |
| 358 | 358 | }else { |
| 359 | 359 | this.$axios({ |
| 360 | 360 | method: 'get', |
| 361 | - url: `/api/device/query/tree/channel/${this.deviceId}`, | |
| 361 | + url: `./api/device/query/tree/channel/${this.deviceId}`, | |
| 362 | 362 | params: { |
| 363 | 363 | parentId: this.parentChannelId, |
| 364 | 364 | page: this.currentPage, |
| ... | ... | @@ -387,7 +387,7 @@ export default { |
| 387 | 387 | updateChannel: function (row) { |
| 388 | 388 | this.$axios({ |
| 389 | 389 | method: 'post', |
| 390 | - url: `/api/device/query/channel/update/${this.deviceId}`, | |
| 390 | + url: `./api/device/query/channel/update/${this.deviceId}`, | |
| 391 | 391 | params: row |
| 392 | 392 | }).then(function (res) { |
| 393 | 393 | console.log(JSON.stringify(res)); | ... | ... |
web_src/src/components/console.vue
| ... | ... | @@ -114,7 +114,7 @@ export default { |
| 114 | 114 | getSystemInfo: function (){ |
| 115 | 115 | this.$axios({ |
| 116 | 116 | method: 'get', |
| 117 | - url: `/api/server/system/info`, | |
| 117 | + url: `./api/server/system/info`, | |
| 118 | 118 | }).then( (res)=> { |
| 119 | 119 | if (res.data.code === 0) { |
| 120 | 120 | this.$refs.consoleCPU.setData(res.data.data.cpu) |
| ... | ... | @@ -128,7 +128,7 @@ export default { |
| 128 | 128 | getLoad: function (){ |
| 129 | 129 | this.$axios({ |
| 130 | 130 | method: 'get', |
| 131 | - url: `/api/server/media_server/load`, | |
| 131 | + url: `./api/server/media_server/load`, | |
| 132 | 132 | }).then( (res)=> { |
| 133 | 133 | if (res.data.code === 0) { |
| 134 | 134 | this.$refs.consoleNodeLoad.setData(res.data.data) |
| ... | ... | @@ -139,7 +139,7 @@ export default { |
| 139 | 139 | getResourceInfo: function (){ |
| 140 | 140 | this.$axios({ |
| 141 | 141 | method: 'get', |
| 142 | - url: `/api/server/resource/info`, | |
| 142 | + url: `./api/server/resource/info`, | |
| 143 | 143 | }).then( (res)=> { |
| 144 | 144 | if (res.data.code === 0) { |
| 145 | 145 | this.$refs.consoleResource.setData(res.data.data) |
| ... | ... | @@ -151,7 +151,7 @@ export default { |
| 151 | 151 | |
| 152 | 152 | this.$axios({ |
| 153 | 153 | method: 'get', |
| 154 | - url: `/api/server/system/configInfo`, | |
| 154 | + url: `./api/server/system/configInfo`, | |
| 155 | 155 | }).then( (res)=> { |
| 156 | 156 | console.log(res) |
| 157 | 157 | if (res.data.code === 0) { | ... | ... |
web_src/src/components/dialog/MediaServerEdit.vue
| ... | ... | @@ -335,7 +335,7 @@ export default { |
| 335 | 335 | var that = this; |
| 336 | 336 | await that.$axios({ |
| 337 | 337 | method: 'get', |
| 338 | - url:`/api/platform/exit/${deviceGbId}` | |
| 338 | + url:`./api/platform/exit/${deviceGbId}` | |
| 339 | 339 | }).then(function (res) { |
| 340 | 340 | result = res.data; |
| 341 | 341 | }).catch(function (error) { | ... | ... |
web_src/src/components/dialog/StreamProxyEdit.vue
| ... | ... | @@ -195,7 +195,7 @@ export default { |
| 195 | 195 | let that = this; |
| 196 | 196 | this.$axios({ |
| 197 | 197 | method: 'get', |
| 198 | - url:`/api/platform/query/10000/1` | |
| 198 | + url:`./api/platform/query/10000/1` | |
| 199 | 199 | }).then(function (res) { |
| 200 | 200 | that.platformList = res.data.data.list; |
| 201 | 201 | }).catch(function (error) { |
| ... | ... | @@ -212,7 +212,7 @@ export default { |
| 212 | 212 | if (that.proxyParam.mediaServerId !== "auto"){ |
| 213 | 213 | that.$axios({ |
| 214 | 214 | method: 'get', |
| 215 | - url:`/api/proxy/ffmpeg_cmd/list`, | |
| 215 | + url:`./api/proxy/ffmpeg_cmd/list`, | |
| 216 | 216 | params: { |
| 217 | 217 | mediaServerId: that.proxyParam.mediaServerId |
| 218 | 218 | } |
| ... | ... | @@ -230,7 +230,7 @@ export default { |
| 230 | 230 | this.noneReaderHandler(); |
| 231 | 231 | this.$axios({ |
| 232 | 232 | method: 'post', |
| 233 | - url:`/api/proxy/save`, | |
| 233 | + url:`./api/proxy/save`, | |
| 234 | 234 | data: this.proxyParam |
| 235 | 235 | }).then((res)=> { |
| 236 | 236 | this.dialogLoading = false; |
| ... | ... | @@ -261,7 +261,7 @@ export default { |
| 261 | 261 | var that = this; |
| 262 | 262 | await that.$axios({ |
| 263 | 263 | method: 'get', |
| 264 | - url:`/api/platform/exit/${deviceGbId}` | |
| 264 | + url:`./api/platform/exit/${deviceGbId}` | |
| 265 | 265 | }).then(function (res) { |
| 266 | 266 | result = res.data; |
| 267 | 267 | }).catch(function (error) { | ... | ... |
web_src/src/components/dialog/SyncChannelProgress.vue
| ... | ... | @@ -55,7 +55,7 @@ export default { |
| 55 | 55 | getProgress(){ |
| 56 | 56 | this.$axios({ |
| 57 | 57 | method: 'get', |
| 58 | - url:`/api/device/query/${this.deviceId}/sync_status/`, | |
| 58 | + url:`./api/device/query/${this.deviceId}/sync_status/`, | |
| 59 | 59 | }).then((res) => { |
| 60 | 60 | if (res.data.code === 0) { |
| 61 | 61 | if (!this.syncFlag) { | ... | ... |
web_src/src/components/dialog/addUser.vue
| ... | ... | @@ -100,7 +100,7 @@ export default { |
| 100 | 100 | onSubmit: function () { |
| 101 | 101 | this.$axios({ |
| 102 | 102 | method: 'post', |
| 103 | - url: "/api/user/add", | |
| 103 | + url: "./api/user/add", | |
| 104 | 104 | params: { |
| 105 | 105 | username: this.username, |
| 106 | 106 | password: this.password, |
| ... | ... | @@ -139,7 +139,7 @@ export default { |
| 139 | 139 | |
| 140 | 140 | this.$axios({ |
| 141 | 141 | method: 'get', |
| 142 | - url: "/api/role/all" | |
| 142 | + url: "./api/role/all" | |
| 143 | 143 | }).then((res) => { |
| 144 | 144 | this.loading = true; |
| 145 | 145 | if (res.data.code === 0) { | ... | ... |
web_src/src/components/dialog/catalogEdit.vue
| ... | ... | @@ -116,7 +116,7 @@ export default { |
| 116 | 116 | console.log(this.form); |
| 117 | 117 | this.$axios({ |
| 118 | 118 | method:"post", |
| 119 | - url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`, | |
| 119 | + url:`./api/platform/catalog/${!this.isEdit? "add":"edit"}`, | |
| 120 | 120 | data: this.form |
| 121 | 121 | }).then((res)=> { |
| 122 | 122 | if (res.data.code === 0) { | ... | ... |
web_src/src/components/dialog/changePassword.vue
| ... | ... | @@ -90,7 +90,7 @@ export default { |
| 90 | 90 | onSubmit: function () { |
| 91 | 91 | this.$axios({ |
| 92 | 92 | method: 'post', |
| 93 | - url:"/api/user/changePassword", | |
| 93 | + url:"./api/user/changePassword", | |
| 94 | 94 | params: { |
| 95 | 95 | oldPassword: crypto.createHash('md5').update(this.oldPassword, "utf8").digest('hex'), |
| 96 | 96 | password: this.newPassword | ... | ... |
web_src/src/components/dialog/changePasswordForAdmin.vue
web_src/src/components/dialog/changePushKey.vue
web_src/src/components/dialog/channelMapInfobox.vue
| ... | ... | @@ -44,7 +44,7 @@ export default { |
| 44 | 44 | let that = this; |
| 45 | 45 | this.$axios({ |
| 46 | 46 | method: 'get', |
| 47 | - url: '/api/play/start/' + deviceId + '/' + channelId | |
| 47 | + url: './api/play/start/' + deviceId + '/' + channelId | |
| 48 | 48 | }).then(function (res) { |
| 49 | 49 | that.isLoging = false; |
| 50 | 50 | if (res.data.code === 0) { | ... | ... |
web_src/src/components/dialog/chooseChannel.vue
web_src/src/components/dialog/chooseChannelForCatalog.vue
| ... | ... | @@ -82,7 +82,7 @@ export default { |
| 82 | 82 | let that = this; |
| 83 | 83 | this.$axios({ |
| 84 | 84 | method:"get", |
| 85 | - url:`/api/platform/catalog`, | |
| 85 | + url:`./api/platform/catalog`, | |
| 86 | 86 | params: { |
| 87 | 87 | platformId: that.platformId, |
| 88 | 88 | parentId: parentId |
| ... | ... | @@ -134,7 +134,7 @@ export default { |
| 134 | 134 | removeCatalog: function (id, node){ |
| 135 | 135 | this.$axios({ |
| 136 | 136 | method:"delete", |
| 137 | - url:`/api/platform/catalog/del`, | |
| 137 | + url:`./api/platform/catalog/del`, | |
| 138 | 138 | params: { |
| 139 | 139 | id: id, |
| 140 | 140 | platformId: this.platformId, |
| ... | ... | @@ -156,7 +156,7 @@ export default { |
| 156 | 156 | setDefaultCatalog: function (id){ |
| 157 | 157 | this.$axios({ |
| 158 | 158 | method:"post", |
| 159 | - url:`/api/platform/catalog/default/update`, | |
| 159 | + url:`./api/platform/catalog/default/update`, | |
| 160 | 160 | params: { |
| 161 | 161 | platformId: this.platformId, |
| 162 | 162 | catalogId: id, |
| ... | ... | @@ -201,7 +201,7 @@ export default { |
| 201 | 201 | onClick: () => { |
| 202 | 202 | this.$axios({ |
| 203 | 203 | method:"delete", |
| 204 | - url:"/api/platform/catalog/relation/del", | |
| 204 | + url:"./api/platform/catalog/relation/del", | |
| 205 | 205 | data: data |
| 206 | 206 | }).then((res)=>{ |
| 207 | 207 | console.log("移除成功") | ... | ... |
web_src/src/components/dialog/chooseChannelForGb.vue
| ... | ... | @@ -121,7 +121,7 @@ export default { |
| 121 | 121 | this.getCatalogFromUser((catalogId)=> { |
| 122 | 122 | this.$axios({ |
| 123 | 123 | method:"post", |
| 124 | - url:"/api/platform/update_channel_for_gb", | |
| 124 | + url:"./api/platform/update_channel_for_gb", | |
| 125 | 125 | data:{ |
| 126 | 126 | platformId: this.platformId, |
| 127 | 127 | all: all, |
| ... | ... | @@ -149,7 +149,7 @@ export default { |
| 149 | 149 | |
| 150 | 150 | this.$axios({ |
| 151 | 151 | method:"delete", |
| 152 | - url:"/api/platform/del_channel_for_gb", | |
| 152 | + url:"./api/platform/del_channel_for_gb", | |
| 153 | 153 | data:{ |
| 154 | 154 | platformId: this.platformId, |
| 155 | 155 | all: all, |
| ... | ... | @@ -248,7 +248,7 @@ export default { |
| 248 | 248 | |
| 249 | 249 | this.$axios({ |
| 250 | 250 | method:"get", |
| 251 | - url:`/api/platform/channel_list`, | |
| 251 | + url:`./api/platform/channel_list`, | |
| 252 | 252 | params: { |
| 253 | 253 | page: that.currentPage, |
| 254 | 254 | count: that.count, |
| ... | ... | @@ -290,7 +290,7 @@ export default { |
| 290 | 290 | }).then(() => { |
| 291 | 291 | this.$axios({ |
| 292 | 292 | method:"delete", |
| 293 | - url:"/api/platform/del_channel_for_gb", | |
| 293 | + url:"./api/platform/del_channel_for_gb", | |
| 294 | 294 | data:{ |
| 295 | 295 | platformId: this.platformId, |
| 296 | 296 | channelReduces: this.multipleSelection |
| ... | ... | @@ -310,7 +310,7 @@ export default { |
| 310 | 310 | |
| 311 | 311 | this.$axios({ |
| 312 | 312 | method: "post", |
| 313 | - url: "/api/platform/update_channel_for_gb", | |
| 313 | + url: "./api/platform/update_channel_for_gb", | |
| 314 | 314 | data: { |
| 315 | 315 | platformId: this.platformId, |
| 316 | 316 | channelReduces: this.multipleSelection, | ... | ... |
web_src/src/components/dialog/chooseChannelForStream.vue
| ... | ... | @@ -134,7 +134,7 @@ export default { |
| 134 | 134 | this.getCatalogFromUser((catalogId)=>{ |
| 135 | 135 | this.$axios({ |
| 136 | 136 | method:"post", |
| 137 | - url:"/api/gbStream/add", | |
| 137 | + url:"./api/gbStream/add", | |
| 138 | 138 | data:{ |
| 139 | 139 | platformId: this.platformId, |
| 140 | 140 | catalogId: catalogId, |
| ... | ... | @@ -163,7 +163,7 @@ export default { |
| 163 | 163 | |
| 164 | 164 | this.$axios({ |
| 165 | 165 | method:"delete", |
| 166 | - url:"/api/gbStream/del", | |
| 166 | + url:"./api/gbStream/del", | |
| 167 | 167 | data:{ |
| 168 | 168 | platformId: this.platformId, |
| 169 | 169 | all: all, |
| ... | ... | @@ -186,7 +186,7 @@ export default { |
| 186 | 186 | |
| 187 | 187 | this.$axios({ |
| 188 | 188 | method: 'get', |
| 189 | - url:`/api/gbStream/list`, | |
| 189 | + url:`./api/gbStream/list`, | |
| 190 | 190 | params: { |
| 191 | 191 | page: that.currentPage, |
| 192 | 192 | count: that.count, |
| ... | ... | @@ -222,7 +222,7 @@ export default { |
| 222 | 222 | }).then(() => { |
| 223 | 223 | this.$axios({ |
| 224 | 224 | method:"delete", |
| 225 | - url:"/api/gbStream/del", | |
| 225 | + url:"./api/gbStream/del", | |
| 226 | 226 | data:{ |
| 227 | 227 | platformId: this.platformId, |
| 228 | 228 | gbStreams: this.multipleSelection, |
| ... | ... | @@ -242,7 +242,7 @@ export default { |
| 242 | 242 | this.getCatalogFromUser((catalogId)=>{ |
| 243 | 243 | this.$axios({ |
| 244 | 244 | method:"post", |
| 245 | - url:"/api/gbStream/add", | |
| 245 | + url:"./api/gbStream/add", | |
| 246 | 246 | data:{ |
| 247 | 247 | platformId: this.platformId, |
| 248 | 248 | catalogId: catalogId, | ... | ... |
web_src/src/components/dialog/deviceEdit.vue
| ... | ... | @@ -131,7 +131,7 @@ export default { |
| 131 | 131 | this.form.mobilePositionSubmissionInterval = this.form.mobilePositionSubmissionInterval||0 |
| 132 | 132 | this.$axios({ |
| 133 | 133 | method: 'post', |
| 134 | - url:`/api/device/query/device/${this.isEdit?'update':'add'}/`, | |
| 134 | + url:`./api/device/query/device/${this.isEdit?'update':'add'}/`, | |
| 135 | 135 | params: this.form |
| 136 | 136 | }).then((res) => { |
| 137 | 137 | console.log(res.data) | ... | ... |
web_src/src/components/dialog/devicePlayer.vue
| ... | ... | @@ -320,7 +320,7 @@ export default { |
| 320 | 320 | if (tab.name === "codec") { |
| 321 | 321 | this.$axios({ |
| 322 | 322 | method: 'get', |
| 323 | - url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtsp&app='+ this.app +'&stream='+ this.streamId | |
| 323 | + url: './zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtsp&app='+ this.app +'&stream='+ this.streamId | |
| 324 | 324 | }).then(function (res) { |
| 325 | 325 | that.tracksLoading = false; |
| 326 | 326 | if (res.data.code == 0 && res.data.tracks) { |
| ... | ... | @@ -397,7 +397,7 @@ export default { |
| 397 | 397 | this.$refs[this.activePlayer].pause() |
| 398 | 398 | that.$axios({ |
| 399 | 399 | method: 'post', |
| 400 | - url: '/api/play/convert/' + that.streamId | |
| 400 | + url: './api/play/convert/' + that.streamId | |
| 401 | 401 | }).then(function (res) { |
| 402 | 402 | if (res.data.code === 0) { |
| 403 | 403 | that.convertKey = res.data.key; |
| ... | ... | @@ -434,7 +434,7 @@ export default { |
| 434 | 434 | that.$refs.videoPlayer.pause() |
| 435 | 435 | this.$axios({ |
| 436 | 436 | method: 'post', |
| 437 | - url: '/api/play/convertStop/' + this.convertKey | |
| 437 | + url: './api/play/convertStop/' + this.convertKey | |
| 438 | 438 | }).then(function (res) { |
| 439 | 439 | if (res.data.code == 0) { |
| 440 | 440 | console.log(res.data.msg) |
| ... | ... | @@ -494,7 +494,7 @@ export default { |
| 494 | 494 | let that = this; |
| 495 | 495 | this.$axios({ |
| 496 | 496 | method: 'post', |
| 497 | - url: '/api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed | |
| 497 | + url: './api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed | |
| 498 | 498 | }).then(function (res) {}); |
| 499 | 499 | }, |
| 500 | 500 | //////////////////////播放器事件处理////////////////////////// |
| ... | ... | @@ -506,7 +506,7 @@ export default { |
| 506 | 506 | let that = this; |
| 507 | 507 | this.$axios({ |
| 508 | 508 | method: 'post', |
| 509 | - url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=0¶meter2=' + presetPos + '&combindCode2=0' | |
| 509 | + url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=0¶meter2=' + presetPos + '&combindCode2=0' | |
| 510 | 510 | }).then(function (res) {}); |
| 511 | 511 | }, |
| 512 | 512 | setSpeedOrTime: function (cmdCode, groupNum, parameter) { |
| ... | ... | @@ -516,7 +516,7 @@ export default { |
| 516 | 516 | console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter2.toString(16) + ' 0x' + combindCode2.toString(16)); |
| 517 | 517 | this.$axios({ |
| 518 | 518 | method: 'post', |
| 519 | - url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter2 + '&combindCode2=' + combindCode2 | |
| 519 | + url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter2 + '&combindCode2=' + combindCode2 | |
| 520 | 520 | }).then(function (res) {}); |
| 521 | 521 | }, |
| 522 | 522 | setCommand: function (cmdCode, groupNum, parameter) { |
| ... | ... | @@ -524,7 +524,7 @@ export default { |
| 524 | 524 | console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter.toString(16) + ' 0x0'); |
| 525 | 525 | this.$axios({ |
| 526 | 526 | method: 'post', |
| 527 | - url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter + '&combindCode2=0' | |
| 527 | + url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter + '&combindCode2=0' | |
| 528 | 528 | }).then(function (res) {}); |
| 529 | 529 | }, |
| 530 | 530 | copyUrl: function (dropdownItem){ | ... | ... |
web_src/src/components/dialog/getCatalog.vue
| ... | ... | @@ -89,7 +89,7 @@ export default { |
| 89 | 89 | let that = this; |
| 90 | 90 | this.$axios({ |
| 91 | 91 | method:"get", |
| 92 | - url:`/api/platform/catalog`, | |
| 92 | + url:`./api/platform/catalog`, | |
| 93 | 93 | params: { |
| 94 | 94 | platformId: that.platformId, |
| 95 | 95 | parentId: parentId |
| ... | ... | @@ -111,7 +111,7 @@ export default { |
| 111 | 111 | if (node.level === 0) { |
| 112 | 112 | this.$axios({ |
| 113 | 113 | method:"get", |
| 114 | - url:`/api/platform/info/` + this.platformId, | |
| 114 | + url:`./api/platform/info/` + this.platformId, | |
| 115 | 115 | }) |
| 116 | 116 | .then((res)=> { |
| 117 | 117 | if (res.data.code === 0) { | ... | ... |
web_src/src/components/dialog/importChannel.vue
| ... | ... | @@ -60,7 +60,7 @@ export default { |
| 60 | 60 | console.log(this.form); |
| 61 | 61 | this.$axios({ |
| 62 | 62 | method:"post", |
| 63 | - url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`, | |
| 63 | + url:`./api/platform/catalog/${!this.isEdit? "add":"edit"}`, | |
| 64 | 64 | data: this.form |
| 65 | 65 | }) |
| 66 | 66 | .then((res)=> { | ... | ... |
web_src/src/components/dialog/onvifEdit.vue
web_src/src/components/dialog/platformEdit.vue
| ... | ... | @@ -138,7 +138,7 @@ export default { |
| 138 | 138 | showDialog: false, |
| 139 | 139 | isLoging: false, |
| 140 | 140 | onSubmit_text: "立即创建", |
| 141 | - saveUrl: "/api/platform/save", | |
| 141 | + saveUrl: "./api/platform/save", | |
| 142 | 142 | |
| 143 | 143 | platform: { |
| 144 | 144 | id: null, |
| ... | ... | @@ -192,7 +192,7 @@ export default { |
| 192 | 192 | this.saveUrl = "/api/platform/add"; |
| 193 | 193 | this.$axios({ |
| 194 | 194 | method: 'get', |
| 195 | - url:`/api/platform/server_config` | |
| 195 | + url:`./api/platform/server_config` | |
| 196 | 196 | }).then(function (res) { |
| 197 | 197 | console.log(res); |
| 198 | 198 | if (res.data.code === 0) { |
| ... | ... | @@ -315,7 +315,7 @@ export default { |
| 315 | 315 | var that = this; |
| 316 | 316 | await that.$axios({ |
| 317 | 317 | method: 'get', |
| 318 | - url:`/api/platform/exit/${deviceGbId}`}) | |
| 318 | + url:`./api/platform/exit/${deviceGbId}`}) | |
| 319 | 319 | .then(function (res) { |
| 320 | 320 | if (res.data.code === 0) { |
| 321 | 321 | result = res.data.data; | ... | ... |
web_src/src/components/dialog/pushStreamEdit.vue
| ... | ... | @@ -109,7 +109,7 @@ export default { |
| 109 | 109 | if (this.edit) { |
| 110 | 110 | this.$axios({ |
| 111 | 111 | method:"post", |
| 112 | - url:`/api/push/save_to_gb`, | |
| 112 | + url:`./api/push/save_to_gb`, | |
| 113 | 113 | data: this.proxyParam |
| 114 | 114 | }).then( (res) => { |
| 115 | 115 | if (res.data.code === 0) { |
| ... | ... | @@ -129,7 +129,7 @@ export default { |
| 129 | 129 | }else { |
| 130 | 130 | this.$axios({ |
| 131 | 131 | method:"post", |
| 132 | - url:`/api/push/add`, | |
| 132 | + url:`./api/push/add`, | |
| 133 | 133 | data: this.proxyParam |
| 134 | 134 | }).then( (res) => { |
| 135 | 135 | if (res.data.code === 0) { |
| ... | ... | @@ -159,7 +159,7 @@ export default { |
| 159 | 159 | var that = this; |
| 160 | 160 | await that.$axios({ |
| 161 | 161 | method:"get", |
| 162 | - url:`/api/platform/exit/${deviceGbId}` | |
| 162 | + url:`./api/platform/exit/${deviceGbId}` | |
| 163 | 163 | }).then(function (res) { |
| 164 | 164 | result = res.data; |
| 165 | 165 | }).catch(function (error) { | ... | ... |
web_src/src/components/dialog/queryTrace.vue
| ... | ... | @@ -72,7 +72,7 @@ export default { |
| 72 | 72 | onSubmit: function () { |
| 73 | 73 | console.log("onSubmit"); |
| 74 | 74 | this.isLoging = true; |
| 75 | - let url = `/api/position/history/${this.channel.deviceId}?start=${this.searchFrom}&end=${this.searchTo}`; | |
| 75 | + let url = `./api/position/history/${this.channel.deviceId}?start=${this.searchFrom}&end=${this.searchTo}`; | |
| 76 | 76 | if (this.channel.channelId) { |
| 77 | 77 | url+="&channelId=${this.channel.channelId}" |
| 78 | 78 | } | ... | ... |
web_src/src/components/dialog/recordDownload.vue
| ... | ... | @@ -71,7 +71,7 @@ export default { |
| 71 | 71 | getProgress: function (callback){ |
| 72 | 72 | this.$axios({ |
| 73 | 73 | method: 'get', |
| 74 | - url: `/api/gb_record/download/progress/${this.deviceId}/${this.channelId}/${this.stream}` | |
| 74 | + url: `./api/gb_record/download/progress/${this.deviceId}/${this.channelId}/${this.stream}` | |
| 75 | 75 | }).then((res)=> { |
| 76 | 76 | console.log(res) |
| 77 | 77 | if (res.data.code === 0) { |
| ... | ... | @@ -124,7 +124,7 @@ export default { |
| 124 | 124 | stopDownloadRecord: function (callback) { |
| 125 | 125 | this.$axios({ |
| 126 | 126 | method: 'get', |
| 127 | - url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.stream | |
| 127 | + url: './api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.stream | |
| 128 | 128 | }).then((res)=> { |
| 129 | 129 | if (callback) callback(res) |
| 130 | 130 | }); |
| ... | ... | @@ -132,7 +132,7 @@ export default { |
| 132 | 132 | getFileDownload: function (){ |
| 133 | 133 | this.$axios({ |
| 134 | 134 | method: 'get', |
| 135 | - url:`/record_proxy/${this.mediaServerId}/api/record/file/download/task/add`, | |
| 135 | + url:`./record_proxy/${this.mediaServerId}/api/record/file/download/task/add`, | |
| 136 | 136 | params: { |
| 137 | 137 | app: this.app, |
| 138 | 138 | stream: this.stream, |
| ... | ... | @@ -164,7 +164,7 @@ export default { |
| 164 | 164 | getProgressForFile: function (callback){ |
| 165 | 165 | this.$axios({ |
| 166 | 166 | method: 'get', |
| 167 | - url:`/record_proxy/${this.mediaServerId}/api/record/file/download/task/list`, | |
| 167 | + url:`./record_proxy/${this.mediaServerId}/api/record/file/download/task/list`, | |
| 168 | 168 | params: { |
| 169 | 169 | app: this.app, |
| 170 | 170 | stream: this.stream, | ... | ... |
web_src/src/components/live.vue
| ... | ... | @@ -135,7 +135,7 @@ export default { |
| 135 | 135 | this.loading = true |
| 136 | 136 | this.$axios({ |
| 137 | 137 | method: 'get', |
| 138 | - url: '/api/play/start/' + deviceId + '/' + channelId | |
| 138 | + url: './api/play/start/' + deviceId + '/' + channelId | |
| 139 | 139 | }).then(function (res) { |
| 140 | 140 | if (res.data.code === 0 && res.data.data) { |
| 141 | 141 | let videoUrl; | ... | ... |
web_src/src/components/map.vue
| ... | ... | @@ -298,7 +298,7 @@ export default { |
| 298 | 298 | let that = this; |
| 299 | 299 | this.$axios({ |
| 300 | 300 | method: 'get', |
| 301 | - url: '/api/play/start/' + deviceId + '/' + channelId | |
| 301 | + url: './api/play/start/' + deviceId + '/' + channelId | |
| 302 | 302 | }).then(function (res) { |
| 303 | 303 | that.isLoging = false; |
| 304 | 304 | if (res.data.code === 0) { | ... | ... |
web_src/src/components/service/DeviceService.js
| ... | ... | @@ -9,7 +9,7 @@ class DeviceService{ |
| 9 | 9 | getDeviceList(currentPage, count, callback, errorCallback){ |
| 10 | 10 | this.$axios({ |
| 11 | 11 | method: 'get', |
| 12 | - url:`/api/device/query/devices`, | |
| 12 | + url:`./api/device/query/devices`, | |
| 13 | 13 | params: { |
| 14 | 14 | page: currentPage, |
| 15 | 15 | count: count |
| ... | ... | @@ -25,7 +25,7 @@ class DeviceService{ |
| 25 | 25 | getDevice(deviceId, callback, errorCallback){ |
| 26 | 26 | this.$axios({ |
| 27 | 27 | method: 'get', |
| 28 | - url:`/api/device/query/devices/${deviceId}`, | |
| 28 | + url:`./api/device/query/devices/${deviceId}`, | |
| 29 | 29 | }).then((res) => { |
| 30 | 30 | if (typeof (callback) == "function") callback(res.data) |
| 31 | 31 | }).catch((error) => { |
| ... | ... | @@ -82,7 +82,7 @@ class DeviceService{ |
| 82 | 82 | getChanel(isCatalog, catalogUnderDevice, deviceId, currentPage, count, callback, errorCallback) { |
| 83 | 83 | this.$axios({ |
| 84 | 84 | method: 'get', |
| 85 | - url: `/api/device/query/devices/${deviceId}/channels`, | |
| 85 | + url: `./api/device/query/devices/${deviceId}/channels`, | |
| 86 | 86 | params:{ |
| 87 | 87 | page: currentPage, |
| 88 | 88 | count: count, |
| ... | ... | @@ -121,7 +121,7 @@ class DeviceService{ |
| 121 | 121 | getSubChannel(isCatalog, deviceId, channelId, currentPage, count, callback, errorCallback) { |
| 122 | 122 | this.$axios({ |
| 123 | 123 | method: 'get', |
| 124 | - url: `/api/device/query/sub_channels/${deviceId}/${channelId}/channels`, | |
| 124 | + url: `./api/device/query/sub_channels/${deviceId}/${channelId}/channels`, | |
| 125 | 125 | params:{ |
| 126 | 126 | page: currentPage, |
| 127 | 127 | count: count, |
| ... | ... | @@ -161,7 +161,7 @@ class DeviceService{ |
| 161 | 161 | } |
| 162 | 162 | this.$axios({ |
| 163 | 163 | method: 'get', |
| 164 | - url: `/api/device/query/tree/${deviceId}`, | |
| 164 | + url: `./api/device/query/tree/${deviceId}`, | |
| 165 | 165 | params:{ |
| 166 | 166 | page: currentPage, |
| 167 | 167 | count: count, | ... | ... |
web_src/src/components/service/MediaServer.js
| ... | ... | @@ -9,7 +9,7 @@ class MediaServer{ |
| 9 | 9 | getOnlineMediaServerList(callback){ |
| 10 | 10 | this.$axios({ |
| 11 | 11 | method: 'get', |
| 12 | - url:`/api/server/media_server/online/list`, | |
| 12 | + url:`./api/server/media_server/online/list`, | |
| 13 | 13 | }).then((res) => { |
| 14 | 14 | if (typeof (callback) == "function") callback(res.data) |
| 15 | 15 | }).catch((error) => { |
| ... | ... | @@ -19,7 +19,7 @@ class MediaServer{ |
| 19 | 19 | getMediaServerList(callback){ |
| 20 | 20 | this.$axios({ |
| 21 | 21 | method: 'get', |
| 22 | - url:`/api/server/media_server/list`, | |
| 22 | + url:`./api/server/media_server/list`, | |
| 23 | 23 | }).then(function (res) { |
| 24 | 24 | if (typeof (callback) == "function") callback(res.data) |
| 25 | 25 | }).catch(function (error) { |
| ... | ... | @@ -30,7 +30,7 @@ class MediaServer{ |
| 30 | 30 | getMediaServer(id, callback){ |
| 31 | 31 | this.$axios({ |
| 32 | 32 | method: 'get', |
| 33 | - url:`/api/server/media_server/one/` + id, | |
| 33 | + url:`./api/server/media_server/one/` + id, | |
| 34 | 34 | }).then(function (res) { |
| 35 | 35 | if (typeof (callback) == "function") callback(res.data) |
| 36 | 36 | }).catch(function (error) { |
| ... | ... | @@ -41,7 +41,7 @@ class MediaServer{ |
| 41 | 41 | checkServer(param, callback){ |
| 42 | 42 | this.$axios({ |
| 43 | 43 | method: 'get', |
| 44 | - url:`/api/server/media_server/check`, | |
| 44 | + url:`./api/server/media_server/check`, | |
| 45 | 45 | params: { |
| 46 | 46 | ip: param.ip, |
| 47 | 47 | port: param.httpPort, |
| ... | ... | @@ -57,7 +57,7 @@ class MediaServer{ |
| 57 | 57 | checkRecordServer(param, callback){ |
| 58 | 58 | this.$axios({ |
| 59 | 59 | method: 'get', |
| 60 | - url:`/api/server/media_server/record/check`, | |
| 60 | + url:`./api/server/media_server/record/check`, | |
| 61 | 61 | params: { |
| 62 | 62 | ip: param.ip, |
| 63 | 63 | port: param.recordAssistPort |
| ... | ... | @@ -72,7 +72,7 @@ class MediaServer{ |
| 72 | 72 | addServer(param, callback){ |
| 73 | 73 | this.$axios({ |
| 74 | 74 | method: 'post', |
| 75 | - url:`/api/server/media_server/save`, | |
| 75 | + url:`./api/server/media_server/save`, | |
| 76 | 76 | data: param |
| 77 | 77 | }).then(function (res) { |
| 78 | 78 | if (typeof (callback) == "function") callback(res.data) |
| ... | ... | @@ -84,7 +84,7 @@ class MediaServer{ |
| 84 | 84 | delete(id, callback) { |
| 85 | 85 | this.$axios({ |
| 86 | 86 | method: 'delete', |
| 87 | - url:`/api/server/media_server/delete`, | |
| 87 | + url:`./api/server/media_server/delete`, | |
| 88 | 88 | params: { |
| 89 | 89 | id: id |
| 90 | 90 | } | ... | ... |