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
0d74eb92
Commit
0d74eb92
authored
Jun 26, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 安全常识列表 api
parent
cde0f8f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
16 deletions
+31
-16
_anquan_changshi.html
src/_anquan_changshi.html
+10
-6
_anquan_changshi.js
src/_anquan_changshi.js
+21
-10
No files found.
src/_anquan_changshi.html
View file @
0d74eb92
...
...
@@ -21,22 +21,26 @@
</div>
<!-- Tab栏 -->
<van-tabs
v-model:active=
"activeTab"
@
change=
"tabChange"
title-active-color=
"#1989fa"
line-height=
"2px"
<van-tabs
v-model:active=
"activeTab"
title-active-color=
"#1989fa"
line-height=
"2px"
@
change=
"tabChange"
style=
"margin-bottom: 15px;"
>
<van-tab
:title=
"item.title"
:badge=
"item.msgNum||null"
v-for=
"item in tabList"
></van-tab>
</van-tabs>
<!-- <van-tabs v-model:active="activeTab" @change="tabChange" title-active-color="#1989fa" line-height="2px"
style="margin-bottom: 15px;">
<van-tab title="常识视频"></van-tab>
<van-tab title="警示视频"></van-tab>
<van-tab title="应知应会"></van-tab>
<!-- <van-tab title="培训演练"></van-tab> -->
</van-tabs>
</van-tabs> -->
<!-- 隐患列表 -->
<van-list
v-model:loading=
"loading"
:offset=
"10"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
:immediate-check=
"false"
>
<div
class=
"container"
v-if=
"activeTab!=2"
>
<div
class=
"card"
v-for=
"item in
11
"
>
<div
class=
"card"
v-for=
"item in
hazardList"
@
click=
"viewDetail(item)
"
>
<div
class=
"image-wrapper"
>
<img
src=
"https://dummyimage.com/340x206"
alt=
"视频封面1
"
>
<img
:src=
"item.videoCover
"
>
</div>
<div
class=
"card-title"
>
这是第一个视频标题,展示基本,烧烤料上岛咖啡就水电费收快递费就
</div>
<div
class=
"card-title"
>
{{ item.name }}
</div>
</div>
</div>
<div
style=
"width: 100%; background-color: #f5f6fa;padding-top: .2rem;"
v-if=
"activeTab==2"
v-for=
"item in hazardList"
>
...
...
src/_anquan_changshi.js
View file @
0d74eb92
...
...
@@ -16,23 +16,22 @@ window.addEventListener("load", function () {
hazardList
:
[
// 更多示例数据...
],
activeTab
:
''
,
activeTab
:
0
,
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
,
},
{
name
:
'
1
'
,
title
:
'
常识视频
'
,
msgNum
:
0
,
},
{
name
:
'
2
'
,
title
:
'
警示视频
'
,
msgNum
:
0
,
},
{
name
:
'
3
'
,
title
:
'
应知应会
'
,
msgNum
:
0
,
},
],
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
6
,
total
:
0
,
type
:
'
1
'
// 常识视频 2,3
}
},
created
()
{
...
...
@@ -41,9 +40,12 @@ window.addEventListener("load", function () {
this
.
merId
=
params
.
merId
},
mounted
()
{
this
.
init
()
},
methods
:
{
init
()
{
this
.
getList
()
},
onSearch
()
{
console
.
log
(
'
xxxx
'
,
this
.
merName
)
this
.
getList
()
...
...
@@ -69,11 +71,12 @@ window.addEventListener("load", function () {
interfacePublicKey
:
API_KEY_MAP
[
'
page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
3
,
sign
:
16
,
// merId: this.merId ? this.merId : '',
merName
:
this
.
shanghuName
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
type
:
(
this
.
activeTab
+
1
)
+
''
},
},
(
res
)
=>
{
...
...
@@ -109,7 +112,8 @@ window.addEventListener("load", function () {
},
0
)
},
tabChange
(
title
)
{
console
.
log
(
'
tab 切换
'
,
title
)
console
.
log
(
'
tab 切换
'
,
this
.
activeTab
)
this
.
reset
()
this
.
getList
()
},
...
...
@@ -127,7 +131,14 @@ window.addEventListener("load", function () {
id
:
item
.
id
,
pageName
:
'
_anquan_changshi
'
,
}
let
url
=
gemhoUtil
.
setParameter
(
'
_anquan_changshi-detail.html
'
,
param
)
let
pageName
=
''
if
(
item
.
type
===
'
3
'
){
// 应知应会 跳转富文本详情
pageName
=
'
_anquan_changshi-detail-text.html
'
}
else
{
pageName
=
'
_anquan_changshi-detail-video.html
'
}
let
url
=
gemhoUtil
.
setParameter
(
pageName
,
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