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
3676e6ff2846b59be409a3c4a557addf1ff55e82
1 parent
799eb9bc
修改颜色和尺码选
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
static/js/cart/chose-panel.js
static/js/cart/chose-panel.js
View file @
3676e6f
...
...
@@ -137,8 +137,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
curSizeBlock
,
curGoodNum
;
var
$siblingBlock
=
$this
.
closest
(
'.block-list'
).
siblings
(
':first'
);
$this
.
siblings
(
'.chosed'
).
removeClass
(
'chosed'
);
index
=
$this
.
index
();
...
...
@@ -150,16 +148,13 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
$leftNum
.
val
(
0
);
hasChooseColor
=
false
;
//if (!hasChooseSize) {
//当前尺码行隐藏
$sizeRowList
.
eq
(
curSizeIndex
).
removeClass
(
'show'
).
addClass
(
'hide'
);
//当前尺码行隐藏
$sizeRowList
.
eq
(
curSizeIndex
).
removeClass
(
'show'
).
addClass
(
'hide'
);
//目标尺码行显示
$sizeRowList
.
eq
(
0
).
removeClass
(
'hide'
).
addClass
(
'show'
);
//目标尺码行显示
$sizeRowList
.
eq
(
0
).
removeClass
(
'hide'
).
addClass
(
'show'
);
curSizeIndex
=
0
;
//}
curSizeIndex
=
0
;
//如果尺码已经是选择状态
if
(
curColorIndex
)
{
...
...
@@ -184,6 +179,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 之前选中的尺码去掉勾选样式,新尺码块勾选
if
(
$curSizeBlock
&&
$curSizeBlock
.
length
>
0
)
{
$curSizeBlock
.
removeClass
(
'chosed'
);
//curSizeBlock = $sizeRowList.eq(curSizeIndex + 1).children().get(curColorIndex - 1);
curSizeBlock
=
$sizeRowList
.
eq
(
index
+
1
).
children
().
get
(
curColorIndex
-
1
);
$curSizeBlock
=
$
(
curSizeBlock
);
...
...
@@ -233,8 +229,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
curColorBlock
,
curGoodNum
;
var
$siblingBlock
=
$this
.
closest
(
'.block-list'
).
siblings
(
':first'
);
$this
.
siblings
(
'.chosed'
).
removeClass
(
'chosed'
);
index
=
$this
.
index
();
...
...
@@ -246,16 +240,13 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
$leftNum
.
val
(
0
);
hasChooseSize
=
false
;
//if (!hasChooseColor) {
//当前颜色行隐藏
$colorRowList
.
eq
(
curColorIndex
).
removeClass
(
'show'
).
addClass
(
'hide'
);
//当前颜色行隐藏
$colorRowList
.
eq
(
curColorIndex
).
removeClass
(
'show'
).
addClass
(
'hide'
);
//目标颜色行显示
$colorRowList
.
eq
(
0
).
removeClass
(
'hide'
).
addClass
(
'show'
);
//目标颜色行显示
$colorRowList
.
eq
(
0
).
removeClass
(
'hide'
).
addClass
(
'show'
);
curColorIndex
=
0
;
//}
curColorIndex
=
0
;
//如果颜色已经是选择状态
if
(
curSizeIndex
)
{
...
...
@@ -280,6 +271,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 之前选中的颜色去掉勾选样式,新颜色块勾选
if
(
$curColorBlock
&&
$curColorBlock
.
length
>
0
)
{
$curColorBlock
.
removeClass
(
'chosed'
);
//curColorBlock = $colorRowList.eq(curColorIndex + 1).children().get(curSizeIndex - 1);
curColorBlock
=
$colorRowList
.
eq
(
index
+
1
).
children
().
get
(
curSizeIndex
-
1
);
$curColorBlock
=
$
(
curColorBlock
);
...
...
@@ -294,7 +286,6 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
}
else
{
$allChoseItems
.
find
(
'.num .left-num'
).
html
(
'剩余'
+
curGoodNum
+
'件'
);
}
$leftNum
.
val
(
curGoodNum
);
//数量小于0
...
...
Please
register
or
login
to post a comment