Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
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
Email Patches
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
2b8893a958c70729d302129aeee63466e767e96c
1 parent
e2463ddf
优化异步接口调用
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
static/js/cart/order-ensure.js
static/js/cart/order-ensure.js
View file @
2b8893a
...
...
@@ -93,8 +93,7 @@ function orderCompute() {
}).
then
(
function
(
res
)
{
var
priceHtml
;
if
(
!
res
)
{
tip
.
show
(
'网络出错'
);
if
(
!
res
.
length
)
{
window
.
location
.
reload
();
}
else
{
/*if (res.order_amount) {
...
...
@@ -120,7 +119,6 @@ function orderCompute() {
$price
.
html
(
priceHtml
);
}
}).
fail
(
function
()
{
tip
.
show
(
'网络出错'
);
window
.
location
.
reload
();
});
}
...
...
@@ -167,7 +165,6 @@ function submitOrder() {
var
url
;
if
(
!
res
)
{
loading
.
hideLoadingMask
();
tip
.
show
(
'网络出错'
);
return
;
}
...
...
@@ -181,13 +178,13 @@ function submitOrder() {
}
window
.
setCookie
(
'order-info'
,
''
);
window
.
location
.
href
=
url
;
}
else
{
loading
.
hideLoadingMask
();
tip
.
show
(
res
.
message
||
'网络出错'
);
}
else
if
(
res
.
message
)
{
tip
.
show
(
res
.
message
);
}
}).
fail
(
function
()
{
loading
.
hideLoadingMask
();
tip
.
show
(
'网络出错'
);
}).
always
(
function
()
{
loading
.
hideLoadingMask
();
});
}
...
...
Please
register
or
login
to post a comment