Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
huaxin-rq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
huaxin-rq
Commits
4ed87df2
Commit
4ed87df2
authored
Jun 05, 2026
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多平台视频播放修改
parent
a793e91c
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
179 additions
and
224 deletions
+179
-224
pom.xml
huaxin-admin/pom.xml
+0
-7
ArtemisController.java
...va/com/zehong/web/controller/video/ArtemisController.java
+8
-2
HonghaiArtemisController.java
...zehong/web/controller/video/HonghaiArtemisController.java
+0
-197
application-dev.yml
huaxin-admin/src/main/resources/application-dev.yml
+14
-1
application-prd.yml
huaxin-admin/src/main/resources/application-prd.yml
+14
-1
application-test.yml
huaxin-admin/src/main/resources/application-test.yml
+14
-1
pom.xml
huaxin-framework/pom.xml
+7
-0
HikvisionProperties.java
...java/com/zehong/framework/config/HikvisionProperties.java
+64
-0
ResourcesConfig.java
...ain/java/com/zehong/framework/config/ResourcesConfig.java
+9
-0
ArtemisInterceptor.java
.../com/zehong/framework/interceptor/ArtemisInterceptor.java
+41
-0
TVideoManageMapper.xml
...m/src/main/resources/mapper/system/TVideoManageMapper.xml
+1
-1
artemis.js
huaxin-web/src/api/video/artemis.js
+4
-13
PlayVideo.vue
huaxin-web/src/components/Video/PlayVideo.vue
+3
-1
No files found.
huaxin-admin/pom.xml
View file @
4ed87df2
...
...
@@ -61,13 +61,6 @@
<artifactId>
huaxin-generator
</artifactId>
</dependency>
<!--海康-->
<dependency>
<groupId>
com.hikvision.ga
</groupId>
<artifactId>
artemis-http-client
</artifactId>
<version>
1.1.3
</version>
</dependency>
</dependencies>
<build>
...
...
huaxin-admin/src/main/java/com/zehong/web/controller/video/ArtemisController.java
View file @
4ed87df2
...
...
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
import
com.hikvision.artemis.sdk.ArtemisHttpUtil
;
import
com.hikvision.artemis.sdk.config.ArtemisConfig
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.exception.CustomException
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.vo.EventSubscriptionVo
;
import
com.zehong.system.domain.vo.EventUnSubscriptionVo
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -23,14 +25,14 @@ public class ArtemisController {
* 如果你选择的是和现场环境对接,host要修改为现场环境的ip,https端口默认为443,http端口默认为80.例如10.33.25.22:443 或者10.33.25.22:80
* appKey和appSecret请按照或得到的appKey和appSecret更改.
*/
static
{
/*
static {
// 代理API网关nginx服务器ip端口
ArtemisConfig.host = "60.3.252.114:10443";
// 秘钥appkey
ArtemisConfig.appKey = "29791064";
// 秘钥appSecret
ArtemisConfig.appSecret = "EArAS02rV0krs1waU5nE";
}
}
*/
/**
* 能力开放平台的网站路径
*/
...
...
@@ -90,6 +92,7 @@ public class ArtemisController {
String
body
=
jsonBody
.
toJSONString
();
// post请求application/json类型参数
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
if
(
StringUtils
.
isEmpty
(
result
))
throw
new
CustomException
(
"获取海康平台数据失败"
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
...
...
@@ -117,6 +120,7 @@ public class ArtemisController {
String
body
=
jsonBody
.
toJSONString
();
// post请求application/json类型参数
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
if
(
StringUtils
.
isEmpty
(
result
))
throw
new
CustomException
(
"获取海康平台数据失败"
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
...
...
@@ -144,6 +148,7 @@ public class ArtemisController {
String
body
=
jsonBody
.
toJSONString
();
// post请求application/json类型参数
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
if
(
StringUtils
.
isEmpty
(
result
))
throw
new
CustomException
(
"获取海康平台数据失败"
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
...
...
@@ -171,6 +176,7 @@ public class ArtemisController {
}
String
body
=
jsonBody
.
toJSONString
();
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
if
(
StringUtils
.
isEmpty
(
result
))
throw
new
CustomException
(
"获取海康平台数据失败"
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
...
...
huaxin-admin/src/main/java/com/zehong/web/controller/video/HonghaiArtemisController.java
deleted
100644 → 0
View file @
a793e91c
package
com
.
zehong
.
web
.
controller
.
video
;
import
com.alibaba.fastjson.JSONObject
;
import
com.hikvision.artemis.sdk.ArtemisHttpUtil
;
import
com.hikvision.artemis.sdk.config.ArtemisConfig
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.system.domain.vo.EventSubscriptionVo
;
import
com.zehong.system.domain.vo.EventUnSubscriptionVo
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* 鸿海海康视频接口
*/
@RestController
@RequestMapping
(
"/honghai/artemis"
)
public
class
HonghaiArtemisController
{
/**
* 请根据自己的appKey和appSecret更换static静态块中的三个参数. [1 host]
* 如果你选择的是和现场环境对接,host要修改为现场环境的ip,https端口默认为443,http端口默认为80.例如10.33.25.22:443 或者10.33.25.22:80
* appKey和appSecret请按照或得到的appKey和appSecret更改.
*/
static
{
// 代理API网关nginx服务器ip端口
ArtemisConfig
.
host
=
"60.3.252.114:20443"
;
// 秘钥appkey
ArtemisConfig
.
appKey
=
"20289095"
;
// 秘钥appSecret
ArtemisConfig
.
appSecret
=
"2ESpESEYcMNQsnlmsnec"
;
}
/**
* 能力开放平台的网站路径
*/
private
static
final
String
ARTEMIS_PATH
=
"/artemis"
;
/**
* 获取监控点预览取流URL
*/
private
static
final
String
GET_PREVIEWURLS
=
ARTEMIS_PATH
+
"/api/video/v1/cameras/previewURLs"
;
/**
* 分页获取监控点资源
*/
private
static
final
String
GET_CAMERAS
=
ARTEMIS_PATH
+
"/api/resource/v1/cameras"
;
private
static
final
String
VEDIO_CONTROLLING
=
ARTEMIS_PATH
+
"/api/video/v1/ptzs/controlling"
;
/**
* 按事件类型订阅事件
*/
private
static
final
String
EVENT_SUBSCIRPTION_BY_ENVENTTYPES
=
ARTEMIS_PATH
+
"/api/eventService/v1/eventSubscriptionByEventTypes"
;
/**
* 按事件类型取消订阅事件
*/
private
static
final
String
EVENT_UNSUBSCRIPTION_BY_EVENTTYPES
=
ARTEMIS_PATH
+
"/api/eventService/v1/eventUnSubscriptionByEventTypes"
;
/**
* 获取监控点预览取流URL
* @return
*/
@GetMapping
(
"/getPreviewURLs"
)
public
AjaxResult
getPreviewURLs
(
@RequestParam
(
value
=
"cameraIndexCode"
)
String
cameraIndexCode
){
/**
* 根据API文档可以看出来,这是一个POST请求的Rest接口,而且传入的参数值为一个json
* ArtemisHttpUtil工具类提供了doPostStringArtemis这个函数,一共六个参数在文档里写明其中的意思,因为接口是https,
* 所以第一个参数path是一个hashmap类型,请put一个key-value,query为传入的参数,body为传入的json数据
* 传入的contentType为application/json,accept不指定为null
* header没有额外参数可不传,指定为null
*
*/
Map
<
String
,
String
>
path
=
new
HashMap
<
String
,
String
>(
2
)
{
{
//根据现场环境部署确认是http还是https
put
(
"https://"
,
GET_PREVIEWURLS
);
}
};
JSONObject
jsonBody
=
new
JSONObject
();
//jsonBody.put("cameraIndexCode", "2a9891a194c24747b277f3ea4836d433");
jsonBody
.
put
(
"cameraIndexCode"
,
cameraIndexCode
);
jsonBody
.
put
(
"streamType"
,
0
);
//0主码流,1子码流
jsonBody
.
put
(
"protocol"
,
"ws"
);
jsonBody
.
put
(
"transmode"
,
1
);
String
body
=
jsonBody
.
toJSONString
();
// post请求application/json类型参数
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
/**
* 分页获取监控点资源
* @param pageNo 页码
* @param pageSize 每页条数
* @return
*/
@GetMapping
(
"/getCameras"
)
public
AjaxResult
getCameras
(
@RequestParam
(
"pageNo"
)
int
pageNo
,
@RequestParam
(
"pageSize"
)
int
pageSize
){
Map
<
String
,
String
>
path
=
new
HashMap
<
String
,
String
>(
2
)
{
{
//根据现场环境部署确认是http还是https
put
(
"https://"
,
GET_CAMERAS
);
}
};
JSONObject
jsonBody
=
new
JSONObject
();
jsonBody
.
put
(
"pageNo"
,
pageNo
);
jsonBody
.
put
(
"pageSize"
,
pageSize
);
jsonBody
.
put
(
"treeCode"
,
0
);
String
body
=
jsonBody
.
toJSONString
();
// post请求application/json类型参数
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
/**
* 云控操作
* @param cameraIndexCode
* @param command
* @param action
* @return
*/
@RequestMapping
(
"/videoControlling"
)
public
AjaxResult
videoControlling
(
@RequestParam
(
"cameraIndexCode"
)
String
cameraIndexCode
,
@RequestParam
(
"command"
)
String
command
,
@RequestParam
(
"action"
)
String
action
,
@RequestParam
(
"speed"
)
String
speed
){
Map
<
String
,
String
>
path
=
new
HashMap
<
String
,
String
>(
2
)
{
{
//根据现场环境部署确认是http还是https
put
(
"https://"
,
VEDIO_CONTROLLING
);
}
};
JSONObject
jsonBody
=
new
JSONObject
();
jsonBody
.
put
(
"cameraIndexCode"
,
cameraIndexCode
);
jsonBody
.
put
(
"action"
,
action
);
jsonBody
.
put
(
"command"
,
command
);
jsonBody
.
put
(
"speed"
,
speed
);
String
body
=
jsonBody
.
toJSONString
();
// post请求application/json类型参数
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
/**
* 按事件类型订阅事件
* @param eventSubscriptionVo 事件订阅实体
* @return
*/
@PostMapping
(
"/eventSubscriptionByEventTypes"
)
public
AjaxResult
eventSubscriptionByEventTypes
(
@RequestBody
EventSubscriptionVo
eventSubscriptionVo
){
Map
<
String
,
String
>
path
=
new
HashMap
<
String
,
String
>(
2
)
{
{
//根据现场环境部署确认是http还是https
put
(
"https://"
,
EVENT_SUBSCIRPTION_BY_ENVENTTYPES
);
}
};
JSONObject
jsonBody
=
new
JSONObject
();
jsonBody
.
put
(
"eventTypes"
,
eventSubscriptionVo
.
getEventTypes
());
jsonBody
.
put
(
"eventDest"
,
eventSubscriptionVo
.
getEventDest
());
if
(
eventSubscriptionVo
.
getSubType
()
!=
0
){
jsonBody
.
put
(
"subType"
,
eventSubscriptionVo
.
getSubType
());
}
if
(
null
!=
eventSubscriptionVo
.
getEventLvl
()
&&
eventSubscriptionVo
.
getEventLvl
().
size
()
!=
0
){
jsonBody
.
put
(
"eventLvl"
,
eventSubscriptionVo
.
getEventLvl
());
}
String
body
=
jsonBody
.
toJSONString
();
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
/**
* 按事件类型取消订阅
* @param eventUnSubscriptionVo 事件类型
* @return
*/
@PostMapping
(
"/eventUnSubscriptionByEventTypes"
)
public
AjaxResult
eventUnSubscriptionByEventTypes
(
@RequestBody
EventUnSubscriptionVo
eventUnSubscriptionVo
){
Map
<
String
,
String
>
path
=
new
HashMap
<
String
,
String
>(
2
)
{
{
//根据现场环境部署确认是http还是https
put
(
"https://"
,
EVENT_UNSUBSCRIPTION_BY_EVENTTYPES
);
}
};
JSONObject
jsonBody
=
new
JSONObject
();
jsonBody
.
put
(
"eventTypes"
,
eventUnSubscriptionVo
.
getEventTypes
());
String
body
=
jsonBody
.
toJSONString
();
String
result
=
ArtemisHttpUtil
.
doPostStringArtemis
(
path
,
body
,
null
,
null
,
"application/json"
,
null
);
return
AjaxResult
.
success
(
JSONObject
.
parseObject
(
result
));
}
}
huaxin-admin/src/main/resources/application-dev.yml
View file @
4ed87df2
...
...
@@ -116,3 +116,16 @@ thirdGasUse:
accessKeyId
:
001EE4257BA231B2886F13A1316E7395
accessKeySecret
:
6D2053243CA99905179E14FBC93B0985075F4A4B0D1B339400EA1DBEF342F880
meterDetailUrl
:
https://manage.cis.jinka.cn/rest/v1/query/meter-detail
# 海康服务平台
hikvision
:
platforms
:
huaxin
:
host
:
60.3.252.114:10443
app-key
:
29791064
app-secret
:
EArAS02rV0krs1waU5nE
honghai
:
host
:
60.3.252.114:20443
app-key
:
20289095
app-secret
:
2ESpESEYcMNQsnlmsnec
\ No newline at end of file
huaxin-admin/src/main/resources/application-prd.yml
View file @
4ed87df2
...
...
@@ -116,3 +116,16 @@ thirdGasUse:
accessKeyId
:
001E146809696F2B6FEC38024015808D
accessKeySecret
:
E0418F33E4F7F480A8F88F6F3D78C0519096759708A2452DEA0D244E6F184E68
meterDetailUrl
:
https://manage.cis-test.jinka.cn/rest/v1/query/meter-detail
# 海康服务平台
hikvision
:
platforms
:
huaxin
:
host
:
60.3.252.114:10443
app-key
:
29791064
app-secret
:
EArAS02rV0krs1waU5nE
honghai
:
host
:
60.3.252.114:20443
app-key
:
20289095
app-secret
:
2ESpESEYcMNQsnlmsnec
\ No newline at end of file
huaxin-admin/src/main/resources/application-test.yml
View file @
4ed87df2
...
...
@@ -114,3 +114,16 @@ thirdGasUse:
accessKeyId
:
001E146809696F2B6FEC38024015808D
accessKeySecret
:
E0418F33E4F7F480A8F88F6F3D78C0519096759708A2452DEA0D244E6F184E68
meterDetailUrl
:
https://manage.cis-test.jinka.cn/rest/v1/query/meter-detail
# 海康服务平台
hikvision
:
platforms
:
huaxin
:
host
:
60.3.252.114:10443
app-key
:
29791064
app-secret
:
EArAS02rV0krs1waU5nE
honghai
:
host
:
60.3.252.114:20443
app-key
:
20289095
app-secret
:
2ESpESEYcMNQsnlmsnec
\ No newline at end of file
huaxin-framework/pom.xml
View file @
4ed87df2
...
...
@@ -59,6 +59,13 @@
<artifactId>
huaxin-system
</artifactId>
</dependency>
<!--海康-->
<dependency>
<groupId>
com.hikvision.ga
</groupId>
<artifactId>
artemis-http-client
</artifactId>
<version>
1.1.3
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
huaxin-framework/src/main/java/com/zehong/framework/config/HikvisionProperties.java
0 → 100644
View file @
4ed87df2
package
com
.
zehong
.
framework
.
config
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
import
java.util.Map
;
@Component
@ConfigurationProperties
(
prefix
=
"hikvision"
)
public
class
HikvisionProperties
{
private
Map
<
String
,
PlatformConfig
>
platforms
;
public
Map
<
String
,
PlatformConfig
>
getPlatforms
()
{
return
platforms
;
}
public
void
setPlatforms
(
Map
<
String
,
PlatformConfig
>
platforms
)
{
this
.
platforms
=
platforms
;
}
/**
* 获取平台配置
* @param platformId 平台
* @return
*/
public
HikvisionProperties
.
PlatformConfig
getPlatformConfig
(
String
platformId
)
{
HikvisionProperties
.
PlatformConfig
config
=
platforms
.
get
(
platformId
);
if
(
config
==
null
)
{
throw
new
IllegalArgumentException
(
"未找到平台: "
+
platformId
);
}
return
config
;
}
public
static
class
PlatformConfig
{
private
String
host
;
private
String
appKey
;
private
String
appSecret
;
public
String
getHost
()
{
return
host
;
}
public
void
setHost
(
String
host
)
{
this
.
host
=
host
;
}
public
String
getAppKey
()
{
return
appKey
;
}
public
void
setAppKey
(
String
appKey
)
{
this
.
appKey
=
appKey
;
}
public
String
getAppSecret
()
{
return
appSecret
;
}
public
void
setAppSecret
(
String
appSecret
)
{
this
.
appSecret
=
appSecret
;
}
}
}
huaxin-framework/src/main/java/com/zehong/framework/config/ResourcesConfig.java
View file @
4ed87df2
package
com
.
zehong
.
framework
.
config
;
import
com.zehong.framework.interceptor.ArtemisInterceptor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -24,6 +25,12 @@ public class ResourcesConfig implements WebMvcConfigurer
@Autowired
private
RepeatSubmitInterceptor
repeatSubmitInterceptor
;
private
final
HikvisionProperties
properties
;
public
ResourcesConfig
(
HikvisionProperties
properties
)
{
this
.
properties
=
properties
;
}
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
...
...
@@ -41,6 +48,8 @@ public class ResourcesConfig implements WebMvcConfigurer
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
repeatSubmitInterceptor
).
addPathPatterns
(
"/**"
);
registry
.
addInterceptor
(
new
ArtemisInterceptor
(
properties
))
.
addPathPatterns
(
"/artemis/**"
);
// 拦截 /artemis 开头的所有请求
}
/**
...
...
huaxin-framework/src/main/java/com/zehong/framework/interceptor/ArtemisInterceptor.java
0 → 100644
View file @
4ed87df2
package
com
.
zehong
.
framework
.
interceptor
;
import
com.hikvision.artemis.sdk.config.ArtemisConfig
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.framework.config.HikvisionProperties
;
import
org.springframework.web.servlet.HandlerInterceptor
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
public
class
ArtemisInterceptor
implements
HandlerInterceptor
{
private
final
HikvisionProperties
properties
;
public
ArtemisInterceptor
(
HikvisionProperties
properties
)
{
this
.
properties
=
properties
;
}
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
String
path
=
request
.
getRequestURI
();
// 只拦截以 /artemis 开头的请求
if
(
path
.
contains
(
"/artemis"
))
{
String
platform
=
request
.
getParameter
(
"platform"
);
HikvisionProperties
.
PlatformConfig
config
=
StringUtils
.
isNotEmpty
(
platform
)
?
properties
.
getPlatformConfig
(
platform
)
:
properties
.
getPlatformConfig
(
"huaxin"
);
// 设置 ArtemisConfig(需要加锁)
synchronized
(
ArtemisInterceptor
.
class
)
{
// 代理API网关nginx服务器ip端口
ArtemisConfig
.
host
=
config
.
getHost
();
// 秘钥appkey
ArtemisConfig
.
appKey
=
config
.
getAppKey
();
// 秘钥appSecret
ArtemisConfig
.
appSecret
=
config
.
getAppSecret
();
}
}
return
true
;
}
}
huaxin-system/src/main/resources/mapper/system/TVideoManageMapper.xml
View file @
4ed87df2
...
...
@@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"videoType != null"
>
videoType
,
</if>
<if
test=
"videoType != null"
>
#{videoType}
,
</if>
</trim>
</insert>
...
...
huaxin-web/src/api/video/artemis.js
View file @
4ed87df2
import
request
from
'@/utils/request'
/**
* api根地址
* @type {{"1": "华鑫", "2": "鸿海"}}
*/
const
apiBaseConfig
=
{
'1'
:
"/artemis"
,
'2'
:
"/honghai/artemis"
};
// 查询视频地址
export
function
getPreviewURLs
(
query
,
type
=
'1'
)
{
export
function
getPreviewURLs
(
query
)
{
return
request
({
url
:
apiBaseConfig
[
type
]
+
'
/getPreviewURLs'
,
url
:
'/artemis
/getPreviewURLs'
,
method
:
'get'
,
params
:
query
})
}
// 云台控制
export
function
videoControlling
(
query
,
type
=
'1'
)
{
export
function
videoControlling
(
query
)
{
return
request
({
url
:
apiBaseConfig
[
type
]
+
'
/videoControlling'
,
url
:
'/artemis
/videoControlling'
,
method
:
'get'
,
params
:
query
})
...
...
huaxin-web/src/components/Video/PlayVideo.vue
View file @
4ed87df2
...
...
@@ -126,7 +126,7 @@ export default {
playVideo
(
data
)
{
this
.
videoName
=
data
.
videoName
;
this
.
cameraIndexCode
=
data
.
videoResource
;
getPreviewURLs
({
cameraIndexCode
:
data
.
videoResource
},
data
.
videoType
).
then
((
response
)
=>
{
getPreviewURLs
({
cameraIndexCode
:
data
.
videoResource
,
platform
:
data
.
videoType
==
'2'
?
'honghai'
:
'huaxin'
}
).
then
((
response
)
=>
{
if
(
response
.
data
.
code
==
"0"
)
{
this
.
videoOpenNum
++
;
let
url
=
response
.
data
.
data
.
url
;
...
...
@@ -138,6 +138,8 @@ export default {
console
.
error
(
e
);
}
);
}
else
{
this
.
$message
.
error
(
response
.
data
.
msg
)
}
});
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment