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
9fc9efafa897d3dd5e3b0847e1dc56b81d61d857
1 parent
560092b0
选颜色尺码时 报库存不足的错误
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
static/js/cart/chose-panel.js
static/js/cart/chose-panel.js
View file @
9fc9efa
...
...
@@ -159,7 +159,6 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) {
$yohoPage
.
on
(
'touchstart'
,
'.color-list .block'
,
function
()
{
var
$this
=
$
(
this
),
index
,
curSizeBlock
,
$preSiblingBlock
,
$curSizeRow
,
numArray
,
...
...
@@ -203,13 +202,13 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 之前选中的尺码去掉勾选样式
if
(
$preSiblingBlock
.
length
>
0
)
{
$preSiblingBlock
.
removeClass
(
'chosed'
);
curSizeBlock
=
$curSizeRow
.
children
().
get
(
curSizeIndex
);
$
curSizeBlock
=
$curSizeRow
.
children
().
get
(
curSizeIndex
);
}
// 当前选中颜色对应的尺码行,其对应的尺码加上勾选样式 (前提是要判断下这个尺码是否存在)
if
(
curSizeBlock
)
{
curGoodNum
=
$
(
curSizeBlock
).
data
(
'num'
);
$
(
curSizeBlock
).
addClass
(
'chosed'
);
if
(
$curSizeBlock
)
{
curGoodNum
=
$curSizeBlock
.
data
(
'num'
);
$curSizeBlock
.
addClass
(
'chosed'
);
//如果当前有尺码被选中,且数量等于0,则颜色块添加数量为0的样式
if
(
curGoodNum
>
0
)
{
...
...
Please
register
or
login
to post a comment