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
889942d930e6aeb197394a513672908639b4584e
1 parent
878b8020
购物车修改
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
static/js/cart/cart.js
static/js/cart/good.js
static/js/cart/cart.js
View file @
889942d
...
...
@@ -26,6 +26,8 @@ lazyLoad($('img.lazy'));
if
(
'advance'
===
cartType
)
{
$cartContent
.
toggleClass
(
'hide'
);
$
(
'presell-cart-nav'
).
addClass
(
'active'
);
$
(
'common-cart-nav'
).
removeClass
(
'active'
);
}
if
(
$
(
'.cart-nav'
).
length
>
0
)
{
...
...
@@ -39,8 +41,10 @@ if ($('.cart-nav').length > 0) {
if
(
cartType
===
'ordinary'
)
{
cartType
=
'advance'
;
$
(
'#cartType'
).
val
(
'advance'
);
}
else
{
cartType
=
'ordinary'
;
$
(
'#cartType'
).
val
(
'ordinary'
);
}
$this
.
siblings
(
'.active'
).
removeClass
(
'active'
);
...
...
static/js/cart/good.js
View file @
889942d
...
...
@@ -14,7 +14,6 @@ var dialog = require('../me/dialog'),
orderInfo
=
require
(
'./order-info'
).
orderInfo
;
var
$selectAllBtn
=
$
(
'.balance .checkbox'
),
cartType
=
$
(
'#cartType'
).
val
(),
requesting
=
false
;
ellipsis
.
init
();
...
...
@@ -43,7 +42,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
var
goodsList
=
[],
goodInfo
=
{};
goodInfo
.
goods_type
=
cartType
;
goodInfo
.
goods_type
=
$
(
'#cartType'
).
val
()
;
goodInfo
.
selected
=
$this
.
hasClass
(
'icon-cb-checked'
)
?
'N'
:
'Y'
;
goodInfo
.
product_sku
=
id
;
goodInfo
.
buy_number
=
$good
.
find
(
'.count'
).
eq
(
0
).
text
().
trim
().
replace
(
'×'
,
''
);
...
...
@@ -62,7 +61,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
}
else
{
$this
.
removeClass
(
'icon-checkbox'
).
addClass
(
'icon-cb-checked'
);
}
window
.
history
.
go
(
0
);
window
.
location
.
href
=
'/cart/index/index?cartType='
+
$
(
'#cartType'
).
val
(
);
}
else
if
(
data
.
code
===
400
)
{
tip
.
show
(
'网络异常'
);
}
...
...
@@ -186,7 +185,7 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
//全选按钮点击事件
$selectAllBtn
.
on
(
'touchend'
,
function
()
{
bottomCheckBoxHandeler
(
$
(
this
).
hasClass
(
'icon-cb-checked'
),
cartType
,
didUpdateAllGoodsCheckStatus
);
bottomCheckBoxHandeler
(
$
(
this
).
hasClass
(
'icon-cb-checked'
),
$
(
'#cartType'
).
val
()
,
didUpdateAllGoodsCheckStatus
);
});
$
(
'.down'
).
on
(
'touchend'
,
function
()
{
...
...
Please
register
or
login
to post a comment