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
毕凯
9 years ago
Commit
04c10f08417f168a808b180f9d044860f52e551e
2 parents
3c615929
c3fe56e4
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
24 deletions
static/js/product/recommend-for-you-product-desc.js
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Bind.php
static/js/product/recommend-for-you-product-desc.js
View file @
04c10f0
...
...
@@ -10,28 +10,51 @@ var Swiper = require('yoho.iswiper'),
var
recommendSwiper
,
$recommendForYou
=
$
(
'.recommend-for-you'
),
preferenceUrl
=
$
(
'#preferenceUrl'
).
val
();
if
(
preferenceUrl
)
{
$
.
get
(
preferenceUrl
).
then
(
function
(
html
)
{
if
(
html
.
length
<
5
)
{
$recommendForYou
.
css
(
'display'
,
'none'
);
}
else
{
$recommendForYou
.
html
(
html
).
show
();
if
(
$
(
'#swiper-recommend'
).
length
)
{
recommendSwiper
=
new
Swiper
(
'#swiper-recommend'
,
{
slidesPerView
:
'auto'
,
grabCursor
:
true
,
slideElement
:
'a'
,
lazyLoading
:
true
,
watchSlidesVisibility
:
true
});
preferenceUrl
=
$
(
'#preferenceUrl'
).
val
(),
winH
=
$
(
window
).
height
(),
end
=
false
,
requesting
=
false
;
function
request
()
{
if
(
requesting
||
end
)
{
return
;
}
requesting
=
true
;
if
(
preferenceUrl
)
{
$
.
get
(
preferenceUrl
).
then
(
function
(
html
)
{
if
(
html
.
length
<
5
)
{
$recommendForYou
.
css
(
'display'
,
'none'
);
}
else
{
$recommendForYou
.
html
(
html
).
show
();
if
(
$
(
'#swiper-recommend'
).
length
)
{
recommendSwiper
=
new
Swiper
(
'#swiper-recommend'
,
{
slidesPerView
:
'auto'
,
grabCursor
:
true
,
slideElement
:
'a'
,
lazyLoading
:
true
,
watchSlidesVisibility
:
true
});
}
}
}
window
.
rePosFooter
();
requesting
=
false
;
end
=
true
;
}).
fail
(
function
()
{
$recommendForYou
.
hide
();
});
}).
fail
(
function
()
{
$recommendForYou
.
hide
();
});
}
}
function
scrollHandler
()
{
if
(
!
end
||
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
50
)
{
request
();
}
}
$
(
window
).
scroll
(
function
()
{
window
.
requestAnimationFrame
(
scrollHandler
);
});
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Bind.php
View file @
04c10f0
...
...
@@ -59,7 +59,7 @@ class BindController extends AbstractAction
$phoneNum
=
$this
->
get
(
'phoneNum'
);
$data
=
array
(
'bind
Index
'
=>
true
,
//js标识
'bind
Code
'
=>
true
,
//js标识
'backUrl'
=>
'/'
,
// 返回的URL链接
'showHeaderImg'
=>
true
,
// 控制显示头部图片
'isPassportPage'
=>
true
,
// 模板中模块标识
...
...
@@ -87,7 +87,7 @@ class BindController extends AbstractAction
$nickname
=
$this
->
get
(
'nickname'
);
$areaCode
=
$this
->
get
(
'areaCode'
,
'86'
);
$data
=
array
(
'bind
Index
'
=>
true
,
//js标识
'bind
Pwd
'
=>
true
,
//js标识
'backUrl'
=>
'/'
,
// 返回的URL链接
'showHeaderImg'
=>
true
,
// 控制显示头部图片
'isPassportPage'
=>
true
,
// 模板中模块标识
...
...
@@ -138,7 +138,7 @@ class BindController extends AbstractAction
}
else
{
$data
=
array
(
'code'
=>
$res
[
'code'
],
'message'
=>
$res
[
'message'
],
'data'
=>
$res
[
'data'
]
);
$data
=
array
(
'code'
=>
$res
[
'code'
],
'message'
=>
$res
[
'message'
],
'data'
=>
isset
(
$res
[
'data'
])
?
$res
[
'data'
]
:
''
);
}
}
while
(
false
);
...
...
Please
register
or
login
to post a comment