Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
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
张丽霞
9 years ago
Commit
6336830dda2241756e060831d270b1ed16ba066c
1 parent
59a3ac31
商品分类中所有商品业务逻辑修改
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
28 deletions
static/js/product/product-category.js
static/sass/product/_product-category.css
template/m.yohobuy.com/actions/product/index/category.phtml
static/js/product/product-category.js
View file @
6336830
...
...
@@ -9,7 +9,6 @@ var $allProductCell = $('.allproduct'),
$categoryContainer
=
$
(
'.category-container'
),
$contents
=
$categoryContainer
.
children
(
'.content'
),
$subLevelItem
=
$categoryContainer
.
find
(
'.sub-level li'
),
$primaryItem
=
$categoryContainer
.
find
(
'.primary-level li'
),
$trilangle
=
$categoryContainer
.
find
(
'.primary-level-trilangle'
);
//初始化container高度
...
...
@@ -53,16 +52,15 @@ $categoryContainer.on('touchend', function(e) {
}
});
$categoryContainer
.
find
(
'.primary-level'
).
on
(
'touchstart touchend touchcancel'
,
'li'
,
function
()
{
$primaryItem
.
removeClass
(
'highlight'
);
$categoryContainer
.
find
(
'.sub-level'
).
on
(
'touchstart'
,
'li'
,
function
()
{
$subLevelItem
.
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
'li'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
$categoryContainer
.
find
(
'.sub-level'
).
on
(
'touchstart'
,
'li'
,
function
()
{
$subLevelItem
.
removeClass
(
'highlight'
);
$allProductCell
.
on
(
'touchstart'
,
function
()
{
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
'li'
,
function
()
{
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
\ No newline at end of file
...
...
static/sass/product/_product-category.css
View file @
6336830
...
...
@@ -3,12 +3,14 @@
background-color
:
#fff
;
.allproduct
{
position
:
relative
;
padding
:
0px
30px
;
display
:
block
;
height
:
89px
;
line-height
:
89px
;
background
:
#fff
;
border-top
:
1px
solid
#e6e6e6
;
margin-left
:
30px
;
&.highlight
{
background
:
#dbdbdb
;
}
}
.margin-under-allproduct
{
...
...
@@ -21,11 +23,12 @@
border-top
:
1px
solid
#e6e6e6
;
}
.arrow-icon
{
position
:
absolute
;
position
:
relative
;
float
:
right
;
font-size
:
30px
;
top
:
0px
;
right
:
33px
;
color
:
#e1e1e1
;
padding
:
0px
10px
;
}
.allproductParagaraph
{
...
...
template/m.yohobuy.com/actions/product/index/category.phtml
View file @
6336830
{
{>
layout/header
}
}
<div
class=
"product-category yoho-page"
>
<div
class=
"allproduct"
>
{
{#
content
}
}
<a
href=
{
{allproduct
}
}>
{
{/
content
}
}
全部商品
<i
class=
"arrow-icon iconfont"
>
614
;</i>
{
{#
content
}
}
<a
class=
"allproduct"
href=
"{{allproduct}}"
>
全部商品
<span
class=
"arrow-icon iconfont"
>

614
;
</span>
</a>
</div>
<div
class=
"margin-under-allproduct"
>
</div>
<div
class=
"margin-under-allproduct"
>
</div>
<div
class=
"category-container clearfix"
>
<div
class=
"content"
>
{
{#
content
}
}
<div
class=
"category-container clearfix"
>
<div
class=
"content"
>
<ul
class=
"primary-level"
>
{
{#
class
}
}
<li
class=
"p-level-item"
>
{
{name
}
}
...
...
@@ -37,8 +34,8 @@
</ul>
{
{/
category
}
}
</div>
{
{/
content
}
}
</div>
</div>
</div>
{
{/
content
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment