Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
石坚
9 years ago
Commit
6195aa148576ec0390ec47d82be74c5e4f1270cb
1 parent
c963f42b
camel个人中心
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
apps/me/controllers/favorite.js
apps/me/views/partial/collection/brand.hbs
apps/me/controllers/favorite.js
View file @
6195aa1
...
...
@@ -72,7 +72,7 @@ const favorite = {
});
retData
.
products
=
data
.
product_list
.
filter
(
p
=>
{
return
!
sort
||
sort
===
p
.
category
I
d
;
return
!
sort
||
sort
===
p
.
category
_i
d
;
}).
slice
((
page
-
1
)
*
16
,
page
*
16
);
retData
.
products
.
forEach
(
p
=>
{
...
...
@@ -91,7 +91,7 @@ const favorite = {
ret
.
content
.
banner
=
thumb
;
}
res
.
display
(
'index'
,
ret
);
console
.
log
(
JSON
.
stringify
(
ret
));
res
.
display
(
'index'
,
ret
);
}).
catch
(
next
);
},
...
...
@@ -144,14 +144,14 @@ const favorite = {
if
(
retData
.
brandList
)
{
_
.
each
(
retData
.
brandList
,
b
=>
{
if
(
b
.
newProduct
&&
b
.
newProduct
.
length
>
0
)
{
b
.
newProduct
.
forEach
(
p
=>
{
if
(
b
.
new_product
&&
b
.
new_product
.
length
>
0
)
{
b
.
new_product
.
forEach
(
p
=>
{
p
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
p
.
productId
}
_$
{
p
.
goods
[
0
].
id
}
/${p.cnAlphabet}.html`; // eslint-disable-lin
e
});
b
.
new
P
roduct
.
push
({
b
.
new
_p
roduct
.
push
({
more
:
true
});
b
.
new
Product
=
_
.
chunk
(
b
.
newP
roduct
,
4
);
b
.
new
_product
=
_
.
chunk
(
b
.
new_p
roduct
,
4
);
}
else
{
b
.
noNewProduct
=
true
;
}
...
...
apps/me/views/partial/collection/brand.hbs
View file @
6195aa1
...
...
@@ -40,7 +40,7 @@
</div>
<div
class=
"slide-wrap"
>
<ul>
{{#
each
new
P
roduct
}}
{{#
each
new
_p
roduct
}}
<li
class=
"clearfix"
>
{{#
each
this
}}
{{#if
more
}}
...
...
Please
register
or
login
to post a comment