Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
hf
9 years ago
Commit
ec84ac9f39098c2d4da20c2baae0913ee431f65e
2 parents
2ec7d183
f1070281
Merge remote-tracking branch 'origin/develop'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
27 deletions
static/js/cart/chose-panel.js
static/js/me/dialog.js
static/js/me/order.js
static/js/cart/chose-panel.js
View file @
ec84ac9
...
...
@@ -159,6 +159,7 @@ $yohoPage.on('touchstart', '.chose-panel', function(e) {
$yohoPage
.
on
(
'touchstart'
,
'.color-list .block'
,
function
()
{
var
$this
=
$
(
this
),
index
,
curSizeBlock
,
$preSiblingBlock
,
$curSizeRow
,
numArray
,
...
...
@@ -202,13 +203,14 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 之前选中的尺码去掉勾选样式
if
(
$preSiblingBlock
.
length
>
0
)
{
$preSiblingBlock
.
removeClass
(
'chosed'
);
$curSizeBlock
=
$curSizeRow
.
children
().
get
(
curSizeIndex
);
curSizeBlock
=
$curSizeRow
.
children
().
get
(
curSizeIndex
);
$curSizeBlock
=
$
(
curSizeBlock
);
}
// 当前选中颜色对应的尺码行,其对应的尺码加上勾选样式 (前提是要判断下这个尺码是否存在)
if
(
$curSizeBlock
)
{
curGoodNum
=
$curSizeBlock
.
data
(
'num'
);
$curSizeBlock
.
addClass
(
'chosed'
);
if
(
curSizeBlock
)
{
curGoodNum
=
$
(
curSizeBlock
).
data
(
'num'
);
$
(
curSizeBlock
).
addClass
(
'chosed'
);
//如果当前有尺码被选中,且数量等于0,则颜色块添加数量为0的样式
if
(
curGoodNum
>
0
)
{
...
...
static/js/me/dialog.js
View file @
ec84ac9
...
...
@@ -99,3 +99,7 @@ exports.showDialog = function(data, callback, callbackForLeft) {
event
.
srcEvent
.
stopPropagation
();
});
};
exports
.
hideDialog
=
function
()
{
$
(
'.dialog-wrapper'
).
remove
();
};
...
...
static/js/me/order.js
View file @
ec84ac9
...
...
@@ -6,7 +6,8 @@
var
$
=
require
(
'jquery'
),
Hammer
=
require
(
'yoho.hammer'
),
lazyLoad
=
require
(
'yoho.lazyload'
);
lazyLoad
=
require
(
'yoho.lazyload'
),
tip
=
require
(
'../plugin/tip'
);
var
$navLi
=
$
(
'#order-nav > li'
),
$orderContainer
=
$
(
'#order-container'
);
...
...
@@ -132,23 +133,18 @@ orderHammer.on('tap', function(e) {
id
:
id
},
success
:
function
(
data
)
{
dialog
.
hideDialog
();
if
(
data
.
message
)
{
tip
.
show
(
data
.
message
);
}
if
(
data
.
code
===
200
)
{
dialog
.
showDialog
({
dialogText
:
'删除订单成功'
,
autoHide
:
true
,
fast
:
true
});
//删除订单页面刷新
history
.
go
(
0
);
window
.
location
.
reload
(
);
}
},
error
:
function
()
{
dialog
.
showDialog
({
dialogText
:
'删除订单失败'
,
autoHide
:
true
,
fast
:
true
});
tip
.
show
(
'取消订单失败'
);
}
});
});
...
...
@@ -169,23 +165,17 @@ orderHammer.on('tap', function(e) {
id
:
id
},
success
:
function
(
data
)
{
if
(
data
.
message
)
{
tip
.
show
(
data
.
message
);
}
if
(
data
.
code
===
200
)
{
dialog
.
showDialog
({
dialogText
:
'取消订单成功'
,
autoHide
:
true
,
fast
:
true
});
//取消订单页面刷新
history
.
go
(
0
);
window
.
location
.
reload
(
);
}
},
error
:
function
()
{
dialog
.
showDialog
({
dialogText
:
'取消订单失败'
,
autoHide
:
true
,
fast
:
true
});
tip
.
show
(
'取消订单失败'
);
}
});
});
...
...
Please
register
or
login
to post a comment