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
042e24360a18482a4c64bf7c2ee6f033280884b6
1 parent
806ba68c
fix bugs
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
48 deletions
apps/me/controllers/favorite.js
apps/me/views/partial/collection/brand.hbs
apps/product/models/shop-service.js
public/js/product/list/list-search.js
public/scss/me/favorite/_brand.css
apps/me/controllers/favorite.js
View file @
042e243
...
...
@@ -142,13 +142,17 @@ const favorite = {
if
(
retData
.
brandList
)
{
retData
.
brandList
.
forEach
(
b
=>
{
b
.
newProduct
.
forEach
(
p
=>
{
p
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
p
.
productId
}
_$
{
p
.
goods
[
0
].
id
}
/${p.cnAlphabet}.html`; // eslint-disable-lin
e
});
b
.
newProduct
.
push
({
more
:
true
});
b
.
newProduct
=
_
.
chunk
(
b
.
newProduct
,
4
);
if
(
b
.
newProduct
&&
b
.
newProduct
.
length
>
0
)
{
b
.
newProduct
.
forEach
(
p
=>
{
p
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
p
.
productId
}
_$
{
p
.
goods
[
0
].
id
}
/${p.cnAlphabet}.html`; // eslint-disable-lin
e
});
b
.
newProduct
.
push
({
more
:
true
});
b
.
newProduct
=
_
.
chunk
(
b
.
newProduct
,
4
);
}
else
{
b
.
noNewProduct
=
true
;
}
});
}
ret
.
content
.
favorite
.
data
=
retData
;
...
...
apps/me/views/partial/collection/brand.hbs
View file @
042e243
...
...
@@ -17,49 +17,58 @@
{{
brandName
}}
</div>
<div
class=
"tool-area clearfix"
>
<a
class=
"btn white"
href=
"/product/shop/
{{
brandDomain
}}{{#if
shopId
}}
?shopId=
{{
shopId
}}{{/if}}
"
target=
"_blank"
>
去店铺页
</a>
<a
class=
"btn white"
href=
"/product/shop/
{{
brandDomain
}}{{#if
shopId
}}
?shopId=
{{
shopId
}}{{/if}}
"
target=
"_blank"
>
去店铺页
</a>
<span
class=
"btn white cancel"
>
取消收藏
</span>
</div>
</div>
<div
class=
"brand-products slide-container"
>
<div
class=
"slide-switch"
>
<a
class=
"prev"
href=
"javascript:;"
>
<span
class=
"iconfont"
>

</span>
</a>
<a
class=
"next"
href=
"javascript:;"
>
<span
class=
"iconfont"
>

</span>
</a>
</div>
<div
class=
"slide-wrap"
>
<ul>
{{#
each
newProduct
}}
<li
class=
"clearfix"
>
{{#
each
this
}}
{{#if
more
}}
<div
class=
"goods-more"
>
<a
href=
"/product/shop/
{{
..
/
..
/
brandDomain
}}{{#if
..
/
..
/
shopId
}}
?shopId=
{{
..
/
..
/
shopId
}}{{/if}}
"
target=
"_blank"
>
<div
class=
"more-text"
>
MORE
</div>
<p>
查看更多
</p>
</a>
</div>
{{^}}
<div
class=
"goods-info"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<img
class=
"lazy thumb"
src=
"
{{
image
defaultImages
148
196
}}
"
style=
"display: block;"
>
<div
class=
"desc"
>
<span
class=
"name"
>
{{
productName
}}
</span>
<p
class=
"price"
>
¥
{{
round
salesPrice
2
}}
</p>
</div>
</a>
</div>
{{/if}}
{{/
each
}}
</li>
{{/
each
}}
</ul>
</div>
{{#if
noNewProduct
}}
<p
class=
"no-product-info"
>
暂无新品, 去
<a
href=
"/
{{
siteUrl
}}
/brand"
target=
"_blank"
>
名牌频道
</a>
看看吧
</p>
{{^}}
<div
class=
"slide-switch"
>
<a
class=
"prev"
href=
"javascript:;"
>
<span
class=
"iconfont"
>

</span>
</a>
<a
class=
"next"
href=
"javascript:;"
>
<span
class=
"iconfont"
>

</span>
</a>
</div>
<div
class=
"slide-wrap"
>
<ul>
{{#
each
newProduct
}}
<li
class=
"clearfix"
>
{{#
each
this
}}
{{#if
more
}}
<div
class=
"goods-more"
>
<a
href=
"/product/shop/
{{
..
/
..
/
brandDomain
}}{{#if
..
/
..
/
shopId
}}
?shopId=
{{
..
/
..
/
shopId
}}{{/if}}
"
target=
"_blank"
>
<div
class=
"more-text"
>
MORE
</div>
<p>
查看更多
</p>
</a>
</div>
{{^}}
<div
class=
"goods-info"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<img
class=
"lazy thumb"
src=
"
{{
image
defaultImages
148
196
}}
"
style=
"display: block;"
>
<div
class=
"desc"
>
<span
class=
"name"
>
{{
productName
}}
</span>
<p
class=
"price"
>
¥
{{
round
salesPrice
2
}}
</p>
</div>
</a>
</div>
{{/if}}
{{/
each
}}
</li>
{{/
each
}}
</ul>
</div>
{{/if}}
</div>
</div>
{{/
each
}}
...
...
apps/product/models/shop-service.js
View file @
042e243
...
...
@@ -161,6 +161,7 @@ const ShopService = {
let
brandInfo
=
yield
BrandService
.
getBrandInfo
(
info
.
brandId
,
uid
);
info
.
name
=
brandInfo
.
brandName
;
// info.info = brandInfo.brandIntro;
info
.
btnName
=
'品牌介绍'
;
info
.
isFavorite
=
brandInfo
.
isFavorite
===
'Y'
;
...
...
public/js/product/list/list-search.js
View file @
042e243
...
...
@@ -304,7 +304,6 @@ var YohoListPage = {
});
},
openBrandMulitChoose
:
function
()
{
console
.
log
(
1
);
$
(
'.yoho-product-list .mulit-choose'
).
hide
();
$
(
'.input-radio'
,
this
.
brandsDoc
).
check
({
type
:
'checkbox'
...
...
@@ -361,7 +360,6 @@ var YohoListPage = {
first
=
first
.
toLowerCase
();
if
(
letter
===
'0-9'
)
{
console
.
log
(
first
);
if
((
first
>=
'a'
&&
first
<=
'z'
)
||
(
first
>=
'A'
&&
first
<=
'Z'
))
{
$
(
this
).
hide
();
}
else
{
...
...
public/scss/me/favorite/_brand.css
View file @
042e243
...
...
@@ -72,6 +72,15 @@
width
:
685px
;
position
:
relative
;
}
.no-product-info
{
text-align
:
center
;
margin-top
:
65px
;
a
{
color
:
#379ed6
;
}
}
}
.goods-info
{
...
...
Please
register
or
login
to post a comment