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
Plain Diff
Browse Files
Authored by
whb
9 years ago
Commit
38871b7ae6d0fcc117d389fddc05f6c1f52352d0
2 parents
47836a55
dbff70e8
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
21 deletions
library/WebPlugin/HelperSearch.php
yohobuy/www.yohobuy.com/application/models/Product/New.php
yohobuy/www.yohobuy.com/application/models/Product/Search.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/List.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Sale.php
library/WebPlugin/HelperSearch.php
View file @
38871b7
...
...
@@ -4,9 +4,6 @@ namespace WebPlugin;
use
WebPlugin\Paging
;
use
LibModels\Web\Product\BrandData
;
use
LibModels\Web\Product\SearchData
;
use
Api\Yohobuy
;
use
Api\Sign
;
use
Configs\ChannelConfig
;
use
Index\HomeModel
;
/**
...
...
@@ -317,7 +314,7 @@ class HelperSearch
foreach
(
$sort
as
$key
=>
$val
)
{
//是否有品牌
if
(
$options
[
'action'
]
!=
'brand'
&&
$options
[
'controller'
]
!=
'
i
ndex'
)
{
if
(
$options
[
'action'
]
!=
'brand'
&&
$options
[
'controller'
]
!=
'
I
ndex'
)
{
//若url参数有分类,设置msort导航
if
(
isset
(
self
::
$params
[
'msort'
])
&&
self
::
$params
[
'msort'
]
==
$val
[
'sort_id'
])
{
self
::
$listNav
[
1
]
=
array
(
...
...
@@ -1299,7 +1296,7 @@ class HelperSearch
$type
= isset(self::
$params['msort']
) && self::
$params['msort']
? self::
$params['msort']
: '';
}
//新品到着
elseif (
$controller
== '
l
ist' &&
$action
== 'new') {
elseif (
$controller
== '
L
ist' &&
$action
== 'new') {
if (isset(self::
$params['shelve_time']
)) {
$date
= explode(',', self::
$params['shelve_time']
);
$date
= date('Y-m-d',
$date[0]
);
...
...
yohobuy/www.yohobuy.com/application/models/Product/New.php
View file @
38871b7
...
...
@@ -24,8 +24,6 @@ class NewModel
$urlList
[
'sort'
]
=
SearchData
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
// 组合搜索最新上架url
$urlList
[
'recent'
]
=
SearchData
::
getRecentShelveUrl
(
$searchCondition
[
'condition'
]);
//用户浏览记录
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
$result
=
Yohobuy
::
getMulti
(
$urlList
,
array
(),
true
);
// 组织模板数据
...
...
yohobuy/www.yohobuy.com/application/models/Product/Search.php
View file @
38871b7
...
...
@@ -102,7 +102,12 @@ class SearchModel
$condition
[
'attribute_not'
]
=
2
;
//默认排序
if
(
!
isset
(
$condition
[
'order'
])
||
empty
(
$condition
[
'order'
]))
{
$condition
[
'order'
]
=
's_n_desc'
;
//如果新品到着没传排序方式,默认按s_t_desc(新品)顺序排序
if
(
$option
[
'controller'
]
==
'List'
&&
$option
[
'action'
]
==
'new'
)
{
$condition
[
'order'
]
=
's_t_desc'
;
}
else
{
$condition
[
'order'
]
=
's_n_desc'
;
}
}
$options
=
array
(
'imgSize'
=>
$imgSize
,
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
38871b7
...
...
@@ -44,7 +44,7 @@ class IndexController extends WebAction
$options
[
'brandNameEn'
]
=
isset
(
$result
[
'brandNameEn'
])
?
$result
[
'brandNameEn'
]
:
''
;
$options
[
'brandNameCn'
]
=
isset
(
$result
[
'brandNameCn'
])
?
$result
[
'brandNameCn'
]
:
''
;
$options
[
'reviewNum'
]
=
6
;
$options
[
'controller'
]
=
'
i
ndex'
;
$options
[
'controller'
]
=
'
I
ndex'
;
$options
[
'action'
]
=
'brand'
;
//调用模型获得数据
...
...
@@ -90,10 +90,10 @@ class IndexController extends WebAction
$options
[
'brandId'
]
=
isset
(
$result
[
'brandId'
])
?
$result
[
'brandId'
]
:
''
;
$options
[
'brandBanner'
]
=
isset
(
$result
[
'brandBanner'
])
?
$result
[
'brandBanner'
]
:
''
;
$options
[
'brandAbout'
]
=
isset
(
$result
[
'brandAbout'
])
?
$result
[
'brandAbout'
]
:
''
;
$options
[
'controller'
]
=
$this
->
_request
->
controller
;
$options
[
'action'
]
=
$this
->
_request
->
action
;
$options
[
'controller'
]
=
'Index'
;
$options
[
'action'
]
=
'brand'
;
//调用模型获得数据
$data
=
Product\
BrandsModel
::
getBrandIntro
(
$condition
,
$options
);
$data
=
BrandsModel
::
getBrandIntro
(
$condition
,
$options
);
$data
=
array
(
//初始化js
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/List.php
View file @
38871b7
...
...
@@ -15,8 +15,8 @@ class ListController extends WebAction
$options
=
array
(
'positionId'
=>
$positionId
,
'reviewNum'
=>
6
,
'controller'
=>
$this
->
_request
->
controller
,
//TODO
'action'
=>
$this
->
_request
->
action
'controller'
=>
'List'
,
'action'
=>
'index'
);
$indexData
=
IndexModel
::
getIndexData
(
$condition
,
$options
);
...
...
@@ -35,12 +35,10 @@ class ListController extends WebAction
*/
public
function
newAction
()
{
$condition
=
array
(
'order'
=>
's_t_desc'
);
$condition
=
array
();
$options
=
array
(
'reviewNum'
=>
6
,
'controller'
=>
'
l
ist'
,
'controller'
=>
'
L
ist'
,
'action'
=>
'new'
);
...
...
@@ -64,7 +62,7 @@ class ListController extends WebAction
$options
[
'reviewNum'
]
=
6
;
$condition
=
array
();
$option
=
array
(
'controller'
=>
'
l
ist'
,
'controller'
=>
'
L
ist'
,
'action'
=>
'sale'
,
'reviewNum'
=>
6
);
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Sale.php
View file @
38871b7
...
...
@@ -2,6 +2,7 @@
use
Action\WebAction
;
use
LibModels\Web\Product\SaleData
;
use
Product\SaleModel
;
/**
* sale页
...
...
@@ -43,12 +44,12 @@ class SaleController extends WebAction
}
$options
=
array
(
'controller'
=>
'
s
ale'
,
'controller'
=>
'
S
ale'
,
'action'
=>
'index'
,
'reviewNum'
=>
6
);
$saleData
=
Product\
SaleModel
::
getSaleSearchData
(
$condition
,
$options
,
$specialInfo
);
$saleData
=
SaleModel
::
getSaleSearchData
(
$condition
,
$options
,
$specialInfo
);
$data
=
array
(
//初始化js
...
...
Please
register
or
login
to post a comment