Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hongweigao
8 years ago
Commit
555d0f158a1474549ab1acadd5715533dda4c33a
1 parent
77978330
1、为您推荐接口2、修改图片尺寸
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
19 deletions
apps/product/models/newArrive-service.js
apps/product/views/partial/list/new-arrive-list.hbs
public/scss/product/_new-arrive.css
apps/product/models/newArrive-service.js
View file @
555d0f1
...
...
@@ -197,21 +197,6 @@ const index = (req) => {
Object
.
assign
(
respData
,
searchHandler
.
handlePathNavData
({},
{},
'new'
,
channel
));
if
(
result
[
1
].
code
===
200
&&
result
[
1
].
data
)
{
let
shopsData
=
_
.
get
(
result
,
'[1].data.shop_list'
,
[]),
dataList
=
[];
_
.
forEach
(
shopsData
,
shop
=>
{
dataList
.
push
({
url
:
helpers
.
urlFormat
(
''
,
{
shopId
:
shop
.
shops_id
},
shop
.
shop_domain
),
src
:
shop
.
shop_logo
,
num
:
shop
.
new_product_num
,
shopId
:
shop
.
shops_id
,
brandId
:
shop
.
brand_id
});
});
// 为您推荐
Object
.
assign
(
respData
.
recommond
.
dataList
,
dataList
);
_
.
forEach
(
_
.
get
(
result
,
'[1].data.ads'
,
[]),
ads
=>
{
// banner
...
...
@@ -229,6 +214,34 @@ const index = (req) => {
// 新品牌入驻
if
(
result
[
2
].
code
===
200
&&
result
[
2
].
data
)
{
let
hotBrandsData
=
_
.
get
(
result
,
'[2].data.hot_brand_list'
,
[]),
browseBrandsData
=
_
.
get
(
result
,
'[2].data.browse_brand_list'
,
[]),
recList
=
[];
_
.
forEach
(
hotBrandsData
,
hotBrand
=>
{
recList
.
push
({
url
:
helpers
.
urlFormat
(
''
,
{
shopId
:
hotBrand
.
shops_id
},
hotBrand
.
shop_domain
),
src
:
hotBrand
.
shop_logo
,
num
:
hotBrand
.
new_product_num
,
shopId
:
hotBrand
.
shops_id
,
brandId
:
hotBrand
.
brand_id
});
});
_
.
forEach
(
browseBrandsData
,
browseBrand
=>
{
recList
.
push
({
url
:
helpers
.
urlFormat
(
''
,
{
shopId
:
browseBrand
.
shops_id
},
browseBrand
.
shop_domain
),
src
:
browseBrand
.
shop_logo
,
num
:
browseBrand
.
new_product_num
,
shopId
:
browseBrand
.
shops_id
,
brandId
:
browseBrand
.
brand_id
});
});
// 为您推荐
Object
.
assign
(
respData
.
recommond
.
dataList
,
recList
);
let
brandsData
=
_
.
get
(
result
,
'[2].data.new_brand_list'
,
[]),
brandList
=
[];
...
...
apps/product/views/partial/list/new-arrive-list.hbs
View file @
555d0f1
...
...
@@ -15,7 +15,7 @@
<div
class=
"good-info imgopacity"
data-skn=
"
{{
proSkn
}}
"
>
<div
class=
"good-detail-img"
>
<a
class=
"good-thumb"
href=
"
{{
url
}}
"
target=
"_blank"
>
<img
class=
"lazy"
data-original=
"
{{
image2
src
w
=
222
h
=
300
}}
"
style=
"display: block; opacity: 1;"
>
<img
class=
"lazy"
data-original=
"
{{
image2
src
w
=
222
h
=
298
}}
"
style=
"display: block; opacity: 1;"
>
</a>
</div>
<div
class=
"good-detail-text"
>
...
...
public/scss/product/_new-arrive.css
View file @
555d0f1
...
...
@@ -199,7 +199,7 @@
.list-box
{
border
:
1px
solid
#e0e0e0
;
border-top
:
0
;
height
:
15
3
px
;
height
:
15
2
px
;
padding-top
:
18px
;
padding-bottom
:
18px
;
padding-left
:
5px
;
...
...
@@ -287,7 +287,8 @@
}
.good-detail-img
,
.guang-box
,
.brand-box
{
height
:
300px
;
height
:
298px
;
overflow
:
hidden
;
}
.good-detail-text
{
...
...
@@ -334,6 +335,7 @@
.guang-box
{
position
:
relative
;
overflow
:
hidden
;
.guang-img
{
width
:
100%
;
...
...
@@ -377,7 +379,7 @@
.msg-info
{
position
:
relative
;
height
:
1
20
px
;
height
:
1
18
px
;
background
:
#027cf9
;
color
:
#fff
;
padding
:
20px
10px
20px
10px
;
...
...
Please
register
or
login
to post a comment