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
449ec3b2abb6142145b77ed05ca7677d8a344a83
1 parent
ee5681e6
helpSearch 修改不符合规范代码格式
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
13 deletions
library/Plugin/HelperSearch.php
library/Plugin/HelperSearch.php
View file @
449ec3b
...
...
@@ -128,7 +128,8 @@ class HelperSearch
* @author sefon 2015-12-21 17:24:04
* @return array
*/
public
static
function
getProductList
(
$product
,
$imgSize
){
public
static
function
getProductList
(
$product
,
$imgSize
)
{
$goods
=
array
();
foreach
(
$product
as
$key
=>
$val
){
//NEW
...
...
@@ -171,7 +172,8 @@ class HelperSearch
* @param $filter
* @return array
*/
public
static
function
standard
(
$filter
)
{
public
static
function
standard
(
$filter
)
{
$params
=
self
::
$params
;
$result
=
array
();
foreach
(
$filter
as
$key
=>
$val
)
{
...
...
@@ -216,7 +218,8 @@ class HelperSearch
* 性别
* @return array
*/
public
static
function
gender
(
$filter
)
{
public
static
function
gender
(
$filter
)
{
if
(
empty
(
$filter
)
||
!
isset
(
$filter
[
'gender'
])
||
empty
(
$filter
[
'gender'
]))
{
return
array
();
}
...
...
@@ -342,7 +345,8 @@ class HelperSearch
* @param array $filter
* @return array
*/
public
static
function
brand
(
$filter
)
{
public
static
function
brand
(
$filter
)
{
$options
=
self
::
$options
;
//品牌列表返回空
if
(
isset
(
$options
[
'brandName'
]))
{
...
...
@@ -446,7 +450,8 @@ class HelperSearch
* @param array $filter
* @return array
*/
public
static
function
size
(
$filter
)
{
public
static
function
size
(
$filter
)
{
$params
=
self
::
$params
;
$sizeId
=
isset
(
$params
[
'size'
])
&&
!
empty
(
$params
[
'size'
])
?
$params
[
'size'
]
:
''
;
if
(
isset
(
$params
[
'size'
]))
{
...
...
@@ -483,7 +488,8 @@ class HelperSearch
* @param array $filter
* @return array
*/
public
static
function
color
(
$filter
)
{
public
static
function
color
(
$filter
)
{
$params
=
self
::
$params
;
$colorId
=
isset
(
$params
[
'color'
])
&&
!
empty
(
self
::
$params
[
'color'
])
?
self
::
$params
[
'color'
]
:
''
;
if
(
isset
(
$params
[
'color'
]))
{
...
...
@@ -519,7 +525,8 @@ class HelperSearch
* @param array
$filter
* @return array
*/
public static function price(
$filter
) {
public static function price(
$filter
)
{
$params
= self::
$params
;
$priceId
= isset(
$params['price']
) && !empty(self::
$params['price']
) ? self::
$params['price']
: '';
if (isset(
$params['price']
)) {
...
...
@@ -561,7 +568,8 @@ class HelperSearch
/**
* 获取自定义价格要提交的地址
*/
public static function customPrice(
$filter
) {
public static function customPrice(
$filter
)
{
$params
= self::
$params
;
$result
= array(
'min' => '',
...
...
@@ -584,7 +592,8 @@ class HelperSearch
* @param array
$filter
* @return array
*/
public static function style(
$filter
) {
public static function style(
$filter
)
{
$params
= self::
$params
;
$styleIds
= isset(
$params['style']
) && !empty(
$params['style']
) ? explode(',',
$params['style']
) : array();
if (isset(
$params['style']
)) {
...
...
@@ -975,7 +984,8 @@ class HelperSearch
/**
* 当前页地址
*/
public static function current(){
public static function current()
{
$url
= explode('?',
$_SERVER['REQUEST_URI']
);
self::
$listnav[0]['href']
=
$url[0]
;
return
$url[0]
;
...
...
@@ -983,7 +993,8 @@ class HelperSearch
/**
* 下一页
*/
public static function next(
$total
){
public static function next(
$total
)
{
$param
= self::
$params
;
$page
= self::
$page
;
$next
= array();
...
...
@@ -1024,13 +1035,14 @@ class HelperSearch
* @param
$viewNum
* @return mixed
*/
public static function pager(
$total
,
$viewNum
){
public static function pager(
$total
,
$viewNum
){
$Paging
= new Paging('Yoho');
return
$Paging->setTotal
(
$total
)->setSize(
$viewNum
)->view(0);
}
//组织静态资源数据格式
public static function formatNodeContent(
$code
){
public static function formatNodeContent(
$code
)
{
$nodeContent
= BrandData::getByNodeContent(
$code
);
if (isset(
$nodeContent['code']
) &&
$nodeContent['code']
=== 200) {
$result
= array();
...
...
Please
register
or
login
to post a comment