Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
8de80e6e6e960105e13f2ee6a11d91901ed34551
1 parent
4f45ed26
购物车功能开发
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
static/js/cart/good.js
static/js/cart/good.js
View file @
8de80e6
...
...
@@ -29,6 +29,20 @@ if ($names.length > 0) {
$names
[
0
].
mlellipsis
(
2
);
}
//获取当前购物车类型
function
getCartType
()
{
var
$navItem
=
$
(
'.cart-nav '
).
find
(
'li'
),
type
=
'ordinary'
;
if
(
$navItem
.
eq
(
0
).
hasClass
(
'active'
))
{
type
=
'ordinary'
;
}
else
{
type
=
'advance'
;
}
return
type
;
}
//TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods
$
(
'.cart-goods'
).
on
(
'touchstart'
,
'.checkbox'
,
function
()
{
var
$this
=
$
(
this
),
...
...
@@ -235,19 +249,7 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
requestUpdateAllGoodsCheckStatus
(
goodsList
,
handlerAfterTouch
);
}
//获取当前购物车类型
function
getCartType
()
{
var
$navItem
=
$
(
'.cart-nav '
).
find
(
'li'
),
type
=
'ordinary'
;
if
(
$navItem
.
eq
(
0
).
hasClass
(
'active'
))
{
type
=
'ordinary'
;
}
else
{
type
=
'advance'
;
}
return
type
;
}
//是否要全选
function
willBeSelected
()
{
...
...
Please
register
or
login
to post a comment