Commit f2a9de84 authored by xinzhedeai's avatar xinzhedeai

fix:手动刷新问题;隐患检查分页重复数据问题;隐患检查&特征工作全部已读实时显示问题

parent 0e22ab5e
var VUE = null
window.addEventListener("pageshow", (event) => {
console.log(event, 'event')
if (event.persisted) { // 从 BF Cache 加载时触发
location.reload(); // 强制刷新
}
});
window.onload = function() {
// const currentDate = gemhoUtil.getTargetDateYM()
VUE = new Vue({
......@@ -98,6 +104,7 @@ window.onload = function() {
}
}
}
let url = gemhoUtil.setParameter(`src/_${toData}.html`, param)
gemhoUtil.navigatePage(url, '跳转中...')
......
......@@ -4,6 +4,12 @@
* description: 商户首页
*/
var VUE = null
window.addEventListener("pageshow", (event) => {
console.log(event, 'event')
if (event.persisted) { // 从 BF Cache 加载时触发
location.reload(); // 强制刷新
}
});
window.addEventListener("load", function() {
VUE = new Vue({
el: '#app',
......
......@@ -3,16 +3,26 @@
* date: 2024-03-15
* description: 商户首页
*/
var VUE = null
window.addEventListener("pageshow", (event) => {
console.log(event, 'event')
if (event.persisted) { // 从 BF Cache 加载时触发
location.reload(); // 强制刷新
}
});
window.addEventListener("load", function() {
VUE = new Vue({
el: '#app',
data() {
return {
reMark:'',
reMark: '',
title: '',
userType: gemhoUtil.getCookie('userType'),
hazardList: [ // 更多示例数据...
],
workTypeName: '',
......@@ -30,31 +40,36 @@ window.addEventListener("load", function() {
},
methods: {
markAllAsRead() { // 全部标记为已读
http2.post(
{
serviceId: API_KEY_MAP['submit']['id'],
interfacePublicKey: API_KEY_MAP['submit']['publicKey'],
interfacePrivateKey: API_KEY_MAP['submit']['privateKey'],
reqParams: {
sign: 36, // post 设置已读
},
},
(res) => {
if (!res) {
// 中台返回为undefined 重新请求
setTimeout(() => {
this.markAllAsRead()
}, 0)
return
}
var result = JSON.parse(res)
http2.post({
serviceId: API_KEY_MAP['submit']['id'],
interfacePublicKey: API_KEY_MAP['submit']['publicKey'],
interfacePrivateKey: API_KEY_MAP['submit']['privateKey'],
reqParams: {
sign: 36, // post 设置已读
},
},
(res) => {
if (!res) {
// 中台返回为undefined 重新请求
setTimeout(() => {
this.markAllAsRead()
}, 0)
return
}
var result = JSON.parse(res)
if (result && result.code == 200) {
vant.Toast({
message: '操作成功',
})
}
}
)
vant.Toast({
message: '操作成功',
})
this.hazardList.forEach(item => {
if (item.msgFlag) {
this.$set(item, 'msgFlag', false); // 动态添加响应式属性
}
});
}
}
)
},
reset() {
this.page = 1
......@@ -72,7 +87,7 @@ window.addEventListener("load", function() {
},
viewDetail(item) {
let params = {
id: item.id ||'',
id: item.id || '',
merId: gemhoUtil.getParameter('merId'),
pageName: '_tezhongzuoye'
}
......
......@@ -25,7 +25,7 @@ window.addEventListener('load', function () {
],
loading: false,
finished: false,
page: 0,
page: 1,
size: 6,
total: 0,
remindStatistic: []
......@@ -112,7 +112,7 @@ window.addEventListener('load', function () {
)
},
reset() {
this.page = 0
this.page = 1
this.size = 6
this.total = 0
this.hazardList = []
......
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