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
htoooth
9 years ago
Commit
e324a066b5d0988cd12eff215e34b6eb1f4d3c23
1 parent
85e7379c
新增销售类目
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
template/m.yohobuy.com/partials/product/query-param.phtml
yohobuy/m.yohobuy.com/application/controllers/Search.php
template/m.yohobuy.com/partials/product/query-param.phtml
View file @
e324a06
...
...
@@ -76,4 +76,8 @@
{
{#if
outlets
}
}
<input
class=
"query-param"
type=
"hidden"
data-attr=
"outlets"
value=
"{{outlets}}"
>
{
{/if
}
}
{
{#if
poolId
}
}
<input
class=
"query-param"
type=
"hidden"
data-attr=
"poolId"
value=
"{{poolId}}"
>
{
{/if
}
}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/controllers/Search.php
View file @
e324a06
...
...
@@ -80,10 +80,7 @@ class SearchController extends AbstractAction
$condition
[
'query'
]
=
rawurlencode
(
$condition
[
'query'
]);
}
// 用户自定义商品类目
if
(
isset
(
$condition
[
'filter_poolId'
])){
$condition
[
'filter_poolId'
]
=
rawurldecode
(
$condition
[
'poolId'
]);
}
// 标识用户是否有输入搜索内容
$haveQuery
=
!
empty
(
$query
);
...
...
@@ -167,6 +164,13 @@ class SearchController extends AbstractAction
$data
[
'goodListPage'
]
=
true
;
$data
[
'goodList'
]
=
$condition
;
$data
[
'query'
]
=
$query
;
// 用户自定义商品类目
if
(
isset
(
$condition
[
'poolId'
])){
$data
[
'poolId'
]
=
rawurldecode
(
$condition
[
'poolId'
]);
}
// 搜索是一级品类
if
(
$isQueryFirstClass
)
{
$this
->
setTitle
(
'全部'
.
$query
);
...
...
@@ -258,7 +262,8 @@ class SearchController extends AbstractAction
'p_d'
=>
FILTER_DEFAULT
,
'outlets'
=>
FILTER_DEFAULT
,
'age_level'
=>
FILTER_DEFAULT
,
'page'
=>
FILTER_VALIDATE_INT
,),
false
);
'page'
=>
FILTER_VALIDATE_INT
,
'poolId'
=>
FILTER_DEFAULT
),
false
);
if
(
!
empty
(
$condition
[
'shop_id'
]))
{
$condition
[
'shop'
]
=
$condition
[
'shop_id'
];
...
...
@@ -319,6 +324,12 @@ class SearchController extends AbstractAction
$condition
[
'outlets'
]
=
rawurldecode
(
$condition
[
'outlets'
]);
}
// 用户自定义商品类目
if
(
isset
(
$condition
[
'poolId'
])){
$condition
[
'filter_poolId'
]
=
rawurldecode
(
$condition
[
'poolId'
]);
unset
(
$condition
[
'poolId'
]);
}
// 转换排序方式
$type
=
$this
->
get
(
'type'
,
''
);
$order
=
$this
->
get
(
'order'
,
0
);
...
...
Please
register
or
login
to post a comment