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
a462cce9795fa21ab9273c59efcf3f549b13e060
1 parent
ed79510e
限购商品详情 跳转APP
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
static/js/product/detail/detail.js
static/js/product/detail/detail.js
View file @
a462cce
...
...
@@ -82,20 +82,41 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) {
});
}
limitSaleHammer
&&
limitSaleHammer
.
on
(
'tap'
,
function
(
e
)
{
var
loginUrl
=
$
(
'#loginUrl'
).
val
();
$
(
'#limit-sale'
).
on
(
'touchend'
,
function
(
e
)
{
var
loginUrl
=
$
(
'#loginUrl'
).
val
(),
u
=
navigator
.
userAgent
,
ifr
;
var
isAndroid
=
u
.
indexOf
(
'Android'
)
>
-
1
||
u
.
indexOf
(
'Linux'
)
>
-
1
,
isIPhone
=
u
.
indexOf
(
'iPhone'
)
>
-
1
,
isIPad
=
u
.
indexOf
(
'iPad'
)
>
-
1
;
e
.
stopPropagation
();
e
.
srcEvent
.
stopPropagation
();
if
(
loginUrl
)
{
window
.
location
=
loginUrl
;
}
else
{
dialog
.
showDialog
({
dialogText
:
'
打开有货APP限定发售频道\n
获取限购码'
,
dialogText
:
'
进入有货APP,
获取限购码'
,
hasFooter
:
{
rightBtnText
:
'打开Yoho!Buy有货APP'
}
},
function
()
{
window
.
location
.
href
=
appUrl
;
ifr
=
document
.
createElement
(
'iframe'
);
ifr
.
src
=
appUrl
;
ifr
.
style
.
display
=
'none'
;
document
.
body
.
appendChild
(
ifr
);
window
.
location
.
href
=
appUrl
;
window
.
setTimeout
(
function
(){
document
.
body
.
removeChild
(
ifr
);
if
(
isAndroid
)
{
window
.
location
.
href
=
'http://yoho-apps.qiniudn.com/YohoBuy_YOHO.apk'
;
}
else
if
(
isIPhone
||
isIPad
)
{
window
.
location
.
href
=
'https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8'
;
}
},
3000
)
},
undefined
,
true
);
$
(
'.dialog-wrapper'
).
off
(
'touchstart'
).
on
(
'touchstart'
,
function
(
e
)
{
...
...
Please
register
or
login
to post a comment