Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
htoooth
8 years ago
Commit
6aa214d4f9b075bf87445064bfa87cb094548332
2 parents
d9d06846
ed678b23
Merge branch 'feature/new-product-detail' into release/5.3.1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
20 deletions
public/js/product/detail.page.js
public/scss/product/_detail.css
public/js/product/detail.page.js
View file @
6aa214d
...
...
@@ -381,7 +381,7 @@ bindEvent.add(function() {
// 是否能:量贩购买,量贩小于库存才能购买
function
canBundleBuy
()
{
return
goodsBaseNum
<
maxStock
;
return
goodsBaseNum
<
=
maxStock
;
}
// 重置Num显示为最小购买数
...
...
@@ -462,14 +462,11 @@ bindEvent.add(function() {
// 尺码选中的状态
if
(
maxStock
!==
-
1
)
{
console
.
log
(
maxStock
);
if
(
canBundleBuy
())
{
console
.
log
(
1
);
$itemBuy
.
removeClass
(
'hide'
);
$soldOut
.
addClass
(
'hide'
);
cartEvent
.
emit
(
'
gocart
'
);
cartEvent
.
emit
(
'
selling
'
);
}
else
{
console
.
log
(
2
);
$itemBuy
.
addClass
(
'hide'
);
$soldOut
.
removeClass
(
'hide'
);
cartEvent
.
emit
(
'sellout'
);
...
...
@@ -489,12 +486,7 @@ bindEvent.add(function() {
// 包括默认的-1情况下
$itemBuy
.
removeClass
(
'hide'
);
$soldOut
.
addClass
(
'hide'
);
if
(
maxStock
===
-
1
)
{
cartEvent
.
emit
(
'selling'
);
}
else
{
cartEvent
.
emit
(
'gocart'
);
}
cartEvent
.
emit
(
'selling'
);
}
}
...
...
@@ -833,7 +825,9 @@ bindEvent.add(function() {
PRD_SKU
:
getSku
()
});
addCart
();
addCart
().
then
(
function
()
{
cartEvent
.
emit
(
'gocart'
);
});
});
// 收藏
...
...
@@ -999,9 +993,10 @@ bindEvent.add(function() {
}
if
(
hasOnlyOneSize
)
{
$maxColor
=
$
(
'.colors .focus'
).
eq
(
0
);
$sizes
.
eq
(
$
(
'.colors .focus'
).
index
()).
find
(
'li'
).
click
();
}
$maxColor
=
$
(
'.colors .focus'
).
eq
(
0
);
}());
yasAtHead
.
yasHead
();
...
...
@@ -1187,8 +1182,6 @@ function loadComment() {
});
// 评论类型的切换
$
(
'.comments'
).
on
(
'click'
,
'.comment-tabs h2[data-comment-type]'
,
function
()
{
...
...
@@ -1873,10 +1866,7 @@ $('.shoppingCar-btn').on('click', function() {
}
if
(
$this
.
data
(
'gocart'
)
===
1
)
{
addCart
().
then
(
function
()
{
window
.
jumpUrl
(
$
(
'#go-to-cart-url'
).
attr
(
'href'
));
});
window
.
jumpUrl
(
$
(
'#go-to-cart-url'
).
attr
(
'href'
));
return
;
}
...
...
public/scss/product/_detail.css
View file @
6aa214d
...
...
@@ -2325,7 +2325,6 @@
.title
{
display
:
inline-block
;
font-weight
:
bold
;
cursor
:
pointer
;
font-size
:
14px
;
margin-left
:
auto
;
margin-right
:
auto
;
...
...
Please
register
or
login
to post a comment