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
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
e13c05490866d9431efb5f85b82056e55d4153be
2 parents
481bf2da
92917887
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
164 additions
and
95 deletions
framework
static/js/home/maybe-like.js
static/js/product/newsale/newarrival.js
template/m.yohobuy.com/actions/index/girls/index.phtml
template/m.yohobuy.com/actions/product/newsale/new.phtml
template/m.yohobuy.com/actions/product/newsale/sale.phtml
template/m.yohobuy.com/partials/home/content.phtml
template/m.yohobuy.com/partials/home/maybe_like.phtml
template/m.yohobuy.com/partials/layout/use.phtml
yohobuy/m.yohobuy.com/application/controllers/Girls.php
framework
@
119c247f
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit
119c247f5cf929aa1e059e40609bb16dd6b58f05
...
...
static/js/home/maybe-like.js
View file @
e13c054
...
...
@@ -15,36 +15,52 @@ var winH = $(window).height(),
end
=
false
,
page
=
0
,
gender
=
$
(
'.mobile-wrap'
).
hasClass
(
'boys-wrap'
)
?
'1,3'
:
'2,3'
,
kidsType
=
$
(
'.mobile-wrap'
).
hasClass
(
'kids-wrap'
)
?
true
:
false
,
num
,
url
,
res
;
///recom/maylikekids
if
(
kidsType
){
url
=
'/product/recom/maylikekids'
;
}
else
{
url
=
'/product/recom/maylike?gender='
+
gender
;
}
//srcoll to load more
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
loadMoreH
)
{
if
(
loading
)
{
return
;
}
loading
=
true
;
num
=
$goodList
.
children
(
'.good-info'
).
length
;
$
.
ajax
({
type
:
'GET'
,
url
:
'/product/recom/maylike?gender='
+
gender
,
url
:
url
,
data
:
{
page
:
page
+
1
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
if
(
data
===
' '
)
{
//opt.end = true;
loading
=
false
;
if
(
res
.
end
)
{
end
=
res
.
end
;
}
$loading
.
addClass
(
'hide'
);
$noMore
.
removeClass
(
'hide'
);
$goodList
.
append
(
res
.
product
);
return
;
}
$goodList
.
append
(
data
);
//lazyLoad
lazyLoad
(
$goodList
.
children
(
'.good-info:gt('
+
(
num
-
1
)
+
')'
).
find
(
'img.lazy'
));
//lazyLoad
//lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy'));
lazyLoad
(
$
(
'.good-info'
).
find
(
'img.lazy'
));
loading
=
false
;
page
++
;
}
loading
=
false
;
page
++
;
},
error
:
function
()
{
tip
.
show
(
'网络断开连接了~'
);
...
...
static/js/product/newsale/newarrival.js
View file @
e13c054
...
...
@@ -7,6 +7,17 @@ var $curNav,
$newArrivalList
=
$
(
'#newarrival-goods-list'
),
$goods
=
$newArrivalList
.
children
(
'.goods-list'
);
var
winH
=
$
(
window
).
height
(),
loadMoreH
=
$
(
'#load-more'
).
height
(),
$goodList
=
$
(
'.goods-list'
),
loading
=
false
,
end
=
false
,
page
=
0
,
index
=
0
,
num
,
url
,
res
;
var
swiper
;
swiper
=
new
Swiper
(
'.swiper-container'
,
{
...
...
@@ -19,8 +30,8 @@ $curNav = $navList.children('.focus');
$
(
'#newarrival-nav'
).
delegate
(
'li'
,
'touchstart'
,
function
()
{
var
$this
=
$
(
this
),
$content
,
index
;
$content
;
if
(
$this
.
hasClass
(
'focus'
))
{
return
;
...
...
@@ -38,4 +49,46 @@ $('#newarrival-nav').delegate('li', 'touchstart', function() {
$curNav
=
$this
;
$
(
document
).
trigger
(
'scroll'
);
//Trigger lazyLoad
});
//srcoll to load more
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
loadMoreH
)
{
if
(
loading
)
{
return
;
}
loading
=
true
;
num
=
$goodList
.
children
(
'.good-info'
).
length
;
$
.
ajax
({
type
:
'GET'
,
url
:
'/product/newsale/selectNewSale?dayLimit'
+
(
index
+
1
),
data
:
{
page
:
page
+
1
},
success
:
function
(
data
)
{
if
(
data
===
' '
)
{
//opt.end = true;
loading
=
false
;
$loading
.
addClass
(
'hide'
);
$noMore
.
removeClass
(
'hide'
);
return
;
}
$goodList
.
append
(
data
);
//lazyLoad
//lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy'));
lazyLoad
(
$
(
'.good-info'
).
find
(
'img.lazy'
));
loading
=
false
;
page
++
;
},
error
:
function
()
{
tip
.
show
(
'网络断开连接了~'
);
loading
=
false
;
}
});
}
});
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/girls/index.phtml
View file @
e13c054
...
...
@@ -12,10 +12,6 @@
{
{>
home/content
}
}
{
{!
可能喜欢
}
}
{
{#
maybeLike
}
}
{
{>
home/maybe_like
}
}
{
{/
maybeLike
}
}
<div
class=
"overlay"
></div>
</div>
{
{>
home/side_nav
}
}
...
...
template/m.yohobuy.com/actions/product/newsale/new.phtml
View file @
e13c054
...
...
@@ -14,6 +14,13 @@
{
{>
product/goods_container
}
}
</div>
<div
id=
"load-more-info"
class=
"load-more-info"
>
<div
class=
"loading status hide"
>
正在加载...
</div>
<span
class=
"no-more status hide"
>没有更多啦</span>
</div>
</div>
{
{>layout/footer
}
}
...
...
template/m.yohobuy.com/actions/product/newsale/sale.phtml
View file @
e13c054
...
...
@@ -14,6 +14,13 @@
{
{>
product/goods_container
}
}
</div>
<div
id=
"load-more-info"
class=
"load-more-info"
>
<div
class=
"loading status"
>
正在加载...
</div>
<span
class=
"no-more status hide"
>没有更多啦</span>
</div>
</div>
{
{>layout/footer
}
}
...
...
template/m.yohobuy.com/partials/home/content.phtml
View file @
e13c054
{
{#
content
}
}
{
{!
头部banner
}
}
{
{#
bannerTop
}
}
{
{>
home/banner_top
}
}
{
{/
bannerTop
}
}
{
{!
图标入口
}
}
{
{#
iconsEnter
}
}
{
{>
home/icons_enter
}
}
{
{/
iconsEnter
}
}
{
{!
中间banner
}
}
{
{#
banner
}
}
{
{>
home/banner
}
}
{
{/
banner
}
}
{
{!
热门品类
}
}
{
{#
hotCategory
}
}
{
{>
home/hot_category
}
}
{
{/
hotCategory
}
}
{
{!
热门品牌
}
}
{
{#
hotBrands
}
}
{
{>
home/hot_brands_list
}
}
{
{/
hotBrands
}
}
{
{!
热门品牌可滑动
}
}
{
{#
hotBrandsScroll
}
}
{
{>
home/hot_brands_swipe
}
}
{
{/
hotBrandsScroll
}
}
{
{!
潮人搭配
}
}
{
{#
trendColloaction
}
}
{
{>
home/trendsetter_collocation
}
}
{
{/trendColloaction
}
}
{
{!
潮流话题
}
}
{
{#
trendTopics
}
}
{
{>
home/trend_topics
}
}
{
{/
trendTopics
}
}
{
{!
潮流时装/经典裤裙/时尚靴履/潮人配饰/潮流上装
}
}
{
{#
goodsCategory
}
}
{
{>
home/goods_category
}
}
{
{/
goodsCategory
}
}
{
{!
新入住品牌/品味生活/创意生活
}
}
{
{#
creativeLife
}
}
{
{>
home/creative_life
}
}
{
{/
creativeLife
}
}
{
{!
PLUS
}
}
{
{#
plusStar
}
}
{
{>
home/plus_star
}
}
{
{/
plusStar
}
}
{
{!
可能喜欢
}
}
{
{>
home/maybe_like
}
}
{
{/
content
}
}
\ No newline at end of file
{
{#
content
}
}
{
{!
头部banner
}
}
{
{#
bannerTop
}
}
{
{>
home/banner_top
}
}
{
{/
bannerTop
}
}
{
{!
图标入口
}
}
{
{#
iconsEnter
}
}
{
{>
home/icons_enter
}
}
{
{/
iconsEnter
}
}
{
{!
中间banner
}
}
{
{#
banner
}
}
{
{>
home/banner
}
}
{
{/
banner
}
}
{
{!
热门品类
}
}
{
{#
hotCategory
}
}
{
{>
home/hot_category
}
}
{
{/
hotCategory
}
}
{
{!
热门品牌
}
}
{
{#
hotBrands
}
}
{
{>
home/hot_brands_list
}
}
{
{/
hotBrands
}
}
{
{!
热门品牌可滑动
}
}
{
{#
hotBrandsScroll
}
}
{
{>
home/hot_brands_swipe
}
}
{
{/
hotBrandsScroll
}
}
{
{!
潮人搭配
}
}
{
{#
trendColloaction
}
}
{
{>
home/trendsetter_collocation
}
}
{
{/trendColloaction
}
}
{
{!
潮流话题
}
}
{
{#
trendTopics
}
}
{
{>
home/trend_topics
}
}
{
{/
trendTopics
}
}
{
{!
潮流时装/经典裤裙/时尚靴履/潮人配饰/潮流上装
}
}
{
{#
goodsCategory
}
}
{
{>
home/goods_category
}
}
{
{/
goodsCategory
}
}
{
{!
新入住品牌/品味生活/创意生活
}
}
{
{#
creativeLife
}
}
{
{>
home/creative_life
}
}
{
{/
creativeLife
}
}
{
{!
PLUS
}
}
{
{#
plusStar
}
}
{
{>
home/plus_star
}
}
{
{/
plusStar
}
}
{
{/
content
}
}
{
{!
可能喜欢
}
}
{
{>
home/maybe_like
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/home/maybe_like.phtml
View file @
e13c054
...
...
@@ -3,18 +3,13 @@
<i class="icon"></i>
<span>你可能喜欢</span>
</p>
{{# maybeLike}}
<div class="goods-list clearfix">
{{# goods}}
{{> good}}
{{/ goods}}
</div>
{{/ maybeLike}}
<div id="goods-list" class="goods-list clearfix"></div>
<div id="load-more-info" class="load-more-info">
<div class="loading status">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
<div class="loading status">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
</div>
</div>
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
e13c054
...
...
@@ -85,7 +85,7 @@
{
{!--
首页
--
}
}
{
{#if
grilsHomePage
}
}
<script>
seajs.use('js/home/home');
seajs.use('js/home/home');
</script>
{
{/if
}
}
{
{#if
boysHomePage
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Girls.php
View file @
e13c054
...
...
@@ -29,8 +29,6 @@ class GirlsController extends AbstractAction
if
(
isset
(
$channelData
[
'code'
])
&&
$channelData
[
'code'
]
==
200
)
{
$data
[
'content'
]
=
FloorProcess
::
getContent
(
$channelData
[
'data'
],
2
);
}
$data
[
'maybeLike'
]
=
true
;
$this
->
_view
->
display
(
'index'
,
$data
);
}
...
...
Please
register
or
login
to post a comment