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
毕凯
9 years ago
Commit
174ef49b91241573d102eb0ea03d13547a9643bd
1 parent
515278ca
首页增加 公告
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
88 additions
and
1 deletions
static/img/sprite.me.png
static/img/trend.png
static/js/home/home.js
static/sass/home/_index.css
static/sass/home/_notice.css
template/m.yohobuy.com/partials/home/content.phtml
template/m.yohobuy.com/partials/home/notice.phtml
yohobuy/m.yohobuy.com/application/controllers/Boys.php
static/img/sprite.me.png
View file @
174ef49
17.4 KB
|
W:
|
H:
17.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
static/img/trend.png
0 → 100644
View file @
174ef49
3.36 KB
static/js/home/home.js
View file @
174ef49
...
...
@@ -6,6 +6,7 @@
var
$
=
require
(
'jquery'
),
Swiper
=
require
(
'yoho.iswiper'
),
lazyLoad
=
require
(
'yoho.lazyload'
),
noticeScroll
=
require
(
'../plugin/notice-scroll'
),
$mobileWrap
=
$
(
'.mobile-wrap'
),
$overlay
=
$
(
'.overlay'
),
$sideNav
=
$
(
'.side-nav'
),
...
...
@@ -24,6 +25,7 @@ var start = 0,
isen
=
true
;
lazyLoad
(
$
(
'img.lazy'
));
noticeScroll
(
'.notice'
,
$
(
'.notice'
).
data
(
'time'
)
*
1000
);
$
(
'.nav-btn'
).
on
(
'touchstart'
,
function
()
{
$sideNav
.
css
(
'pointer-events'
,
'none'
);
...
...
static/sass/home/_index.css
View file @
174ef49
...
...
@@ -17,6 +17,7 @@
@import
"hot-category"
;
@import
"home-header"
;
@import
"thumb-row"
;
@import
"notice"
;
.mobile-container
{
width
:
100%
;
...
...
static/sass/home/_notice.css
0 → 100644
View file @
174ef49
.notice-wrap
{
.trend
{
position
:
relative
;
box-sizing
:
border-box
;
float
:
left
;
width
:
170px
;
height
:
72px
;
background
:
resolve
(
'img/trend.png'
)
no-repeat
center
center
;
background-size
:
90%
;
background-color
:
#fff
;
&:after
{
content
:
''
;
position
:
absolute
;
right
:
0
;
top
:
16px
;
width
:
1px
;
height
:
40px
;
background
:
#eee
;
}
}
.notice
{
box-sizing
:
border-box
;
float
:
left
;
padding
:
0
30px
;
background
:
#fff
;
width
:
470px
;
height
:
72px
;
overflow
:
hidden
;
.notice-item
{
display
:
block
;
width
:
100%
;
font-size
:
24px
;
line-height
:
72px
;
color
:
#444
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.notice-icon
{
display
:
inline-block
;
margin-right
:
10px
;
width
:
28px
;
height
:
28px
;
background
:
url("/me/index/volume.png")
;
vertical-align
:
middle
;
}
span
.notice-icon
{
background-repeat
:
no-repeat
!important
;
}
}
}
...
...
template/m.yohobuy.com/partials/home/content.phtml
View file @
174ef49
...
...
@@ -7,6 +7,10 @@
{
{#
iconsEnter
}
}
{
{>
home/icons_enter
}
}
{
{/
iconsEnter
}
}
{
{!
首页公告
}
}
{
{#
notice
}
}
{
{>
home/notice
}
}
{
{/
notice
}
}
{
{!
中间banner
}
}
{
{#
banner
}
}
{
{>
home/banner
}
}
...
...
template/m.yohobuy.com/partials/home/notice.phtml
0 → 100644
View file @
174ef49
{
{#if
notice.open
}
}
<div
class=
"notice-wrap clearfix"
>
<div
class=
"trend"
>
</div>
<div
class=
"notice"
data-time=
"{{notice.time}}"
>
{
{#notice.list
}
}
<a
class=
"notice-item item-{{@index}}"
href=
"{{url}}"
>
<span
class=
"notice-icon"
></span>
{
{title
}
}
</a>
{
{/notice.list
}
}
</div>
</div>
{
{/if
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Boys.php
View file @
174ef49
...
...
@@ -2,6 +2,7 @@
use
Action\AbstractAction
;
use
Plugin\Helpers
;
// use Index\UserModel as UserModel;
/**
* 男生首页
...
...
@@ -29,12 +30,21 @@ class BoysController extends AbstractAction
// 显示底部TAB
$this
->
setNavFooterTab
();
$content
=
Index\HomeModel
::
getBoysFloor
();
// $content[] = array(
// 'notice' => array(
// 'open' => true,
// 'list' => UserModel::getNoticeData(),
// 'time' => 3,
// )
// );
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'boysHomePage'
=>
true
,
'homeHeader'
=>
array
(
'searchUrl'
=>
Helpers
::
url
(
'/search'
,
null
,
'search'
)),
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getBoysFloor
()
,
'content'
=>
$content
,
'pageFooter'
=>
true
,
));
}
...
...
Please
register
or
login
to post a comment