From 470ab835a0dfc8b67edb7c0f8cec1ec71258fc69 Mon Sep 17 00:00:00 2001
From: gongfuxiang
Date: Fri, 1 Jul 2022 11:00:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/index/controller/Search.php | 1 +
app/index/view/default/search/index.html | 4 +++-
app/service/SearchService.php | 3 +++
public/static/index/default/css/search.css | 15 ++++++++-------
4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/app/index/controller/Search.php b/app/index/controller/Search.php
index 4860e53cb..6691cbea6 100755
--- a/app/index/controller/Search.php
+++ b/app/index/controller/Search.php
@@ -76,6 +76,7 @@ class Search extends Common
}
// 基础参数赋值
+ MyViewAssign('is_map', $map['is_map']);
MyViewAssign('params', $params);
MyViewAssign('page_html', $page_html);
MyViewAssign('data_total', $ret['data']['total']);
diff --git a/app/index/view/default/search/index.html b/app/index/view/default/search/index.html
index 2f6164160..4e3f94f7e 100755
--- a/app/index/view/default/search/index.html
+++ b/app/index/view/default/search/index.html
@@ -93,7 +93,9 @@
{{$data_total}}
条数据
- 清除
+ {{if isset($is_map) and $is_map eq 1}}
+ 清除
+ {{/if}}
diff --git a/app/service/SearchService.php b/app/service/SearchService.php
index 98356ccf6..37fae494b 100755
--- a/app/service/SearchService.php
+++ b/app/service/SearchService.php
@@ -458,11 +458,14 @@ class SearchService
}
}
+ // 是否存在搜索条件
+ $is_map = (count($where_base) > 2 || !empty($where_keywords) || !empty($where_screening_price) || !empty($params['ov'])) ? 1 : 0;
return [
'base' => $where_base,
'keywords' => $where_keywords,
'screening_price' => $where_screening_price,
'order_by' => $order_by,
+ 'is_map' => $is_map,
];
}
diff --git a/public/static/index/default/css/search.css b/public/static/index/default/css/search.css
index 1204aa94c..183f5dd98 100755
--- a/public/static/index/default/css/search.css
+++ b/public/static/index/default/css/search.css
@@ -12,11 +12,11 @@
}
.map-item > li > a,
.map-item .map-left {
- line-height: 50px;
+ line-height: 45px;
}
.map-brand-container,
.map-brand-container .map-left {
- line-height: 66px !important;
+ line-height: 56px !important;
}
.map-item .map-right {
width: calc(100% - 100px);
@@ -30,13 +30,14 @@
text-decoration: none;
}
.map-remove-submit {
- color: #e23f36;
- cursor: pointer;
+ color: #e23f36 !important;
+ text-decoration: none !important;
+ background-color: transparent !important;
}
.map-images-text-items ul,
.map-text-items ul {
- padding: 15px 0 0 15px;
+ padding: 10px 0 0 10px;
overflow-y: hidden;
}
.map-images-text-items ul > li {
@@ -46,7 +47,7 @@
line-height: 36px;
height: 36px;
width: 124px;
- margin: 0 15px 15px 0;
+ margin: 0 10px 10px 0;
}
.map-images-text-items ul > li > a {
border: 1px solid #eee;
@@ -65,7 +66,7 @@
}
.map-text-items ul > li {
float: left;
- margin: 0 15px 15px 0;
+ margin: 0 10px 10px 0;
line-height: 20px;
}
.map-text-items ul > li > a {