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
biao
9 years ago
Commit
2bda7f4d2618c36cf80f7c2cd0ba018655a6e188
1 parent
9153961c
优化限购商品下单体验
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
static/js/cart/chose-panel.js
static/js/cart/chose-panel.js
View file @
2bda7f4
...
...
@@ -473,19 +473,34 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
}
else
if
(
limitProductCode
)
{
$
(
this
).
css
(
'background-color'
,
'#ccc'
).
removeAttr
(
'id'
);
// 当前面板选择的是限购商品
url
=
$
(
'#limitProductPay'
).
val
()
+
'?limitproductcode='
+
limitProductCode
+
'&sku='
+
productSku
+
'&skn='
+
skn
+
'&buy_number='
+
buyNumber
;
removePannel
();
loading
.
showLoadingMask
();
// 调用接口判断商品是否可以购买
$
.
ajax
({
url
:
url
}).
then
(
function
(
res
)
{
// 如果有错,则商品不可购买,执行页面刷新,否则跳到结算页面
res
.
error
?
window
.
location
.
reload
()
:
window
.
location
.
href
=
url
;
if
(
res
.
error
)
{
tip
.
show
(
res
.
message
);
setTimeout
(
function
()
{
location
.
reload
();
},
2000
);
}
else
{
location
.
href
=
url
;
}
}).
fail
(
function
()
{
window
.
location
.
reload
();
tip
.
show
(
'网络异常!'
);
setTimeout
(
function
()
{
location
.
reload
();
},
2000
);
});
return
false
;
...
...
Please
register
or
login
to post a comment