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
runner
9 years ago
Commit
d0c6cc91f8641e00fc8d02cea2a2a89919f0727c
1 parent
46791d13
filter-age order
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletions
library/WebPlugin/HelperSearch.php
library/WebPlugin/HelperSearch.php
View file @
d0c6cc9
...
...
@@ -501,7 +501,7 @@ class HelperSearch
$result
[
'0'
][
'checked'
]
=
true
;
}
return
$result
;
return
self
::
ageSort
(
$result
)
;
}
/**
...
...
@@ -1232,6 +1232,34 @@ class HelperSearch
}
/**
* 年龄排序,为了解决接口传的id顺序有问题
*/
public static function ageSort(
$agefilter
)
{
foreach(
$agefilter
as
$key
=>
$val
){
if (
$val['name']
=== '中童'){
$mid
=
$val
;
}
if (
$val['name']
=== '小童'){
$sml
=
$val
;
}
}
if (!empty(
$mid
) && !empty(
$sml
)){
foreach(
$agefilter
as
$key
=>
$val
){
if (
$val['name']
=== '中童'){
$agefilter[$key]
=
$sml
;
}
if (
$val['name']
=== '小童'){
$agefilter[$key]
=
$mid
;
}
}
}
var_dump(
$agefilter
);
return
$agefilter
;
}
/**
* 组织参数
* @param array
$params
经过SearchModel::searchCondition()处理后的、用户输入的参数
* @return string
...
...
Please
register
or
login
to post a comment