Commit 0d74eb92 authored by xinzhedeai's avatar xinzhedeai

add: 安全常识列表 api

parent cde0f8f3
......@@ -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">
......
......@@ -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, '跳转中...')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment