Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
68b93947c104c6cc49bb8337ca9ead0dd4b44b50
1 parent
9bbdf2ea
update
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
206 additions
and
54 deletions
framework
script/nginx/logs/nginx.pid
static/js/common.js
static/js/home/home.js
static/js/home/maybe-like.js
static/js/index/footer.js
static/js/index/index.js
static/js/passport/back/new-password.js
static/js/product/newsale/discount.js
static/js/product/newsale/newarrival.js
static/sass/index/_footer.scss
static/sass/index/_index.scss
static/sass/layout/_footer.scss
template/m.yohobuy.com/actions/index/boys/index.phtml
template/m.yohobuy.com/actions/index/girls/index.phtml
template/m.yohobuy.com/actions/index/index/index.phtml
template/m.yohobuy.com/actions/index/kids/index.phtml
template/m.yohobuy.com/actions/index/lifestyle/index.phtml
template/m.yohobuy.com/actions/product/newsale/new.phtml
template/m.yohobuy.com/partials/layout/download_app.phtml
template/m.yohobuy.com/partials/layout/page_footer.phtml
template/m.yohobuy.com/partials/layout/use.phtml
framework
@
119c247f
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit
119c247f5cf929aa1e059e40609bb16dd6b58f05
...
...
script/nginx/logs/nginx.pid
View file @
68b9394
4124
15516
...
...
static/js/common.js
View file @
68b9394
...
...
@@ -22,6 +22,37 @@ function cookie(name) {
return
cookieVal
;
}
function
setCookie
(
name
,
value
,
options
)
{
var
expires
=
''
,
path
,
domain
,
secure
,
date
;
if
(
typeof
value
!==
'undefined'
)
{
options
=
options
||
{};
if
(
value
===
null
)
{
value
=
''
;
options
.
expires
=
-
1
;
}
if
(
options
.
expires
&&
(
typeof
options
.
expires
===
'number'
||
options
.
expires
.
toUTCString
))
{
if
(
typeof
options
.
expires
===
'number'
)
{
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
(
options
.
expires
*
24
*
60
*
60
*
1000
));
}
else
{
date
=
options
.
expires
;
}
expires
=
'; expires='
+
date
.
toUTCString
();
}
path
=
options
.
path
?
'; path='
+
options
.
path
:
''
;
domain
=
options
.
domain
?
'; domain='
+
options
.
domain
:
''
;
secure
=
options
.
secure
?
'; secure'
:
''
;
document
.
cookie
=
[
name
,
'='
,
encodeURIComponent
(
value
),
expires
,
path
,
domain
,
secure
].
join
(
''
);
}
}
function
getUser
()
{
var
c
=
cookie
(
'_UID'
),
user
;
...
...
@@ -60,7 +91,7 @@ function getShoppingKey() {
}
//页面通用底部位置及status设置
(
function
()
{
(
function
()
{
var
$footer
=
$
(
'#yoho-footer'
),
$op
=
$footer
.
children
(
'.op-row'
);
...
...
@@ -94,8 +125,10 @@ function getShoppingKey() {
//暴露公共接口
window
.
cookie
=
cookie
;
window
.
setCookie
=
setCookie
;
window
.
getUser
=
getUser
;
window
.
getUid
=
getUid
;
window
.
getShoppingKey
=
getShoppingKey
;
\ No newline at end of file
window
.
getShoppingKey
=
getShoppingKey
;
...
...
static/js/home/home.js
View file @
68b9394
...
...
@@ -28,7 +28,7 @@ lazyLoad($('img.lazy'));
//$('img:in-viewport').trigger('appear');
//点击首页汉堡menu图标,滑出侧栏导航
$
(
'.nav-btn'
).
on
(
'
click
'
,
function
(
event
)
{
$
(
'.nav-btn'
).
on
(
'
tap
'
,
function
(
event
)
{
if
(
!
$
(
this
).
hasClass
(
'menu-open'
))
{
$
(
'.mobile-wrap'
).
addClass
(
'menu-open'
);
$
(
'.overlay'
).
addClass
(
'show'
);
...
...
@@ -45,7 +45,7 @@ $('.nav-btn').on('click', function (event) {
});
//点击页面主体,收起侧栏导航及二级导航
$
(
'.mobile-wrap'
).
on
(
'
click
'
,
function
()
{
$
(
'.mobile-wrap'
).
on
(
'
tap
'
,
function
()
{
if
(
$
(
this
).
hasClass
(
'menu-open'
))
{
$
(
'.mobile-wrap'
).
removeClass
(
'menu-open'
);
$
(
'.overlay'
).
removeClass
(
'show'
);
...
...
@@ -59,7 +59,7 @@ $('.mobile-wrap').on('click', function () {
});
//点击一级导航,弹出二级导航
$
(
'.side-nav'
).
on
(
'
click
'
,
'li'
,
function
()
{
$
(
'.side-nav'
).
on
(
'
tap
'
,
'li'
,
function
()
{
if
(
$
(
this
).
find
(
'.sub-nav'
).
size
()
>
0
)
{
$
(
'.sub-nav'
).
removeClass
(
'show'
);
$
(
this
).
find
(
'.sub-nav'
).
addClass
(
'show'
);
...
...
@@ -68,7 +68,7 @@ $('.side-nav').on('click', 'li', function () {
//返回一级导航,收起二级导航
$
(
'.sub-nav'
).
each
(
function
()
{
$
(
this
).
find
(
'li'
).
eq
(
0
).
on
(
'
click
'
,
function
(
e
)
{
$
(
this
).
find
(
'li'
).
eq
(
0
).
on
(
'
tap
'
,
function
(
e
)
{
$
(
'.sub-nav'
).
removeClass
(
'show'
);
e
.
stopPropagation
();
});
...
...
@@ -84,6 +84,7 @@ $('.sub-nav').on('mouseenter', 'li', function () {
//头部banner轮播
if
(
$
(
'.banner-swiper'
).
find
(
'li'
).
size
()
>
1
)
{
bannerSwiper
=
new
Swiper
(
'.banner-swiper'
,
{
lazyLoading
:
true
,
loop
:
true
,
autoplay
:
3000
,
autoplayDisableOnInteraction
:
false
,
...
...
@@ -137,15 +138,8 @@ $('.category-swiper').each(function (i, index) {
}
});
//回到顶部
// $('.back-to-top').bind('touchstart', function (e) {
// e.preventDefault();
// $(window).scrollTop(0);
// });
//关闭头部下载浮层
$
(
'.header-download'
).
on
(
'
click
'
,
'.close-btn'
,
function
()
{
$
(
'.header-download'
).
on
(
'
tap
'
,
'.close-btn'
,
function
()
{
$
(
this
).
parent
().
remove
();
});
...
...
static/js/home/maybe-like.js
View file @
68b9394
...
...
@@ -34,7 +34,7 @@ if (kidsType) {
$curNav
=
$navList
.
children
(
'.focus'
);
$
(
'#maybe-like-nav'
).
delegate
(
'li'
,
't
ouchstart
'
,
function
()
{
$
(
'#maybe-like-nav'
).
delegate
(
'li'
,
't
ap
'
,
function
()
{
var
$this
=
$
(
this
),
$goods
=
$
(
'.goods-list'
),
$content
;
...
...
static/js/index/footer.js
0 → 100644
View file @
68b9394
/**
* 底部JS
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/26
*/
var
$
=
require
(
'yoho.zepto'
);
function
downLoadApp
()
{
var
appUrl
=
'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445'
;
var
clickedAt
=
new
Date
();
setTimeout
(
function
()
{
if
((
new
Date
())
-
clickedAt
<
2000
)
{
window
.
location
=
appUrl
;
}
},
500
);
}
$
(
'#float-layer-close'
).
bind
(
'tap'
,
function
()
{
$
(
'#float-layer-app'
).
hide
();
window
.
setCookie
(
'_float-layer-app'
,
'id490655927'
,
{
domain
:
'.yohobuy.com'
});
window
.
setCookie
(
'_float-layer-app-close'
,
1
,
{
domain
:
'.yohobuy.com'
,
expires
:
1
});
});
$
(
'#float-layer-btn'
).
tap
(
function
()
{
downLoadApp
(
'bottom'
);
});
if
(
!
window
.
cookie
(
'_float-layer-app'
))
{
$
(
'#float-layer-app'
).
show
();
}
else
{
$
(
'#float-layer-app'
).
hide
();
}
...
...
static/js/index/index.js
View file @
68b9394
...
...
@@ -5,4 +5,5 @@
*/
require
(
'./search'
);
require
(
'./channel'
);
\ No newline at end of file
require
(
'./channel'
);
require
(
'./footer'
);
\ No newline at end of file
...
...
static/js/passport/back/new-password.js
View file @
68b9394
...
...
@@ -26,7 +26,7 @@ $pwd.bind('input', function() {
}
});
$btnOk
.
on
(
't
ouchstart
'
,
function
()
{
$btnOk
.
on
(
't
ap
'
,
function
()
{
var
pwd
=
trim
(
$pwd
.
val
()),
mobileBack
=
true
,
setting
,
...
...
static/js/product/newsale/discount.js
View file @
68b9394
...
...
@@ -59,6 +59,10 @@ var $listNav = $('#list-nav'),
if
(
$
(
'.swiper-container .swiper-slide'
).
length
>
1
)
{
swiper
=
new
Swiper
(
'.swiper-container'
,
{
lazyLoading
:
true
,
loop
:
true
,
autoplay
:
3000
,
autoplayDisableOnInteraction
:
false
,
paginationClickable
:
true
,
pagination
:
'.swiper-pagination'
});
}
...
...
@@ -216,7 +220,7 @@ filter.registerCbFn(search);
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav
.
delegate
(
'li'
,
't
ouchstart
'
,
function
()
{
$listNav
.
delegate
(
'li'
,
't
ap
'
,
function
()
{
var
$this
=
$
(
this
),
nav
,
navType
,
...
...
static/js/product/newsale/newarrival.js
View file @
68b9394
...
...
@@ -33,6 +33,10 @@ var defaultOpt = {
p_d
:
$
(
'#p_d'
).
val
()
};
var
now
=
new
Date
(),
month
=
now
.
getMonth
()
+
1
,
date
=
now
.
getDate
();
var
$listNav
=
$
(
'#list-nav'
),
//导航数据信息
...
...
@@ -59,9 +63,15 @@ var $listNav = $('#list-nav'),
$pgc
.
addClass
(
'hide'
);
$dgc
.
addClass
(
'hide'
);
$
(
'#today a'
).
text
(
month
+
'月'
+
date
+
'号'
);
if
(
$
(
'.swiper-container .swiper-slide'
).
length
>
1
)
{
swiper
=
new
Swiper
(
'.swiper-container'
,
{
lazyLoading
:
true
,
loop
:
true
,
autoplay
:
3000
,
autoplayDisableOnInteraction
:
false
,
paginationClickable
:
true
,
pagination
:
'.swiper-pagination'
});
}
...
...
@@ -237,7 +247,7 @@ filter.registerCbFn(search);
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav
.
delegate
(
'li'
,
't
ouchstart
'
,
function
()
{
$listNav
.
delegate
(
'li'
,
't
ap
'
,
function
()
{
var
$this
=
$
(
this
),
nav
,
navType
,
...
...
@@ -273,7 +283,7 @@ $listNav.delegate('li', 'touchstart', function() {
nav
=
navInfo
[
navType
];
if
(
!
(
$this
.
hasClass
(
'active'
)))
{
$active
=
$this
.
siblings
(
'.active'
);
$pre
=
$this
;
//$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项
...
...
static/sass/index/_footer.scss
0 → 100644
View file @
68b9394
.float-layer
{
height
:
44px
;
background
:
rgba
(
68
,
68
,
68
,
0
.95
);
position
:
fixed
;
width
:
100%
;
bottom
:
0
;
left
:
0
;
z-index
:
9999
;
padding
:
10px
0
;
.float-layer-left
{
padding-left
:
22px
;
overflow
:
hidden
;
float
:
left
;
img
{
height
:
44px
;
float
:
left
;
margin-right
:
10px
;
}
p
{
float
:
left
;
font-size
:
16px
;
height
:
44px
;
line-height
:
44px
;
color
:
white
;
}
}
}
#float-layer-close
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
50px
;
height
:
50px
;
}
#float-layer-btn
{
position
:
absolute
;
top
:
50%
;
right
:
15px
;
font-size
:
16px
;
padding
:
0
10px
;
height
:
27px
;
line-height
:
27px
;
background
:
white
;
border-radius
:
5px
;
margin-top
:
-13px
;
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
\ No newline at end of file
...
...
static/sass/index/_index.scss
View file @
68b9394
...
...
@@ -39,5 +39,5 @@
}
@import
"search"
;
@import
"search"
,
"footer"
;
...
...
static/sass/layout/_footer.scss
View file @
68b9394
...
...
@@ -38,4 +38,5 @@
width
:
100%
;
bottom
:
0
;
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/boys/index.phtml
View file @
68b9394
{
{>
layout/header
}
}
<div
class=
"mobile-wrap boys-wrap yoho-page"
>
{
{#
headerDownload
}
}
{
{>
home/header_download
}
}
{
{/
headerDownload
}
}
{
{!
首页header
}
}
{
{#
homeHeader
}
}
{
{>
home/home_header
}
}
...
...
@@ -20,4 +15,5 @@
<div
class=
"overlay"
></div>
</div>
{
{>
home/side_nav
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
{
{>
layout/download_app
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/girls/index.phtml
View file @
68b9394
{
{>
layout/header
}
}
<div
class=
"mobile-wrap girls-wrap yoho-page"
>
{
{#
headerDownload
}
}
{
{>
home/header_download
}
}
{
{/
headerDownload
}
}
{
{!
首页header
}
}
{
{!
首页header
}
}
{
{#
homeHeader
}
}
{
{>
home/home_header
}
}
{
{/
homeHeader
}
}
...
...
@@ -14,5 +9,6 @@
<div
class=
"overlay"
></div>
</div>
{
{>
home/side_nav
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
home/side_nav
}
}
{
{>
layout/footer
}
}
{
{>
layout/download_app
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/index/index.phtml
View file @
68b9394
...
...
@@ -16,4 +16,5 @@
</div>
</div>
{
{>layout/footer
}
}
\ No newline at end of file
{
{>layout/footer
}
}
{
{>
layout/download_app
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/kids/index.phtml
View file @
68b9394
{
{>
layout/header
}
}
<div
class=
"mobile-wrap kids-wrap yoho-page"
>
{
{!
app下载
}
}
{
{#
headerDownload
}
}
{
{>
home/header_download
}
}
{
{/
headerDownload
}
}
{
{!
首页header
}
}
{
{#
homeHeader
}
}
{
{>
home/home_header
}
}
...
...
@@ -26,4 +21,5 @@
<div
class=
"overlay"
></div>
</div>
{
{>
home/side_nav
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
{
{>
layout/download_app
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/lifestyle/index.phtml
View file @
68b9394
{
{>
layout/header
}
}
<div
class=
"mobile-wrap lifestyle-wrap yoho-page"
>
{
{!
app下载
}
}
{
{#
headerDownload
}
}
{
{>
home/header_download
}
}
{
{/
headerDownload
}
}
{
{!
首页header
}
}
{
{#
homeHeader
}
}
{
{>
home/home_header
}
}
...
...
@@ -24,4 +19,5 @@
<div
class=
"overlay"
></div>
</div>
{
{>
home/side_nav
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
{
{>
layout/download_app
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/product/newsale/new.phtml
View file @
68b9394
...
...
@@ -5,9 +5,8 @@
{
{/
headerBanner
}
}
<ul
id=
"list-nav"
class=
"list-nav clearfix"
>
<li
class=
"today active"
>
<a
href=
"javascript:void(0);"
>
10
月
26
号
<li
id=
"today"
class=
"today active"
>
<a
href=
"javascript:void(0);"
>
</a>
</li>
<li
class=
"week"
>
...
...
template/m.yohobuy.com/partials/layout/download_app.phtml
0 → 100644
View file @
68b9394
{
{#showDownloadApp
}
}
<div
class=
"float-layer hide"
id=
"float-layer-app"
>
<div
class=
"float-layer-left"
>
<img
src=
"http://static.yohobuy.com/m/v1/img/yohobuy_new.png"
alt=
""
>
<p>新用户首单减
10
元</p>
</div>
<a
href=
"javascript:void(0);"
id=
"float-layer-close"
>
<img
src=
"http://static.yohobuy.com/m/v1/img/close_new.png"
width=
"22"
>
</a>
<a
href=
"http://m.yohobuy.com/download/hyapp"
id=
"float-layer-btn"
>
立即下载
</a>
</div>
{
{/showDownloadApp
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/page_footer.phtml
View file @
68b9394
...
...
@@ -10,4 +10,6 @@
CopyRight©
2007-2016
南京新与力文化传播有限公司
</address>
</footer>
{
{/pageFooter
}
}
\ No newline at end of file
{
{/pageFooter
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
68b9394
...
...
@@ -85,25 +85,36 @@
</script>
{{/if}}
{{!-- 频道选择页 --}}
{{#if channelPage}}
<script>
seajs.use('js/index/footer');
</script>
{{/if}}
{{!-- 首页 --}}
{{#if grilsHomePage}}
<script>
seajs.use('js/home/home');
seajs.use('js/index/footer');
</script>
{{/if}}
{{#if boysHomePage}}
<script>
seajs.use('js/home/home');
seajs.use('js/index/footer');
</script>
{{/if}}
{{#if kidsHomePage}}
<script>
seajs.use('js/home/home');
seajs.use('js/index/footer');
</script>
{{/if}}
{{#if lifestyleHomePage}}
<script>
seajs.use('js/home/home');
seajs.use('js/index/footer');
</script>
{{/if}}
...
...
Please
register
or
login
to post a comment