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
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
318314b0875159e1f292241b0fcaa80474cbe47a
2 parents
56778691
08941f83
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
24 deletions
static/js/common.js
static/js/home/home.js
static/sass/home/_home-header.scss
static/sass/layout/_header.scss
template/m.yohobuy.com/partials/layout/page_header.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
static/js/common.js
View file @
318314b
...
...
@@ -5,7 +5,8 @@
*/
var
$
=
require
(
'jquery'
);
var
$footer
=
$
(
'#yoho-footer'
);
var
$footer
=
$
(
'#yoho-footer'
),
$header
=
$
(
'.yoho-header'
);
function
cookie
(
name
)
{
var
cookies
=
document
.
cookie
,
...
...
@@ -152,6 +153,13 @@ function rePosFooter() {
}
}());
$header
.
on
(
'touchstart'
,
'a'
,
function
()
{
$header
.
find
(
'a'
).
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
'a'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
//暴露公共接口
window
.
cookie
=
cookie
;
...
...
static/js/home/home.js
View file @
318314b
...
...
@@ -214,8 +214,13 @@ function tsAnimate() {
setTimeout
(
tsAnimate
,
3000
);
// 底部留出tab 的高度
$
(
'.home-header .search-btn'
).
on
(
'touchstart'
,
function
()
{
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
// 底部留出tab 的高度
$
(
'#yoho-footer'
).
css
({
'margin-bottom'
:
'2.5rem'
});
...
...
static/sass/home/_home-header.scss
View file @
318314b
...
...
@@ -63,11 +63,21 @@
.search-btn
{
position
:
absolute
;
right
:
32rem
/
$pxConvertRem
;
right
:
0
;
top
:
0
;
bottom
:
0
;
a
{
width
:
90rem
/
$pxConvertRem
;
height
:
90rem
/
$pxConvertRem
;
text-align
:
center
;
a
{
display
:
block
;
color
:
#fff
;
font-size
:
40rem
/
$pxConvertRem
;
line-height
:
90rem
/
$pxConvertRem
;
}
&
.highlight
{
background
:
rgba
(
200
,
200
,
200
,.
4
);
}
}
}
...
...
static/sass/layout/_header.scss
View file @
318314b
...
...
@@ -24,26 +24,31 @@
background
:
#4f4138
;
}
.nav-back
{
a
.highlight
{
background
:
rgba
(
200
,
200
,
200
,.
1
);
}
%nav
{
display
:
block
;
position
:
absolute
;
left
:
34rem
/
$pxConvertRem
;
top
:
28rem
/
$pxConvertRem
;
width
:
18rem
/
$pxConvertRem
;
height
:
32rem
/
$pxConvertRem
;
background
:
image-url
(
'layout/back.png'
)
no-repeat
;
background-size
:
100%
100%
;
top
:
0
;
width
:
90rem
/
$pxConvertRem
;
height
:
90rem
/
$pxConvertRem
;
font-size
:
40rem
/
$pxConvertRem
;
line-height
:
90rem
/
$pxConvertRem
;
color
:
#fff
;
text-align
:
center
;
outline
:
none
;
}
.nav-back
{
@extend
%nav
;
left
:
0
;
}
.nav-home
{
position
:
absolute
;
top
:
28rem
/
$pxConvertRem
;
right
:
34rem
/
$pxConvertRem
;
width
:
20px
;
height
:
20px
;
background
:
image-url
(
'layout/home.png'
)
no-repeat
;
background-size
:
100%
100%
;
outline
:
none
;
@extend
%nav
;
right
:
0
;
}
.nav-title
{
...
...
template/m.yohobuy.com/partials/layout/page_header.phtml
View file @
318314b
{
{#pageHeader
}
}
<header
class=
"yoho-header{{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}"
>
{
{#if
navBack
}
}
<a
href=
"javascript:history.go(-1);"
class=
"
nav-back"
>
</a>
<a
href=
"javascript:history.go(-1);"
class=
"
iconfont nav-back"
>
610
;
</a>
{
{/if
}
}
{
{#navHome
}
}
<a
href=
"{{.}}"
class=
"
nav-home"
>
</a>
<a
href=
"{{.}}"
class=
"
iconfont nav-home"
>
611
;
</a>
{
{/navHome
}
}
{
{#navTitle
}
}
<p
class=
"nav-title"
>
{
{.
}
}</p>
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
318314b
...
...
@@ -297,12 +297,13 @@ class HomeController extends AbstractAction
$page
=
$this
->
get
(
'page'
,
1
);
$limit
=
$this
->
get
(
'limit'
,
10
);
$uid
=
$this
->
getUid
();
$uid
=
5687179
;
$gender
=
Helpers
::
getGenderByCookie
();
$yh_channel
=
Helpers
::
getChannelByCookie
();
$guangInfo
=
\home\GuangModel
::
getMyGuang
(
$uid
,
$page
,
$yh_channel
,
$gender
,
$limit
);
$this
->
setTitle
(
'我收藏的'
);
$this
->
setNavHeader
(
'我收藏的'
,
true
,
''
);
$this
->
_view
->
display
(
'my-guang'
,
array
(
'myGuangPage'
=>
true
,
'myGuang'
=>
$guangInfo
,
'pageFooter'
=>
true
));
$this
->
_view
->
display
(
'my-guang'
,
array
(
'myGuangPage'
=>
true
,
'myGuang'
=>
array
(
'infos'
=>
$guangInfo
)
,
'pageFooter'
=>
true
));
}
/**
...
...
@@ -482,7 +483,7 @@ class HomeController extends AbstractAction
$this
->
error
();
}
//传入order_code和uid以取消订单
$order_code
=
$this
->
get
(
'
orderCode
'
);
$order_code
=
$this
->
get
(
'
id
'
);
$uid
=
$this
->
getUid
();
$uid
=
'10267443'
;
//测试用
$gender
=
Helpers
::
getGenderByCookie
();
...
...
Please
register
or
login
to post a comment