Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
89231601a0a231964deeaa22fa78c6fe066eccd4
2 parents
eb7e67bc
f36280e7
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
21 deletions
static/js/cart/cart.js
static/js/cart/chose-panel.js
static/js/cart/good.js
static/js/cart/cart.js
View file @
8923160
...
...
@@ -66,7 +66,7 @@ $('.freebie').on('touchend', function() {
$
(
'.btn-balance'
).
on
(
'touchend'
,
function
()
{
if
(
$
(
'.low-stocks'
).
length
>
0
)
{
tip
.
show
(
'
请先删除库存不足商品
'
);
tip
.
show
(
'
库存不足无法结算
'
);
return
false
;
}
...
...
static/js/cart/chose-panel.js
View file @
8923160
...
...
@@ -310,7 +310,6 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
promotionId
,
isEdit
=
0
,
numInCart
=
$
(
'.num-tag'
).
html
()
-
0
,
num
=
parseInt
(
$num
.
val
(),
10
);
//颜色尺码没有选择
...
...
@@ -322,7 +321,6 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
return
;
}
//TODO status change
if
(
$
(
'#chose-btn-sure'
).
html
()
===
'已售罄'
)
{
return
;
...
...
@@ -364,7 +362,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
loading
.
hideLoadingMask
();
if
(
res
.
code
===
200
)
{
cartNum
=
numInCart
+
buyNumber
;
cartNum
=
res
.
data
.
goods_count
;
if
(
cartNum
>
99
)
{
cartNum
=
'99+'
;
}
...
...
static/js/cart/good.js
View file @
8923160
...
...
@@ -27,6 +27,13 @@ $('.shopping-cart-good .name').each(function() {
this
.
mlellipsis
(
2
);
});
function
GoodInfo
(
properties
)
{
this
.
goods_type
=
properties
.
goods_type
;
this
.
buy_number
=
properties
.
buy_number
;
this
.
product_sku
=
properties
.
product_sku
;
this
.
selected
=
properties
.
selected
;
}
//TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods
$
(
'.cart-goods'
).
on
(
'touchstart'
,
'.checkbox'
,
function
()
{
var
$this
=
$
(
this
),
...
...
@@ -43,12 +50,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
isSelected
=
false
;
}
function
GoodInfo
(
properties
)
{
this
.
goods_type
=
properties
.
goods_type
;
this
.
buy_number
=
properties
.
buy_number
;
this
.
product_sku
=
properties
.
product_sku
;
this
.
selected
=
properties
.
selected
;
}
goodInfo
.
goods_type
=
cartType
;
goodInfo
.
selected
=
isSelected
?
'N'
:
'Y'
;
...
...
@@ -174,17 +176,10 @@ function didUpdateAllGoodsCheckStatus() {
}
function
bottomCheckBoxHandeler
(
isSelected
,
type
,
handlerAfterTouch
)
{
var
goodInfo
=
{};
var
$goods
=
$
(
'.cart-content:not(.hide) .shopping-cart-good'
);
var
$good
=
null
;
var
goodsList
=
[];
function
GoodInfo
(
properties
)
{
this
.
goods_type
=
properties
.
goods_type
;
this
.
buy_number
=
properties
.
buy_number
;
this
.
product_sku
=
properties
.
product_sku
;
this
.
selected
=
properties
.
selected
;
}
var
goodInfo
=
{},
$goods
=
$
(
'.cart-content:not(.hide) .shopping-cart-good'
),
$good
=
null
,
goodsList
=
[];
goodInfo
.
goods_type
=
type
;
goodInfo
.
selected
=
isSelected
?
'N'
:
'Y'
;
...
...
Please
register
or
login
to post a comment