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
周少峰
9 years ago
Commit
cc8623770305c16a4261f62af3c05506a3c98fab
2 parents
cd44c04f
ed45709e
Merge branch 'release/5.0.1'
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
23 deletions
library/WebPlugin/HelperSearch.php
library/WebPlugin/Helpers.php
template/www.yohobuy.com/partials/product/filter-box.phtml
yohobuy/www.yohobuy.com/application/models/Guang/Index.php
yohobuy/www.yohobuy.com/application/models/Guang/Info.php
library/WebPlugin/HelperSearch.php
View file @
cc86237
...
...
@@ -470,6 +470,14 @@ class HelperSearch
return
$result
;
}
$params
=
self
::
$params
;
do
{
if
(
isset
(
$params
[
'ageLevel'
])
&&
$params
[
'ageLevel'
]
==
1
)
{
break
;
}
if
(
count
(
$filter
[
'ageLevel'
])
===
1
&&
$filter
[
'ageLevel'
][
0
][
'name'
]
===
'成人'
)
{
return
$result
;
}
}
while
(
false
);
$ageLevel
=
isset
(
$params
[
'ageLevel'
])
?
$params
[
'ageLevel'
]
:
''
;
if
(
isset
(
$params
[
'ageLevel'
]))
{
unset
(
$params
[
'ageLevel'
]);
...
...
@@ -477,8 +485,7 @@ class HelperSearch
if
(
self
::
$total
==
0
)
{
return
$result
;
}
sort
(
$filter
[
'ageLevel'
]);
foreach
(
$filter
[
'ageLevel'
]
as
$key
=>
$val
)
{
if
(
intval
(
$val
[
'id'
])
===
$ageLevel
)
{
self
::
$selected
[
'ageLevel'
]
=
array
(
...
...
library/WebPlugin/Helpers.php
View file @
cc86237
...
...
@@ -359,7 +359,7 @@ class Helpers
$result
[
'id'
]
=
$articleData
[
'id'
];
$result
[
'classification'
]
=
$articleData
[
'category_name'
];
$result
[
'isReco'
]
=
$articleData
[
'is_recommended'
]
?
true
:
false
;
$result
[
'url'
]
=
$
isApp
?
$articleData
[
'url'
]
:
self
::
url
(
'/'
.
$articleData
[
'id'
]
.
'.html'
,
array
(),
'guang'
);
$result
[
'url'
]
=
$
articleData
[
'url'
]
?
$articleData
[
'url'
]
:
self
::
url
(
'/'
.
$articleData
[
'id'
]
.
'.html'
,
array
(),
'guang'
);
$result
[
'img'
]
=
self
::
getImageUrl
(
$articleData
[
'src'
],
$width
,
$height
,
1
);
$result
[
'isSquareImg'
]
=
$isSquareImage
;
$result
[
'title'
]
=
$articleData
[
'title'
];
...
...
template/www.yohobuy.com/partials/product/filter-box.phtml
View file @
cc86237
...
...
@@ -48,20 +48,6 @@
</div>
{{/if}}
{{#if ageLevel}}
<div class="channel section">
<span class="title">年龄:</span>
<div class="attr-content clearfix">
{{#each ageLevel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
{{name}}
</a>
{{/each}}
</div>
</div>
{{/if}}
{{#if sort}}
<div class="sort section">
<span class="title">分类:</span>
...
...
@@ -180,6 +166,20 @@
</div>
{{/ brand}}
{{#if ageLevel}}
<div class="channel section">
<span class="title">人群:</span>
<div class="attr-content clearfix">
{{#each ageLevel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
{{name}}
</a>
{{/each}}
</div>
</div>
{{/if}}
{{#if price}}
<div class="price section">
<span class="title">价格:</span>
...
...
yohobuy/www.yohobuy.com/application/models/Guang/Index.php
View file @
cc86237
...
...
@@ -75,9 +75,9 @@ class IndexModel
$data
=
ListData
::
category
();
foreach
(
$data
[
'data'
]
as
$category
)
{
if
(
$category
[
'name'
]
==
'专题'
)
{
continue
;
}
// if ($category['name'] == '专题') {
// continue;
// }
$ret
[]
=
array
(
'typeId'
=>
$category
[
'id'
],
'type'
=>
$category
[
'name'
],
'isActive'
=>
$currentSortId
==
$category
[
'id'
]
?
true
:
false
,
...
...
@@ -153,7 +153,7 @@ class IndexModel
if
(
!
empty
(
$data
[
'data'
]))
{
foreach
(
$data
[
'data'
]
as
$key
=>
$article
)
{
$list
[]
=
array
(
'url'
=>
Helpers
::
url
(
'/'
.
$article
[
'id'
]
.
'.html'
,
''
,
'guang'
),
'url'
=>
$article
[
'url'
]
?
$article
[
'url'
]
:
Helpers
::
url
(
'/'
.
$article
[
'id'
]
.
'.html'
,
''
,
'guang'
),
'title'
=>
$article
[
'title'
]
);
if
(
isset
(
$article
[
'src'
])
&&
!
empty
(
$article
[
'src'
]))
{
...
...
yohobuy/www.yohobuy.com/application/models/Guang/Info.php
View file @
cc86237
...
...
@@ -134,7 +134,7 @@ class InfoModel
foreach
(
$data
[
'relate'
]
as
$key
=>
$val
)
{
$result
[
'relatedPost'
][
$key
][
'title'
]
=
$val
[
'title'
];
$result
[
'relatedPost'
][
$key
][
'thumb'
]
=
Images
::
getImageUrl
(
$val
[
'thumb'
],
264
,
173
,
1
);
$result
[
'relatedPost'
][
$key
][
'url'
]
=
Helpers
::
url
(
'/'
.
$val
[
'id'
]
.
'.html'
,
array
(),
'guang'
);
$result
[
'relatedPost'
][
$key
][
'url'
]
=
isset
(
$val
[
'url'
])
&&
$val
[
'url'
]
?
$val
[
'url'
]
:
Helpers
::
url
(
'/'
.
$val
[
'id'
]
.
'.html'
,
array
(),
'guang'
);
}
}
//精彩推荐
...
...
@@ -142,7 +142,7 @@ class InfoModel
foreach
(
$data
[
'recommend'
]
as
$key
=>
$val
)
{
$result
[
'exRecos'
][
$key
][
'title'
]
=
$val
[
'title'
];
$result
[
'exRecos'
][
$key
][
'img'
]
=
isset
(
$val
[
'src'
])
?
Images
::
getImageUrl
(
$val
[
'src'
],
90
,
60
)
:
''
;
$result
[
'exRecos'
][
$key
][
'url'
]
=
Helpers
::
url
(
'/'
.
$val
[
'id'
]
.
'.html'
,
array
(),
'guang'
);
$result
[
'exRecos'
][
$key
][
'url'
]
=
isset
(
$val
[
'url'
])
&&
$val
[
'url'
]
?
$val
[
'url'
]
:
Helpers
::
url
(
'/'
.
$val
[
'id'
]
.
'.html'
,
array
(),
'guang'
);
}
}
//热门标签
...
...
Please
register
or
login
to post a comment