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
hf
9 years ago
Commit
11a92e3fa9029d4d0a1fc9c291ccad524e2dc784
2 parents
31fbcc30
456cd819
modify search url to config
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
58 additions
and
29 deletions
library/Plugin/DataProcess/FloorProcess.php
static/js/home/home.js
static/js/index/search.js
static/sass/index/_index.scss
template/m.yohobuy.com/actions/index/index/index.phtml
template/m.yohobuy.com/partials/layout/footer.phtml
yohobuy/m.yohobuy.com/application/controllers/Boys.php
yohobuy/m.yohobuy.com/application/controllers/Girls.php
yohobuy/m.yohobuy.com/application/controllers/Kids.php
yohobuy/m.yohobuy.com/application/controllers/Lifestyle.php
yohobuy/m.yohobuy.com/application/controllers/Search.php
yohobuy/m.yohobuy.com/application/models/Category/Brand.php
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
yohobuy/m.yohobuy.com/application/modules/Category/controllers/Class.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Newsale.php
yohobuy/m.yohobuy.com/configs/routes.index.ini
library/Plugin/DataProcess/FloorProcess.php
View file @
11a92e3
...
...
@@ -131,6 +131,7 @@ class FloorProcess
/**
* 女生品类
* 推荐(1T-12F)
*/
private
static
function
recommend_content_three
(
$data
,
$type
)
{
...
...
@@ -138,7 +139,7 @@ class FloorProcess
$build
=
array
();
if
(
!
empty
(
$data
[
'big_image'
][
0
]))
{
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$data
[
'big_image'
][
0
][
'src'
],
640
,
198
);
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$data
[
'big_image'
][
0
][
'src'
],
640
,
200
);
$build
[
'url'
]
=
Helpers
::
getFilterUrl
(
$data
[
'big_image'
][
0
][
'url'
]);
$result
[
'hotCategory'
][
'banner'
]
=
$build
;
}
...
...
@@ -228,7 +229,7 @@ class FloorProcess
foreach
(
$data
as
$key
=>&
$value
){
if
(
$key
==
'title'
){
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
2
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
3
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
}
if
(
$key
==
'article'
){
foreach
(
$value
as
&
$one
){
...
...
@@ -266,7 +267,7 @@ class FloorProcess
foreach
(
$data
as
$key
=>&
$value
){
if
(
$key
==
'title'
){
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
1
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
4
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
}
if
(
$key
==
'list'
){
foreach
(
$value
as
&
$one
)
{
...
...
@@ -300,7 +301,7 @@ class FloorProcess
$one
[
'img'
]
=
Helpers
::
getImageUrl
(
$one
[
'src'
],
640
,
403
);
unset
(
$one
[
'src'
]);
}
$
data
[
'banner
'
][
'list'
]
=
$data
[
'big_image'
];
$
result
[
'big_image
'
][
'list'
]
=
$data
[
'big_image'
];
foreach
(
$data
[
'list'
]
as
$kk
=>
&
$one
)
{
if
(
$kk
==
0
)
{
...
...
@@ -337,7 +338,6 @@ class FloorProcess
{
$result
=
array
();
$data
[
'banner'
]
=
array
();
foreach
(
$data
[
'big_image'
]
as
&
$one
)
{
if
(
isset
(
$one
[
'url'
]))
{
$one
[
'url'
]
=
Helpers
::
getFilterUrl
(
$one
[
'url'
]);
...
...
static/js/home/home.js
View file @
11a92e3
...
...
@@ -188,7 +188,7 @@ function tsAnimate() {
window
.
setTimeout
(
tsAnimate
,
3000
);
}
else
{
if
(
start
%
360
===
0
)
{
window
.
setTimeout
(
tsAnimate
,
3
*
60
*
1000
);
window
.
setTimeout
(
tsAnimate
,
60
*
1000
);
}
else
{
requestFrame
(
function
()
{
tsAnimate
();
...
...
static/js/index/search.js
View file @
11a92e3
...
...
@@ -56,7 +56,7 @@ $clear.bind('tap', function() {
continue
;
}
html
+=
'<li><a href="?query='
+
history
+
'">'
+
history
+
'</li>'
;
html
+=
'<li><a href="
/
?query='
+
history
+
'">'
+
history
+
'</li>'
;
}
$history
.
html
(
html
);
...
...
static/sass/index/_index.scss
View file @
11a92e3
...
...
@@ -88,15 +88,38 @@
background-color
:
#000000
;
.index-channel-list
{
padding-top
:
50%
;
width
:
100%
;
position
:
absolute
;
top
:
0
;
padding-top
:
50%
;
width
:
100%
;
position
:
absolute
;
top
:
-230rem
/
$pxConvertRem
;
.homestyle
{
.list-item
{
display
:
block
;
position
:
relative
;
margin
:
0
auto
50rem
/
$pxConvertRem
;
width
:
444rem
/
$pxConvertRem
;
height
:
110rem
/
$pxConvertRem
;
text-align
:
center
;
font-size
:
30rem
/
$pxConvertRem
;
line-height
:
110rem
/
$pxConvertRem
;
color
:
#fff
;
background
:
#000
;
border
:
5rem
/
$pxConvertRem
solid
#fff
;
font-weight
:
bold
;
}
.lighter
{
font-weight
:
lighter
;
}
.right-icon
{
position
:
absolute
;
right
:
10rem
/
$pxConvertRem
;
top
:
0
;
font-weight
:
bold
;
}
.homestyle
{
margin-bottom
:
50rem
/
$pxConvertRem
;
width
:
287
.3rem
/
$pxConvertRem
;
}
}
}
}
}
...
...
template/m.yohobuy.com/actions/index/index/index.phtml
View file @
11a92e3
{
{>layout/header
}
}
<div
class=
"index-page yoho-page"
>
<div
class=
"index-container"
>
<div
class=
"index-header clearfix"
>
...
...
@@ -13,15 +12,16 @@
</div>
</form>
</div>
<div
class=
"index-channel"
>
<img
class=
"img"
src=
"{{background}}"
alt=
""
>
<div
class=
"index-channel-list"
>
<a
href=
"/boys"
><img
class=
"homestyle"
src=
"http://img10.static.yhbimg.com/adpic/2015/09/28/18/01bdbd27952eb5f780ac23641e70fd6e12.png"
></a>
<a
href=
"/girls"
><img
class=
"homestyle"
src=
"http://img13.static.yhbimg.com/adpic/2015/09/28/18/025a4056cad1c2b6704a5d7c83066a2d25.png"
></a>
<a
href=
"/boys"
class=
"list-item"
>男生
<span
class=
"lighter"
>BOYS</span>
<span
class=
"iconfont right-icon"
>
614
;</span></a>
<a
href=
"/girls"
class=
"list-item"
>女生
<span
class=
"lighter"
>GIRLS</span>
<span
class=
"iconfont right-icon"
>
614
;</span></a>
<a
href=
"/kids"
class=
"list-item"
>潮童
<span
class=
"lighter"
>KIDS</span>
<span
class=
"iconfont right-icon"
>
614
;</span></a>
<a
href=
"/lifestyle"
class=
"list-item"
>创意生活
<span
class=
"lighter"
>LIFESTYLE</span>
<span
class=
"iconfont right-icon"
>
614
;</span></a>
</div>
</div>
</div>
</div>
</div>
{
{>layout/footer
}
}
{
{>
layout/download_app
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/footer.phtml
View file @
11a92e3
{
{>
layout/page_footer
}
}
{
{>
layout/download_app
}
}
{
{#if
rlsEnv
}
}
<script
src=
"http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"
></script>
<script
src=
"http://cdn.yoho.cn/myohobuy/{{version}}/index.js"
></script>
...
...
yohobuy/m.yohobuy.com/application/controllers/Boys.php
View file @
11a92e3
...
...
@@ -26,7 +26,6 @@ class BoysController extends AbstractAction
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'boysHomePage'
=>
true
,
'showDownloadApp'
=>
true
,
'showFooterTab'
=>
true
,
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getBoysFloor
()
...
...
yohobuy/m.yohobuy.com/application/controllers/Girls.php
View file @
11a92e3
...
...
@@ -26,7 +26,6 @@ class GirlsController extends AbstractAction
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'grilsHomePage'
=>
true
,
'showDownloadApp'
=>
true
,
'showFooterTab'
=>
true
,
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getGirlsFloor
()
...
...
yohobuy/m.yohobuy.com/application/controllers/Kids.php
View file @
11a92e3
...
...
@@ -26,7 +26,6 @@ class KidsController extends AbstractAction
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'kidsHomePage'
=>
true
,
'showDownloadApp'
=>
true
,
'showFooterTab'
=>
true
,
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getKidsFloor
()
...
...
yohobuy/m.yohobuy.com/application/controllers/Lifestyle.php
View file @
11a92e3
...
...
@@ -26,7 +26,6 @@ class LifestyleController extends AbstractAction
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'lifestyleHomePage'
=>
true
,
'showDownloadApp'
=>
true
,
'showFooterTab'
=>
true
,
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getLifestyleFloor
()
...
...
yohobuy/m.yohobuy.com/application/controllers/Search.php
View file @
11a92e3
...
...
@@ -16,8 +16,10 @@ class SearchController extends AbstractAction
*/
public
function
indexAction
()
{
$this
->
_view
->
html
(
'search'
);
$this
->
_view
->
display
(
'index'
,
array
(
'search'
=>
array
(
'url'
=>
Helpers
::
url
(
''
,
null
,
'search'
)),
'showDownloadApp'
=>
true
,
'searchPage'
=>
true
,
'pageFooter'
=>
true
));
...
...
@@ -41,7 +43,7 @@ class SearchController extends AbstractAction
'discount'
=>
FILTER_DEFAULT
,
'gender'
=>
FILTER_DEFAULT
,
'p_d'
=>
FILTER_DEFAULT
,),
false
);
$query
=
isset
(
$condition
[
'query'
])
?
strtolower
(
trim
(
$condition
[
'query'
]))
:
null
;
if
(
isset
(
$condition
[
'discount'
]))
{
$condition
[
'p_d'
]
=
rawurldecode
(
$condition
[
'discount'
]);
...
...
yohobuy/m.yohobuy.com/application/models/Category/Brand.php
View file @
11a92e3
...
...
@@ -55,6 +55,8 @@ class BrandModel
// 模板中的使用JS标识
$result
[
'brandPage'
]
=
true
;
// 是否显示app下载浮层标识
$result
[
'showDownloadApp'
]
=
true
;
/* 顶部的轮翻广告列表 */
if
(
!
empty
(
$brand
[
'brandTop'
][
0
][
'data'
]))
{
...
...
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
View file @
11a92e3
...
...
@@ -213,7 +213,7 @@ class NewsaleModel
if
(
isset
(
$data
[
'code'
])
&&
$data
[
'code'
]
===
200
)
{
foreach
(
$data
[
'data'
][
'product_list'
]
as
$val
)
{
$result
[
'goods'
][]
=
Helpers
::
formatProduct
(
$val
);
$result
[
'goods'
][]
=
Helpers
::
formatProduct
(
$val
,
true
,
false
,
false
);
}
}
...
...
yohobuy/m.yohobuy.com/application/modules/Category/controllers/Class.php
View file @
11a92e3
...
...
@@ -22,6 +22,7 @@ class ClassController extends AbstractAction
$data
=
array
(
'categoryPage'
=>
true
,
'showDownloadApp'
=>
true
,
'category'
=>
array
(
'class'
=>
$classes
,
'searchUrl'
=>
Helpers
::
url
(
'/search.html'
,
null
,
'search'
),
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
11a92e3
...
...
@@ -57,6 +57,7 @@ class IndexController extends AbstractAction
}
$this
->
_view
->
display
(
'index'
,
array
(
'goodListPage'
=>
true
,
'showDownloadApp'
=>
true
,
'goodList'
=>
$goodList
,
));
}
...
...
@@ -113,6 +114,7 @@ class IndexController extends AbstractAction
}
$data
[
'goodListPage'
]
=
true
;
$data
[
'showDownloadApp'
]
=
true
;
// 从搜索页过来的,显示搜索框, 和进入品牌引导信息
if
(
$from
===
'search'
)
{
$data
[
'goodList'
]
=
Product\ListModel
::
getBrandData
(
$condition
,
$title
);
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Newsale.php
View file @
11a92e3
...
...
@@ -32,6 +32,7 @@ class NewsaleController extends AbstractAction
}
// 设置一些筛选的默认参数
$data
+=
array
(
'showDownloadApp'
=>
true
,
'brand'
=>
'0'
,
'sort'
=>
'0'
,
'gender'
=>
Helpers
::
getGenderByCookie
(),
...
...
@@ -65,6 +66,7 @@ class NewsaleController extends AbstractAction
}
// 设置一些筛选的默认参数
$data
+=
array
(
'showDownloadApp'
=>
true
,
'brand'
=>
'0'
,
'sort'
=>
'0'
,
'gender'
=>
Helpers
::
getGenderByCookie
(),
...
...
yohobuy/m.yohobuy.com/configs/routes.index.ini
View file @
11a92e3
...
...
@@ -13,11 +13,11 @@ routes.error.route.controller = Error
routes.error.route.action
=
Index
; 搜索页
routes.reg.type
=
"rewrite"
routes.reg.match
=
"/search.html"
routes.reg.route.module
=
Index
routes.reg.route.controller
=
Search
routes.reg.route.action
=
Index
routes.search.type
=
"rewrite"
routes.search.match
=
"/search.html"
routes.search.route.module
=
Index
routes.search.route.controller
=
Search
routes.search.route.action
=
Index
; 注册页
routes.reg.type
=
"rewrite"
...
...
Please
register
or
login
to post a comment