Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
周少峰
9 years ago
Commit
b418879cebf19b7d46f8e9b68cdf6e4030c663a0
1 parent
67bbced9
无搜索结果提示不一致
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
library/WebPlugin/HelperSearch.php
library/WebPlugin/HelperSearch.php
View file @
b418879
...
...
@@ -20,7 +20,7 @@ class HelperSearch
//总页数
public
static
$pageTotal
;
//总记录数
public
static
$total
;
public
static
$total
=
0
;
//接口返回搜索条件
public
static
$filter
;
//选中的条件
...
...
@@ -142,10 +142,6 @@ class HelperSearch
}
//选中条件
$result
[
'filters'
][
'checkedConditions'
]
=
self
::
getSelected
();
if
(
empty
(
$result
[
'goods'
]))
{
$result
[
'filters'
]
=
array
();
$result
[
'opts'
]
=
array
();
}
$result
[
'pathNav'
]
=
isset
(
$options
[
'controller'
])
&&
$options
[
'controller'
]
==
'Sale'
?
array
()
:
self
::
$listNav
;
return
$result
;
}
...
...
@@ -680,10 +676,6 @@ class HelperSearch
public static function price(
$filter
)
{
$result
= array();
//商品记录小于10,不显示价格区间
if (self::
$total
< 10) {
return
$result
;
}
$params
= self::
$params
;
$priceId
= isset(
$params['price']
) && !empty(self::
$params['price']
) ? self::
$params['price']
: '';
if (isset(
$params['price']
)) {
...
...
@@ -707,6 +699,10 @@ class HelperSearch
'href' => self::buildUrl(
$params
)
);
}
//商品记录小于10,不显示价格区间
if (self::
$total
< 10) {
return
$result
;
}
if (self::checkSearch('price')) {
return array();
}
...
...
@@ -1086,6 +1082,10 @@ class HelperSearch
public static function getSelected()
{
$result
= array();
//无结果
if (self::
$total
== 0 && self::
$options['controller']
== 'Search') {
return
$result
;
}
$data
= array();
foreach (self::
$selected
as
$key
=>
$val
) {
$data
[] =
$val
;
...
...
@@ -1386,6 +1386,10 @@ class HelperSearch
*/
public static function getOpts()
{
//无结果
if (self::
$total
== 0 && self::
$options['controller']
== 'Search') {
return array();
}
//排序方式
$result['sortType']
= array( self::orderDefault(),self::orderTime(),self::orderPrice(),self::orderDiscount());
//特殊:新品、特价、限量
...
...
Please
register
or
login
to post a comment