搜索优化

feat/task1-c-wallet
gongfuxiang 2022-07-01 11:00:15 +08:00
parent f8e51bc5de
commit 470ab835a0
4 changed files with 15 additions and 8 deletions

View File

@ -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']);

View File

@ -93,7 +93,9 @@
<strong class="map-result-count am-text-danger">{{$data_total}}</strong>
<span>条数据</span>
</p>
<span class="map-remove-submit am-fr am-margin-right-sm am-hide">清除</span>
{{if isset($is_map) and $is_map eq 1}}
<a href="{{:MyUrl('index/search/index')}}" class="map-remove-submit am-fr am-margin-right-sm">清除</a>
{{/if}}
</li>
<!-- 搜索页面筛选条件内基础底部钩子 -->

View File

@ -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,
];
}

View File

@ -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 {