Toggle navigation
Toggle navigation
This project
Loading...
Sign in
chenchao
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王水玲
2016-05-20 20:20:49 +0800
Commit
76786e27a770afa2178d5cb1c041b5467543171d
1 parent
955745a1
店铺装修 搜索页入口修改
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
23 deletions
template/www.yohobuy.com/partials/product/shop-entry.phtml
web-static/js/product/product.js
web-static/sass/product/_shop-entry.css
template/www.yohobuy.com/partials/product/shop-entry.phtml
View file @
76786e2
{
{#
shopEntry
}
}
<div
class=
"shop-entry clearfix"
>
<a
class=
"pull-left"
href=
"{{home}}"
>
<img
class=
"logo"
src=
"{{logo}}"
>
</a>
<div class="shop-entry-area">
{{# shopEntry}}
<div class="shop-entry clearfix">
<a class="pull-left" href="{{home}}">
<img class="logo" src="{{logo}}">
</a>
<div
class=
"name pull-left"
>
<a
class=
"shop-name"
href=
"{{home}}"
>
{
{shopName
}
}</a>
<p
class=
"sorts"
>
{
{#each
sort
}
}
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<div class="name pull-left">
<a class="shop-name" href="{{home}}">{{shopName}}</a>
<p class="sorts">
{{#each sort}}
<a href="{{href}}">{{name}}</a>
{
{#unless
@last
}
}
/
{
{/unless
}
}
{
{/each
}
}
</p>
</div>
{{#unless @last}}
/
{{/unless}}
{{/each}}
</p>
</div>
<a
class=
"entry-btn pull-right"
href=
"{{home}}"
>
进入品牌店铺
<span
class=
"iconfont"
>
601
;</span>
</a>
</div>
{
{/
shopEntry
}
}
<a class="entry-btn pull-right" href="{{home}}">
进入品牌店铺
<span class="iconfont"></span>
</a>
</div>
{{/ shopEntry}}
</div>
\ No newline at end of file
...
...
web-static/js/product/product.js
View file @
76786e2
...
...
@@ -24,6 +24,31 @@ lazyLoad($('img.lazy'));
* @num 每列存放商品的个数
*/
exports
.
init
=
function
(
num
)
{
var
$shopEntry
=
$
(
'.shop-entry'
),
$shopEntryArea
=
$
(
'.shop-entry-area'
),
shopEntryLen
=
$shopEntry
.
length
;
if
(
shopEntryLen
>
0
)
{
if
(
shopEntryLen
%
3
===
1
)
{
$shopEntry
.
eq
(
shopEntryLen
-
1
).
css
({
width
:
'100%'
});
}
else
if
(
shopEntryLen
%
3
===
2
)
{
$shopEntry
.
eq
(
shopEntryLen
-
1
).
css
({
width
:
'49%'
});
$shopEntry
.
eq
(
shopEntryLen
-
2
).
css
({
width
:
'49%'
});
}
$
(
'.shop-entry:nth-child(3n+1)'
).
css
({
marginLeft
:
0
});
$shopEntryArea
.
show
();
}
productList
=
null
;
...
...
web-static/sass/product/_shop-entry.css
View file @
76786e2
.shop-entry-area
{
width
:
100%
;
height
:
auto
;
overflow
:
hidden
;
display
:
none
;
.
shop-entry
:
first-child
{
margin-left
:
0
;
}
}
.shop-entry
{
position
:
relative
;
background
:
#f5f7f6
;
border
:
1px
solid
#eaeceb
;
padding
:
12px
15px
;
margin-bottom
:
10px
;
width
:
32%
;
box-sizing
:
border-box
;
float
:
left
;
margin
:
0
0
10px
2%
;
.logo
{
width
:
80px
;
...
...
Please
register
or
login
to post a comment