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
b47c1f5b1357762b3903fd45afed8dce8f819b28
1 parent
2abcad3c
店铺装修 商品列表 shopId参数
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
library/WebPlugin/HelperSearch.php
yohobuy/www.yohobuy.com/application/models/Product/Shop.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
library/WebPlugin/HelperSearch.php
View file @
b47c1f5
...
...
@@ -1187,6 +1187,10 @@ class HelperSearch
}
$queryPath
= explode('?',
$_SERVER['REQUEST_URI']
);
$params_arr
= array();
//店铺装修,添加额外参数
if (empty(
$params['shopId']
) && isset(
$_REQUEST['shopId']
)) {
$params['shopId']
=
$_REQUEST['shopId']
;
}
foreach (
$params
as
$key
=>
$val
) {
if (is_array(
$val
) ||
$val
=== '') {
continue;
...
...
@@ -1322,6 +1326,10 @@ class HelperSearch
if (!empty(self::
$specialsaleParam
)) {
$url[0]
.= '?' . http_build_query(self::
$specialsaleParam
);
}
//店铺装修,添加额外参数
if (empty(
$urlParam['shopId']
) && isset(
$_REQUEST['shopId']
)) {
$urlParam['shopId']
=
$_REQUEST['shopId']
;
}
if (isset(self::
$params['query']
)) {
$urlParam['query']
= self::
$params['query']
;
}
...
...
@@ -1441,7 +1449,7 @@ class HelperSearch
if (self::
$total
== 0 || empty(
$shopSort
)) {
return
$shopEntry
;
}
$url
= Helpers::url('',
''
,
$shop['brand_domain']
);
$url
= Helpers::url('',
array('shopId' =>
$shop['shop_id']
)
,
$shop['brand_domain']
);
$sort
= array();
$sortInfo
= array();
foreach (
$shopSort
as
$msort
) {
...
...
yohobuy/www.yohobuy.com/application/models/Product/Shop.php
View file @
b47c1f5
...
...
@@ -445,11 +445,11 @@ class ShopModel
* @param type $data
* @return type []
*/
public
static
function
goodsTabBar
(
$data
)
public
static
function
goodsTabBar
(
$data
,
$parameters
)
{
$more
=
array
(
'name'
=>
'MORE'
,
'href'
=>
self
::
$shopListUrl
'href'
=>
self
::
$shopListUrl
.
'?shopId='
.
$parameters
[
'shopId'
]
);
$result
=
array
(
'hot'
=>
array
(),
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
b47c1f5
...
...
@@ -349,7 +349,13 @@ class IndexController extends WebAction
$this
->
go
(
SITE_MAIN
);
}
$shopId
=
$this
->
get
(
'shopId'
,
0
);
//根据品牌域名获取品牌id(同时判断品牌域名是否有效),无效跳转首页
$result
=
BrandsModel
::
getBrandByDomain
(
$domain
);
if
(
!
$result
)
{
$this
->
go
(
SITE_MAIN
);
}
$shopId
=
isset
(
$result
[
'shopId'
])
?
$result
[
'shopId'
]
:
$this
->
get
(
'shopId'
,
0
);
//获取uid
$uid
=
$this
->
getUid
();
...
...
@@ -366,7 +372,7 @@ class IndexController extends WebAction
),
'uid'
=>
$uid
,
'navBar'
=>
$this
->
get
(
'navBar'
,
1
),
'shopId'
=>
$
this
->
get
(
'shopId'
,
0
)
,
'shopId'
=>
$
shopId
,
'brand'
=>
$this
->
get
(
'brand'
,
0
)
);
...
...
Please
register
or
login
to post a comment