Commit 02cbb234 authored by xinzhedeai's avatar xinzhedeai

add: 隐患列表 接口对接

parent 58485835
......@@ -30,7 +30,7 @@
<van-tabs v-model:active="activeTab" title-active-color="#1989fa" line-height="2px" @change="tabChange"
style="margin-bottom: 15px;">
<!-- <div v-for="item in tabList""> -->
<van-tab :title="item.title" :badge="item.msgNum||null" v-for="item in tabList"></van-tab>
<van-tab :title="item.title" :badge="item.msgNum||null" v-for="item in remindStatistic"></van-tab>
<!-- </div> -->
......
......@@ -26,7 +26,8 @@ window.addEventListener('load', function () {
finished: false,
page: 0,
size: 6,
total: 0
total: 0,
remindStatistic:[]
}
},
computed: {
......@@ -51,8 +52,34 @@ window.addEventListener('load', function () {
this.showSearch = true
}
this.init()
this.getRemindStatistic()
},
methods: {
getRemindStatistic(){
http2.post(
{
serviceId: API_KEY_MAP['no-page']['id'],
interfacePublicKey: API_KEY_MAP['no-page']['publicKey'],
interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'],
reqParams: {
sign: 24, // 隐患tab
},
},
(res) => {
if (!res) {
// 中台返回为undefined 重新请求
setTimeout(() => {
this.getRemindStatistic()
}, 0)
return
}
if (res) {
var result = JSON.parse(res)
this.remindStatistic = result.data
}
}
)
},
reset(){
this.page = 0
this.size = 6
......
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