Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
runner
9 years ago
Commit
5ae152c2f7a43527f0acc13ac3eae7adfaa2f3b5
1 parent
4ebcb87c
fiter-age update
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
static/js/product/list.js
template/m.yohobuy.com/partials/product/query-param.phtml
yohobuy/m.yohobuy.com/application/controllers/Search.php
static/js/product/list.js
View file @
5ae152c
...
...
@@ -153,6 +153,7 @@ function getQueryString(name) {
shopId
=
getQueryString
(
'shop_id'
);
sort
=
getQueryString
(
'sort'
);
outlets
=
getQueryString
(
'outlets'
);
age_level
=
outlets
=
getQueryString
(
'ageLevel'
);
/**
* 筛选注册的回调,筛选子项点击后逻辑
...
...
@@ -271,6 +272,10 @@ function search(opt) {
params
.
shop_id
=
shopId
;
}
if
(
age_level
)
{
params
.
age_level
=
age_level
}
if
(
sort
)
{
params
.
sort
=
sort
;
}
...
...
template/m.yohobuy.com/partials/product/query-param.phtml
View file @
5ae152c
...
...
@@ -58,8 +58,8 @@
<input
class=
"query-param"
type=
"hidden"
data-attr=
"p_d"
value=
"{{p_d}}"
>
{
{/if
}
}
{
{#if
age_level
}
}
<input
class=
"query-param"
type=
"hidden"
data-attr=
"age_level"
value=
"{{age_level}}"
>
{
{#if
ageLevel
}
}
<input
class=
"query-param"
type=
"hidden"
data-attr=
"ageLevel"
value=
"{{ageLevel}}"
>
{
{/if
}
}
{
{#if
channel
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Search.php
View file @
5ae152c
...
...
@@ -61,6 +61,7 @@ class SearchController extends AbstractAction
'gender'
=>
FILTER_DEFAULT
,
'channel'
=>
FILTER_DEFAULT
,
'outlets'
=>
FILTER_DEFAULT
,
'ageLevel'
=>
FILTER_DEFAULT
,
'p_d'
=>
FILTER_DEFAULT
,),
false
);
if
(
isset
(
$condition
[
'shop_id'
]))
{
$condition
[
'shopId'
]
=
$condition
[
'shop_id'
];
...
...
@@ -404,6 +405,7 @@ class SearchController extends AbstractAction
'discount'
=>
FILTER_DEFAULT
,
'gender'
=>
FILTER_DEFAULT
,
'channel'
=>
FILTER_DEFAULT
,
'ageLevel'
=>
FILTER_DEFAULT
,
'p_d'
=>
FILTER_DEFAULT
,),
false
);
// 转义分类
...
...
@@ -422,6 +424,11 @@ class SearchController extends AbstractAction
if
(
isset
(
$condition
[
'color'
]))
{
$condition
[
'color'
]
=
rawurldecode
(
$condition
[
'color'
]);
}
//
if
(
isset
(
$condition
[
'ageLevel'
]))
{
$condition
[
'age_level'
]
=
rawurldecode
(
$condition
[
'ageLevel'
]);
unset
(
$condition
[
'ageLevel'
]);
}
// 为了兼容现在运营在用的p_d
if
(
isset
(
$condition
[
'p_d'
]))
{
$condition
[
'p_d'
]
=
rawurldecode
(
$condition
[
'p_d'
]);
...
...
@@ -442,7 +449,7 @@ class SearchController extends AbstractAction
if
(
isset
(
$condition
[
'style'
]))
{
$condition
[
'style'
]
=
rawurldecode
(
$condition
[
'style'
]);
}
// 区别各种列表页面的筛选数据
$data
=
Product\SearchModel
::
getFilterData
(
$condition
);
}
...
...
Please
register
or
login
to post a comment