Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinzhedeai
GaoQuYingJiH5-ASD
Commits
b818670b
Commit
b818670b
authored
Jun 26, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:video test
parent
0d74eb92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
86 deletions
+36
-86
_anquan_changshi-detail-video.html
src/_anquan_changshi-detail-video.html
+12
-7
_anquan_changshi-detail-video.js
src/_anquan_changshi-detail-video.js
+24
-79
No files found.
src/_anquan_changshi-detail-video.html
View file @
b818670b
...
...
@@ -12,28 +12,33 @@
<div
class=
"wrapper"
>
<!-- 视频播放区域 -->
<div
class=
"video-container"
>
<video
controls
poster=
"https://dummyimage.com/750x400"
>
<source
src=
"https://example.com/video.mp4"
type=
"video/mp4"
>
您的浏览器不支持视频播放
<!-- <video src="http://192.168.2.37:8080/profile/upload/2025/05/20/test_20250520170318A001.mp4"></video> -->
<video
id=
"myVideo"
poster=
"poster.jpg"
controls
>
<!-- <source src="video1.mp4" crossorigin type="video/mp4"> -->
<source
src=
"test/testVideo.mp4"
type=
"video/mp4"
>
您的浏览器不支持HTML5视频播放
</video>
</div>
<!-- 标题与日期 -->
<div
class=
"info-section"
>
<div
class=
"title-wrapper"
>
<img
class=
"title-icon"
src=
"https://dummyimage.com/37x32"
>
<h3
class=
"video-title"
>
2024年安全生产常识培训视频:危险化学品存储规范
</h3>
<h3
class=
"video-title"
>
{{detailInfo.name}}
</h3>
</div>
<p
class=
"video-date"
>
日期:
2024-05-20
</p>
<p
class=
"video-date"
>
日期:
{{ detailInfo.uploadsDate }}
</p>
</div>
<!-- 两列图文列表 -->
<div
class=
"grid-list"
>
<
!-- <
div class="grid-list">
<div class="grid-item" v-for="item in 11" :key="item.id">
<img class="grid-item-image" src="https://dummyimage.com/340x206" alt="相关内容封面">
<p class="grid-item-text">{{ item }}</p>
</div>
</div>
</div>
-->
</div>
</div>
</body>
...
...
src/_anquan_changshi-detail-video.js
View file @
b818670b
...
...
@@ -9,53 +9,28 @@ window.addEventListener("load", function () {
el
:
'
#app
'
,
data
()
{
return
{
merName
:
''
,
userType
:
gemhoUtil
.
getCookie
(
'
userType
'
),
shanghuName
:
''
,
// 新增子Tab数据
hazardList
:
[
// 更多示例数据...
],
activeTab
:
''
,
status
:
''
,
merId
:
''
,
showSearch
:
false
,
// 控制搜索框的显示和隐藏
// 整改状态 0:待整改 1:已整改 2:待审核 3:整改逾期
tabList
:
[
{
name
:
''
,
title
:
'
全部
'
,
msgNum
:
0
,
},
{
name
:
'
2
'
,
title
:
'
待审核
'
,
msgNum
:
0
,
},
{
name
:
'
0
'
,
title
:
'
待整改
'
,
msgNum
:
0
,
},
{
name
:
'
1
'
,
title
:
'
已整改
'
,
msgNum
:
0
,
},
{
name
:
'
3
'
,
title
:
'
整改逾期
'
,
msgNum
:
0
,
},
],
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
6
,
total
:
0
,
detailInfo
:{}
}
},
created
()
{
let
params
=
gemhoUtil
.
getUrlParams
()
console
.
log
(
params
);
this
.
merId
=
params
.
merId
},
mounted
()
{
// this.detail()
},
methods
:
{
onSearch
()
{
console
.
log
(
'
xxxx
'
,
this
.
merName
)
this
.
getList
()
},
reset
()
{
this
.
page
=
0
this
.
size
=
6
this
.
total
=
0
this
.
hazardList
=
[]
handleVideoError
(
e
)
{
const
error
=
e
.
target
.
error
;
console
.
error
(
"
视频播放错误:
"
,
{
code
:
error
.
code
,
message
:
[
"
未知错误
"
,
"
网络错误(文件不可达)
"
,
"
解码错误(格式/编码不支持)
"
,
"
URL无效
"
][
error
.
code
-
1
]
});
},
getList
(){
detail
(){
// 这里添加获取数据的逻辑
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
...
...
@@ -65,15 +40,12 @@ window.addEventListener("load", function () {
setTimeout
(()
=>
{
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
page
'
][
'
privateKey
'
],
serviceId
:
API_KEY_MAP
[
'
no-
page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-
page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-
page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
3
,
// merId: this.merId ? this.merId : '',
merName
:
this
.
shanghuName
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
sign
:
17
,
safetyId
:
gemhoUtil
.
getParameter
(
'
id
'
),
},
},
(
res
)
=>
{
...
...
@@ -82,20 +54,16 @@ window.addEventListener("load", function () {
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
setTimeout
(()
=>
{
this
.
getList
()
this
.
detail
()
},
0
)
return
}
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
console
.
log
(
result
,
'
result
'
)
this
.
loading
=
false
;
// 加载状态结束
this
.
hazardList
.
push
(...
result
.
rows
);
this
.
total
=
result
.
total
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
this
.
finished
=
true
;
// 下滑不在刷新数据
}
this
.
detailInfo
=
result
.
data
this
.
detailInfo
.
videoUrl
=
'
./test/testVideo.mp4
'
console
.
log
(
result
,
'
detail result
'
)
}
this
.
loading
=
false
setTimeout
(()
=>
{
...
...
@@ -108,30 +76,7 @@ window.addEventListener("load", function () {
)
},
0
)
},
tabChange
(
title
)
{
console
.
log
(
'
tab 切换
'
,
title
)
this
.
reset
()
this
.
getList
()
},
init
()
{
this
.
getList
()
},
onSearch
()
{
this
.
reset
()
this
.
getList
()
},
// 新增选择确认方法
viewDetail
(
item
,
type
)
{
let
param
=
{
id
:
item
.
id
,
pageName
:
'
_anquan_changshi
'
,
}
let
url
=
gemhoUtil
.
setParameter
(
'
_anquan_changshi-detail.html
'
,
param
)
console
.
log
(
url
)
gemhoUtil
.
navigatePage
(
url
,
'
跳转中...
'
)
},
}
});
...
...
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