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
郭成尧
9 years ago
Commit
9c1fd7be9edb71e3d31073900dcb4f8fb1430702
1 parent
6f489c69
'品牌页性别参数'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
static/js/product/shop.js
template/m.yohobuy.com/actions/product/index/shop.phtml
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
static/js/product/shop.js
View file @
9c1fd7b
...
...
@@ -557,12 +557,26 @@ function search(opt) {
});
}
/**
* 获取url参数
*/
function
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
window
.
unescape
(
r
[
2
]);
}
return
null
;
}
$
.
ajax
({
type
:
'GET'
,
url
:
'/search/filter'
,
data
:
{
shop_id
:
brand
?
''
:
shopId
,
brand
:
brand
brand
:
brand
,
gender
:
getQueryString
(
'gender'
)
},
success
:
function
(
data
)
{
$goodsContainer
.
append
(
data
);
...
...
template/m.yohobuy.com/actions/product/index/shop.phtml
View file @
9c1fd7b
...
...
@@ -164,4 +164,5 @@
</ul>
</div>
{
{/
shopIndex
}
}
{
{>
product/query-param
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
9c1fd7b
...
...
@@ -484,7 +484,8 @@ class IndexController extends AbstractAction
'shopPage'
=>
array
(
'text'
=>
'分类'
,
'url'
=>
Helpers
::
url
(
'/product/index/category'
,
array
(
'shop_id'
=>
$shopId
))
)
),
'gender'
=>
$this
->
get
(
'gender'
)
));
}
...
...
Please
register
or
login
to post a comment