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') { ...@@ -57,6 +57,7 @@ if (window.env == 'dev') {
` `
} }
document.write(writeText) document.write(writeText)
if (getPageN()) { if (getPageN()) {
// 加载同名js // 加载同名js
...@@ -70,3 +71,11 @@ function getPageN() { ...@@ -70,3 +71,11 @@ function getPageN() {
return pageN return pageN
} }
// 新增浏览器地址变化监听
window.addEventListener('popstate', function () {
vant.Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner'
});
});
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
show-action show-action
placeholder="请输入商家关键词" placeholder="请输入商家关键词"
@search="onSearch" @search="onSearch"
v-show="showSearch"
> >
<template #action> <template #action>
<div @click="onSearch"></div> <div @click="onSearch"></div>
......
...@@ -12,11 +12,12 @@ window.addEventListener('load', function () { ...@@ -12,11 +12,12 @@ window.addEventListener('load', function () {
], ],
activeTab: '', activeTab: '',
merId: '', merId: '',
showSearch: false, // 控制搜索框的显示和隐藏
} }
}, },
computed: { computed: {
filteredHazards() { filteredHazards() {
const statusMap = ['全部', '待审核', '待整改', '已整改'] const statusMap = ['全部', '待审核', '待整改', '已整改', '整改逾期']
return this.hazardList.filter((item) => return this.hazardList.filter((item) =>
this.activeTab === '' this.activeTab === ''
? true ? true
...@@ -31,6 +32,9 @@ window.addEventListener('load', function () { ...@@ -31,6 +32,9 @@ window.addEventListener('load', function () {
} else { } else {
this.merId = '' this.merId = ''
} }
if (gemhoUtil.getCookie('userType') !== 'shop') {
this.showSearch = true
}
this.init() this.init()
}, },
methods: { methods: {
...@@ -38,7 +42,46 @@ window.addEventListener('load', function () { ...@@ -38,7 +42,46 @@ window.addEventListener('load', function () {
this.getHazardList() this.getHazardList()
}, },
onSearch() { 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) { 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