Commit 27ac6005 authored by xinzhedeai's avatar xinzhedeai

Merge branch 'gaoqucodecheck' of...

Merge branch 'gaoqucodecheck' of http://h.gemho.cn:7099/zhaojunbao/gaoquyingjih5-asd into gaoqucodecheck
parents d4d3ba3a b75962fe
......@@ -57,6 +57,7 @@ if (window.env == 'dev') {
`
}
document.write(writeText)
if (getPageN()) {
// 加载同名js
......@@ -70,3 +71,11 @@ function getPageN() {
return pageN
}
// 新增浏览器地址变化监听
window.addEventListener('popstate', function () {
vant.Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner'
});
});
......@@ -19,6 +19,7 @@
show-action
placeholder="请输入商家关键词"
@search="onSearch"
v-show="showSearch"
>
<template #action>
<div @click="onSearch"></div>
......
......@@ -12,11 +12,12 @@ window.addEventListener('load', function () {
],
activeTab: '',
merId: '',
showSearch: false, // 控制搜索框的显示和隐藏
}
},
computed: {
filteredHazards() {
const statusMap = ['全部', '待审核', '待整改', '已整改']
const statusMap = ['全部', '待审核', '待整改', '已整改', '整改逾期']
return this.hazardList.filter((item) =>
this.activeTab === ''
? true
......@@ -31,6 +32,9 @@ window.addEventListener('load', function () {
} else {
this.merId = ''
}
if (gemhoUtil.getCookie('userType') !== 'shop') {
this.showSearch = true
}
this.init()
},
methods: {
......@@ -38,7 +42,46 @@ window.addEventListener('load', function () {
this.getHazardList()
},
onSearch() {
console.log('xxxx')
// 这里添加搜索逻辑
// 这里添加获取数据的逻辑
vant.Toast.loading({
message: '正在加载...',
forbidClick: true,
loadingType: 'spinner',
})
setTimeout(() => {
http2.post(
{
serviceId: API_KEY_MAP['page']['id'],
interfacePublicKey: API_KEY_MAP['page']['publicKey'],
interfacePrivateKey: API_KEY_MAP['page']['privateKey'],
reqParams: {
sign: 3,
// merId: this.merId ? this.merId : '',
merName: this.shanghuName,
pageNum: this.page++, // 每次请求增加下一页
pageSize: this.size,
sort: 'lawId,desc',
},
},
(res) => {
if (!res) {
// 中台返回为undefined 重新请求
vant.Toast.clear()
this.page = this.page - 1 // 重新请求后,分页数恢复上一次请求的值
setTimeout(() => {
// this.getList()
}, 0)
return
}
if (res) {
var result = JSON.parse(res)
this.hazardList = result.rows
console.log(result)
}
}
)
}, 0)
},
// 新增选择确认方法
onConfirmType(value) {
......
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