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
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
bd8887a699b78e731775a78cd51878cd7972cccb
2 parents
df96a6c4
e31b2594
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
23 additions
and
10 deletions
static/js/cart/cart.js
static/js/cart/good.js
static/js/me/fav.js
static/js/cart/cart.js
View file @
bd8887a
...
...
@@ -5,7 +5,6 @@
*/
var
$
=
require
(
'jquery'
),
lazyLoad
=
require
(
'yoho.lazyload'
),
Hammer
=
require
(
'yoho.hammer'
);
var
chosePanel
=
require
(
'./chose-panel'
),
...
...
@@ -40,9 +39,15 @@ function shouldSelectGift() {
}
function
shouldLowStocks
()
{
var
$lowStocks
=
$
(
'.low-stocks'
)
,
var
$lowStocks
,
result
=
false
;
if
(
'ordinary'
===
cartType
)
{
$lowStocks
=
$
(
'.common .low-stocks'
);
}
else
if
(
'advance'
===
cartType
)
{
$lowStocks
=
$
(
'.presell .low-stocks'
);
}
if
(
$lowStocks
.
length
<=
0
)
{
return
result
;
}
...
...
@@ -73,7 +78,7 @@ function showChooseGifDialog() {
require
(
'./good'
);
lazyLoad
(
$
(
'img.lazy'
));
//
lazyLoad($('img.lazy'));
if
(
typeof
window
.
cookie
===
'function'
&&
'y'
===
window
.
cookie
(
'_hasShowCartPresellTip'
))
{
$
(
'#presell-tip'
).
removeClass
(
'show'
).
addClass
(
'hide'
);
...
...
@@ -151,7 +156,7 @@ if ($('.freebie').length > 0) {
$
(
'.btn-balance'
).
on
(
'touchend'
,
function
()
{
if
(
shouldLowStocks
())
{
tip
.
show
(
'
库存不足无法结算
'
);
tip
.
show
(
'
所选商品中含有库存不足的商品
'
);
return
false
;
}
...
...
static/js/cart/good.js
View file @
bd8887a
...
...
@@ -192,13 +192,22 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
//全选按钮点击事件
$selectAllBtn
.
on
(
'touchend'
,
function
()
{
var
isSelect
=
$
(
this
).
hasClass
(
'icon-cb-checked'
);
var
cartType
=
$
(
'#cartType'
).
val
(),
isSelect
=
$
(
this
).
hasClass
(
'icon-cb-checked'
);
if
(
!
isSelect
&&
$
(
'.low-stocks'
).
length
>
0
)
{
tip
.
show
(
'所选商品中含有库存不足的商品'
);
return
false
;
if
(
'ordinary'
===
cartType
)
{
if
(
!
isSelect
&&
$
(
'.common .low-stocks'
).
length
>
0
)
{
tip
.
show
(
'所选商品中含有库存不足的商品'
);
return
false
;
}
}
else
if
(
'advance'
===
cartType
)
{
if
(
!
isSelect
&&
$
(
'.presell .low-stocks'
).
length
>
0
)
{
tip
.
show
(
'所选商品中含有库存不足的商品'
);
return
false
;
}
}
bottomCheckBoxHandeler
(
isSelect
,
$
(
'#cartType'
).
val
(),
didUpdateAllGoodsCheckStatus
);
bottomCheckBoxHandeler
(
isSelect
,
cartType
,
didUpdateAllGoodsCheckStatus
);
});
$
(
'.down'
).
on
(
'touchend'
,
function
()
{
...
...
static/js/me/fav.js
View file @
bd8887a
...
...
@@ -3,7 +3,6 @@
* @author: chenglong<chenglong.wang@yoho.cn>
* @date: 2015/11/12
*/
var
$
=
require
(
'jquery'
),
Hammer
=
require
(
'yoho.hammer'
),
Swiper
=
require
(
'yoho.iswiper'
);
...
...
Please
register
or
login
to post a comment