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
xuqi
9 years ago
Commit
f016b50186726fd749108dc8b7d79a5d9a608e5a
1 parent
d03c4f50
order opt confirm
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
24 deletions
static/js/me/order.js
static/js/me/order.js
View file @
f016b50
...
...
@@ -26,6 +26,8 @@ var inAjax = false;
var
loading
=
require
(
'../plugin/loading'
);
var
dialog
=
require
(
'./dialog'
);
var
orderHammer
;
//加载订单
...
...
@@ -110,36 +112,52 @@ orderHammer.on('tap', function(e) {
if
(
$cur
.
closest
(
'.del'
).
length
>
0
)
{
//Order delete
$
.
ajax
({
type
:
'GET'
,
url
:
'/home/delOrder'
,
data
:
{
id
:
id
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
//删除订单页面刷新
location
.
href
=
location
.
href
;
}
dialog
.
showDialog
({
dialogText
:
'确定删除订单吗?'
,
hasFooter
:
{
leftBtnText
:
'取消'
,
rightBtnText
:
'确定'
}
},
function
()
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/home/delOrder'
,
data
:
{
id
:
id
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
//删除订单页面刷新
location
.
href
=
location
.
href
;
}
}
});
});
}
else
if
(
$cur
.
closest
(
'.cancel'
).
length
>
0
)
{
//Order cancel
$
.
ajax
({
type
:
'GET'
,
url
:
'/home/cancelOrder'
,
data
:
{
id
:
id
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
//取消订单页面刷新
location
.
href
=
location
.
href
;
}
dialog
.
showDialog
({
dialogText
:
'确定取消订单吗?'
,
hasFooter
:
{
leftBtnText
:
'取消'
,
rightBtnText
:
'确定'
}
},
function
()
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/home/cancelOrder'
,
data
:
{
id
:
id
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
//取消订单页面刷新
location
.
href
=
location
.
href
;
}
}
});
});
}
else
{
...
...
Please
register
or
login
to post a comment