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
ccbikai
9 years ago
Commit
1294d5ea864164410dad3cf77105849dedb04645
2 parents
9815d6fa
7f0c268f
Merge branch 'develop' into bugfix
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
229 additions
and
370 deletions
framework
library/Plugin/DataProcess/FloorProcess.php
static/js/index/search.js
static/js/product/newsale/discount.js
static/js/product/newsale/newarrival.js
template/m.yohobuy.com/actions/category/brand/index.phtml
template/m.yohobuy.com/actions/category/class/index.phtml
template/m.yohobuy.com/actions/index/index/index.phtml
template/m.yohobuy.com/actions/product/index/index.phtml
template/m.yohobuy.com/actions/product/newsale/new.phtml
template/m.yohobuy.com/actions/product/newsale/sale.phtml
template/m.yohobuy.com/actions/search/index/index.phtml
template/m.yohobuy.com/actions/search/index/list.phtml
template/m.yohobuy.com/partials/layout/footer.phtml
template/m.yohobuy.com/partials/layout/header.phtml
template/m.yohobuy.com/partials/layout/use.phtml
yohobuy/m.yohobuy.com/application/controllers/Boys.php
yohobuy/m.yohobuy.com/application/controllers/Girls.php
yohobuy/m.yohobuy.com/application/controllers/Index.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/Category/Class.php
yohobuy/m.yohobuy.com/application/models/Guang/Index.php
yohobuy/m.yohobuy.com/application/models/Index/Home.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
framework
@
75bbc3b0
Subproject commit
119c247f5cf929aa1e059e40609bb16dd6b58f05
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
...
...
library/Plugin/DataProcess/FloorProcess.php
View file @
1294d5e
...
...
@@ -9,7 +9,9 @@ use Plugin\Helpers;
*/
class
FloorProcess
{
private
static
$guangUrl
=
'http://guang.m.yohobuy.com'
;
/**
* 频道参数
*
...
...
@@ -131,6 +133,7 @@ class FloorProcess
/**
* 女生品类
* 推荐(1T-12F)
*/
private
static
function
recommend_content_three
(
$data
,
$type
)
{
...
...
@@ -138,7 +141,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
;
}
...
...
@@ -150,7 +153,7 @@ class FloorProcess
$build
[
'textCn'
]
=
$one
[
'title'
];
$result
[
'hotCategory'
][
'list'
][]
=
$build
;
}
if
(
isset
(
$data
[
'title'
][
'more_url'
]))
{
$data
[
'title'
][
'more_url'
]
=
Helpers
::
getFilterUrl
(
$data
[
'title'
][
'more_url'
]);
}
...
...
@@ -180,8 +183,8 @@ class FloorProcess
$data
[
'is_show_name'
]
=
$data
[
'title'
][
'is_show'
];
$data
[
'name'
]
=
$data
[
'title'
][
'title'
];
unset
(
$data
[
'title'
]);
if
(
isset
(
$data
[
'title'
][
'more_url'
]))
{
if
(
isset
(
$data
[
'title'
][
'more_url'
]))
{
$data
[
'title'
][
'more_url'
]
=
Helpers
::
getFilterUrl
(
$data
[
'title'
][
'more_url'
]);
}
...
...
@@ -226,12 +229,12 @@ class FloorProcess
{
$result
=
array
();
foreach
(
$data
as
$key
=>&
$value
){
if
(
$key
==
'title'
){
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
2
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
foreach
(
$data
as
$key
=>
&
$value
)
{
if
(
$key
==
'title'
)
{
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
3
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
}
if
(
$key
==
'article'
){
foreach
(
$value
as
&
$one
){
if
(
$key
==
'article'
)
{
foreach
(
$value
as
&
$one
)
{
if
(
isset
(
$one
[
'url'
]))
{
$one
[
'url'
]
=
Helpers
::
getFilterUrl
(
$one
[
'url'
]);
}
...
...
@@ -239,8 +242,8 @@ class FloorProcess
unset
(
$one
[
'src'
]);
}
}
if
(
$key
==
'recommend_collocation'
){
foreach
(
$value
as
&
$one
){
if
(
$key
==
'recommend_collocation'
)
{
foreach
(
$value
as
&
$one
)
{
if
(
isset
(
$one
[
'url'
]))
{
$one
[
'url'
]
=
Helpers
::
getFilterUrl
(
$one
[
'url'
]);
}
...
...
@@ -264,11 +267,11 @@ class FloorProcess
{
$result
=
array
();
foreach
(
$data
as
$key
=>&
$value
){
if
(
$key
==
'title'
){
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
1
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
foreach
(
$data
as
$key
=>
&
$value
)
{
if
(
$key
==
'title'
)
{
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
4
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
}
if
(
$key
==
'list'
)
{
if
(
$key
==
'list'
)
{
foreach
(
$value
as
&
$one
)
{
if
(
isset
(
$one
[
'url'
]))
{
$one
[
'url'
]
=
Helpers
::
getFilterUrl
(
$one
[
'url'
]);
...
...
@@ -300,7 +303,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
)
{
...
...
@@ -315,8 +318,8 @@ class FloorProcess
unset
(
$one
[
'src'
]);
}
if
(
isset
(
$data
[
'title'
][
'more_url'
]))
{
if
(
isset
(
$data
[
'title'
][
'more_url'
]))
{
$data
[
'title'
][
'more_url'
]
=
Helpers
::
getFilterUrl
(
$data
[
'title'
][
'more_url'
]);
}
...
...
@@ -337,7 +340,6 @@ class FloorProcess
{
$result
=
array
();
$data
[
'banner'
]
=
array
();
foreach
(
$data
[
'big_image'
]
as
&
$one
)
{
if
(
isset
(
$one
[
'url'
]))
{
$one
[
'url'
]
=
Helpers
::
getFilterUrl
(
$one
[
'url'
]);
...
...
@@ -355,8 +357,8 @@ class FloorProcess
$one
[
'img'
]
=
Helpers
::
getImageUrl
(
$one
[
'src'
],
191
,
191
);
unset
(
$one
[
'src'
]);
}
if
(
isset
(
$data
[
'title'
][
'more_url'
]))
{
if
(
isset
(
$data
[
'title'
][
'more_url'
]))
{
$data
[
'title'
][
'more_url'
]
=
Helpers
::
getFilterUrl
(
$data
[
'title'
][
'more_url'
]);
}
$result
[
'creativeLife'
]
=
$data
;
...
...
static/js/index/search.js
View file @
1294d5e
...
...
@@ -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/js/product/newsale/discount.js
View file @
1294d5e
...
...
@@ -217,7 +217,7 @@ function search(opt) {
lazyLoad
(
$
(
'.lazy'
));
filter
.
registerCbFn
(
search
);
loading
.
initLoadingMask
();
//
loading.initLoadingMask();
//导航栏点击逻辑说明:
//1.点击非active项时切换active状态
...
...
@@ -323,4 +323,7 @@ $(window).scroll(function() {
search
();
}
}
});
\ No newline at end of file
});
//初始请求最新第一页数据
search
();
...
...
static/js/product/newsale/newarrival.js
View file @
1294d5e
...
...
@@ -244,7 +244,7 @@ function search(opt) {
lazyLoad
(
$
(
'.lazy'
));
filter
.
registerCbFn
(
search
);
loading
.
initLoadingMask
();
//
loading.initLoadingMask();
//导航栏点击逻辑说明:
//1.点击非active项时切换active状态
...
...
@@ -337,4 +337,7 @@ $(window).scroll(function() {
search
();
}
}
});
\ No newline at end of file
});
//初始请求最新第一页数据
search
();
...
...
template/m.yohobuy.com/actions/category/brand/index.phtml
View file @
1294d5e
{
{>
layout/header
}
}
<div
class=
"brand-page yoho-page"
>
<div
class=
"newbrand-search"
>
<div
class=
"search-box clearfix"
>
<a
href=
"/index/search/index"
>
<input
type=
"text"
class=
"search-input"
placeholder=
"查找品牌"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
</a>
</div>
</div>
<div
class=
"newbrand-search"
>
<div
class=
"search-box clearfix"
>
<a
href=
"{{searchUrl}}"
>
<input
type=
"text"
class=
"search-input"
placeholder=
"查找品牌"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
</a>
</div>
</div>
{
{#
bannerTop
}
}
{
{>
home/banner_top
}
}
{
{/
bannerTop
}
}
{
{#
bannerTop
}
}
{
{>
home/banner_top
}
}
{
{/
bannerTop
}
}
{
{#
hotBrand
}
}
<div
class=
"hot-brand"
>
{
{#
hotBrand
}
}
<div
class=
"hot-brand"
>
<ul
class=
"hot-brand-list clearfix"
>
{
{#
list
}
}
<li>
...
...
@@ -28,59 +26,60 @@
</li>
{
{/
list
}
}
</ul>
</div>
{
{/
hotBrand
}
}
</div>
{
{/
hotBrand
}
}
{
{#
brandList
}
}
<div
class=
"brand-list bar-{{@index}}"
>
<div
class=
"title-bar"
>
<h
2
style=
"position: static;"
>
{
{title
}
}</h
2
>
</div>
{
{#
list
}
}
<p>
<a
href=
"{{url}}"
>
{
{name
}
}
{
{#
isHot
}
}
<i
class=
"icon-hot"
>Hot</i>
{
{/
isHot
}
}
{
{#
isNew
}
}
<i
class=
"icon-new"
>New</i>
{
{/
isNew
}
}
</a>
</p>
{
{/
list
}
}
</div>
{
{/
brandList
}
}
{
{#
brandList
}
}
<div
class=
"brand-list bar-{{@index}}"
>
<div
class=
"title-bar"
>
<h
2
style=
"position: static;"
>
{
{title
}
}</h
2
>
</div>
{
{#
list
}
}
<p>
<a
href=
"{{url}}"
>
{
{name
}
}
{
{#
isHot
}
}
<i
class=
"icon-hot"
>Hot</i>
{
{/
isHot
}
}
{
{#
isNew
}
}
<i
class=
"icon-new"
>New</i>
{
{/
isNew
}
}
</a>
</p>
{
{/
list
}
}
</div>
{
{/
brandList
}
}
<div
id=
"right-bar"
class=
"right-bar"
>
<div
id=
"right-bar"
class=
"right-bar"
>
<div
class=
"con"
id=
"con"
>
<b>#</b>
<b>A</b>
<b>B</b>
<b>C</b>
<b>D</b>
<b>E</b>
<b>F</b>
<b>G</b>
<b>H</b>
<b>I</b>
<b>J</b>
<b>K</b>
<b>L</b>
<b>M</b>
<b>N</b>
<b>O</b>
<b>P</b>
<b>Q</b>
<b>R</b>
<b>S</b>
<b>T</b>
<b>U</b>
<b>V</b>
<b>W</b>
<b>X</b>
<b>Y</b>
<b>Z</b>
<b>#</b>
<b>A</b>
<b>B</b>
<b>C</b>
<b>D</b>
<b>E</b>
<b>F</b>
<b>G</b>
<b>H</b>
<b>I</b>
<b>J</b>
<b>K</b>
<b>L</b>
<b>M</b>
<b>N</b>
<b>O</b>
<b>P</b>
<b>Q</b>
<b>R</b>
<b>S</b>
<b>T</b>
<b>U</b>
<b>V</b>
<b>W</b>
<b>X</b>
<b>Y</b>
<b>Z</b>
</div>
</div>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
{
{>
layout/download_app
}
}
...
...
template/m.yohobuy.com/actions/category/class/index.phtml
View file @
1294d5e
...
...
@@ -40,4 +40,5 @@
</div>
{
{/
category
}
}
</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/index/index.phtml
View file @
1294d5e
{
{>layout/header
}
}
{
{>
layout/header
}
}
<div
class=
"index-page yoho-page"
>
<div
class=
"index-container"
>
<div
class=
"index-header clearfix"
>
<div
class=
"iconfont index-logo"
>
60
e;</div>
<form
action=
"http://search.m.yohobuy.com"
class=
"index-search"
>
<a
href=
"javascript:void(0);"
class=
"no-search"
>取消</a>
<div
class=
"search-box"
>
<input
type=
"text"
name=
"query"
placeholder=
"搜索"
>
<span
class=
"iconfont clear-text"
>
623
;</span>
<span
class=
"iconfont search-icon"
>
60
f;</span>
</div>
</form>
</div>
<div
class=
"index-channel"
>
<img
class=
"img"
src=
"{{background}}"
alt=
""
>
<div
class=
"index-channel-list"
>
<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
class=
"index-container"
>
<div
class=
"index-header clearfix"
>
<div
class=
"iconfont index-logo"
>
60
e;</div>
<form
action=
"{{searchUrl}}"
class=
"index-search"
>
<a
href=
"javascript:void(0);"
class=
"no-search"
>取消</a>
<div
class=
"search-box"
>
<input
type=
"hidden"
name=
"from"
value=
"search"
>
<input
type=
"text"
name=
"query"
placeholder=
"搜索"
>
<span
class=
"iconfont clear-text"
>
623
;</span>
<span
class=
"iconfont search-icon"
>
60
f;</span>
</div>
</form>
</div>
<div
class=
"index-channel"
>
<img
class=
"img"
src=
"{{background}}"
alt=
""
>
<div
class=
"index-channel-list"
>
<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>
{
{>layout/footer
}
}
{
{>
layout/footer
}
}
{
{>
layout/download_app
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/product/index/index.phtml
View file @
1294d5e
...
...
@@ -2,4 +2,5 @@
<div
class=
"good-list-page yoho-page"
>
{
{>
product/list
}
}
</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/product/newsale/new.phtml
View file @
1294d5e
...
...
@@ -83,4 +83,5 @@
{
{/if
}
}
</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/product/newsale/sale.phtml
View file @
1294d5e
...
...
@@ -94,4 +94,5 @@
{
{/if
}
}
</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/search/index/index.phtml
deleted
100644 → 0
View file @
9815d6f
{
{>
layout/header
}
}
<div
class=
"good-list-page yoho-page"
>
{
{#
goodList
}
}
{
{#
search
}
}
<div
id=
"search-input"
class=
"search-input"
>
<form
action=
"/product/list/index"
method=
"get"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
<input
type=
"text"
value=
{
{default
}
}
name=
"query"
>
<i
class=
"clear-input iconfont hide"
>
61
a;</i>
<button
id=
"search"
class=
"search"
type=
"submit"
>搜索</button>
</form>
</div>
{
{/
search
}
}
{
{#
brandWay
}
}
<div
class=
"brand-way"
>
<a
href=
{
{url
}
}>
<img
class=
"brand-thumb"
src=
{
{thumb
}
}>
<span>
{
{name
}
}</span>
<span
class=
"entry"
>
进入品牌
<i
class=
"iconfont"
>
614
;</i>
</span>
</a>
</div>
{
{/
brandWay
}
}
{
{#
brandHome
}
}
<div
id=
"brand-header"
class=
"brand-header"
data-id=
{
{id
}
}>
<img
class=
"lazy"
data-original=
{
{banner
}
}>
<a
class=
"btn-intro"
href=
"javascript:void(0);"
>
品牌介绍
</a>
<a
class=
"btn-col"
href=
"javascript:void(0);"
>
<span
class=
"iconfont"
>
622
;</span>
收藏
</a>
</div>
<div
id=
"intro-box"
class=
"brand-intro-box hide"
>
<div
id=
"brand-intro"
class=
"brand-intro"
>
<h
2
>品牌介绍</h
2
>
<div
class=
"con"
>
{
{{intro
}
}}
</div>
<p
class=
"fo"
>
<span></span>
100
%品牌授权正品
</p>
<span
class=
"iconfont close-intro"
>
623
;</span>
</div>
</div>
{
{/
brandHome
}
}
<ul
id=
"list-nav"
class=
"list-nav clearfix"
>
<li
class=
"new active"
>
<a
href=
"javascript:void(0);"
>
最新
<span
class=
"iconfont cur"
>
616
;</span>
</a>
</li>
<li
class=
"price"
>
<a
href=
"javascript:void(0);"
>
价格
<span
class=
"icon"
>
<i
class=
"iconfont up"
>
615
;</i>
<i
class=
"iconfont down cur"
>
616
;</i>
</span>
</a>
</li>
<li
class=
"discount"
>
<a
href=
"javascript:void(0);"
>
折扣
<span
class=
"icon"
>
<i
class=
"iconfont up"
>
615
;</i>
<i
class=
"iconfont down cur"
>
616
;</i>
</span>
</a>
</li>
<li
class=
"filter"
>
<a
href=
"javascript:void(0);"
>
筛选
<span
class=
"iconfont"
>
613
;</span>
</a>
</li>
</ul>
<div
id=
"goods-container"
class=
"goods-container"
>
<div
class=
"new-goods container"
>
{
{#
new
}
}
{
{>
good
}
}
{
{/
new
}
}
</div>
<div
class=
"price-goods container hide"
></div>
<div
class=
"discount-goods container hide"
></div>
{
{>
filter
}
}
</div>
{
{#if
brand
}
}
<input
id=
"brand"
type=
"hidden"
value=
{
{brand
}
}>
{
{/if
}
}
{
{#if
gender
}
}
<input
id=
"gender"
type=
"hidden"
value=
{
{gender
}
}>
{
{/if
}
}
{
{#if
sort
}
}
<input
id=
"sort"
type=
"hidden"
value=
{
{sort
}
}>
{
{/if
}
}
{
{#if
color
}
}
<input
id=
"color"
type=
"hidden"
value=
{
{color
}
}>
{
{/if
}
}
{
{#if
size
}
}
<input
id=
"size"
type=
"hidden"
value=
{
{size
}
}>
{
{/if
}
}
{
{#if
price
}
}
<input
id=
"price"
type=
"hidden"
value=
{
{price
}
}>
{
{/if
}
}
{
{#if
discount
}
}
<input
id=
"discount"
type=
"hidden"
value=
{
{discount
}
}>
{
{/if
}
}
{
{/
goodList
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
template/m.yohobuy.com/actions/search/index/list.phtml
deleted
100644 → 0
View file @
9815d6f
{
{#
new
}
}
{
{>
good
}
}
{
{/
new
}
}
\ No newline at end of file
template/m.yohobuy.com/partials/layout/footer.phtml
View file @
1294d5e
{
{>
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>
...
...
template/m.yohobuy.com/partials/layout/header.phtml
View file @
1294d5e
...
...
@@ -2,7 +2,7 @@
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
{{title}}Y
OHO!
有货
</title>
<title>
{{title}}Y
oho!Buy
有货
</title>
<meta
name=
"keywords"
content=
"{{keywords}}Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
>
<meta
name=
"description"
content=
"{{description}}YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
>
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
1294d5e
...
...
@@ -122,6 +122,7 @@
{{#if newArrivalPage}}
<script>
seajs.use('js/product/newsale/newarrival');
seajs.use('js/index/footer');
</script>
{{/if}}
...
...
@@ -129,6 +130,7 @@
{{#if discountPage}}
<script>
seajs.use('js/product/newsale/discount');
seajs.use('js/index/footer');
</script>
{{/if}}
...
...
@@ -136,6 +138,7 @@
{{#if goodListPage}}
<script>
seajs.use('js/product/list');
seajs.use('js/index/footer');
</script>
{{/if}}
...
...
@@ -150,6 +153,7 @@
{{#if categoryPage}}
<script>
seajs.use('js/category/index');
seajs.use('js/index/footer');
</script>
{{/if}}
...
...
@@ -157,6 +161,7 @@
{{#if brandPage}}
<script>
seajs.use('js/category/brand');
seajs.use('js/index/footer');
</script>
{{/if}}
...
...
@@ -164,6 +169,7 @@
{{#if searchPage}}
<script>
seajs.use('js/index/search');
seajs.use('js/index/footer');
</script>
{{/if}}
...
...
yohobuy/m.yohobuy.com/application/controllers/Boys.php
View file @
1294d5e
...
...
@@ -26,10 +26,10 @@ class BoysController extends AbstractAction
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'boysHomePage'
=>
true
,
'showDownloadApp'
=>
true
,
'showFooterTab'
=>
true
,
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getBoysFloor
()
'content'
=>
Index\HomeModel
::
getBoysFloor
(),
'pageFooter'
=>
true
,
));
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Girls.php
View file @
1294d5e
...
...
@@ -26,10 +26,10 @@ class GirlsController extends AbstractAction
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'grilsHomePage'
=>
true
,
'showDownloadApp'
=>
true
,
'showFooterTab'
=>
true
,
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getGirlsFloor
()
'content'
=>
Index\HomeModel
::
getGirlsFloor
(),
'pageFooter'
=>
true
,
));
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Index.php
View file @
1294d5e
<?php
use
Action\AbstractAction
;
use
Plugin\Helpers
;
/**
* 频道选择
...
...
@@ -20,7 +21,9 @@ class IndexController extends AbstractAction
$this
->
_view
->
display
(
'index'
,
array
(
'background'
=>
Index\HomeModel
::
getBgImage
(),
'channelPage'
=>
true
,
'showDownloadApp'
=>
true
'showDownloadApp'
=>
true
,
'searchUrl'
=>
Helpers
::
url
(
''
,
null
,
'search'
),
'pageFooter'
=>
true
,
));
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Kids.php
View file @
1294d5e
...
...
@@ -26,10 +26,10 @@ class KidsController extends AbstractAction
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'kidsHomePage'
=>
true
,
'showDownloadApp'
=>
true
,
'showFooterTab'
=>
true
,
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getKidsFloor
()
'content'
=>
Index\HomeModel
::
getKidsFloor
(),
'pageFooter'
=>
true
,
));
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Lifestyle.php
View file @
1294d5e
...
...
@@ -26,10 +26,10 @@ class LifestyleController extends AbstractAction
// 渲染模板并输出
$this
->
_view
->
display
(
'index'
,
array
(
'lifestyleHomePage'
=>
true
,
'showDownloadApp'
=>
true
,
'showFooterTab'
=>
true
,
'maybeLike'
=>
true
,
'content'
=>
Index\HomeModel
::
getLifestyleFloor
()
'content'
=>
Index\HomeModel
::
getLifestyleFloor
(),
'pageFooter'
=>
true
,
));
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Search.php
View file @
1294d5e
...
...
@@ -16,40 +16,10 @@ class SearchController extends AbstractAction
*/
public
function
indexAction
()
{
$data
=
array
(
array
(
'hot'
=>
array
(
array
(
'name'
=>
'夹克'
,
'url'
=>
'm.yohobuy.com'
),
array
(
'name'
=>
'休闲运动鞋'
,
'url'
=>
'm.yohobuy.com'
),
array
(
'name'
=>
'Into the Rainbow'
,
'url'
=>
'm.yohobuy.com'
)
),
'history'
=>
array
(
array
(
'name'
=>
'what'
,
'url'
=>
'm.yohobuy.com'
),
array
(
'name'
=>
'the'
,
'url'
=>
'm.yohobuy.com'
),
array
(
'name'
=>
'fuck'
,
'url'
=>
'm.yohobuy.com'
)
)
)
);
$this
->
_view
->
html
(
'search'
);
$this
->
_view
->
display
(
'index'
,
array
(
'search'
=>
$data
,
'search'
=>
array
(
'url'
=>
Helpers
::
url
(
''
,
null
,
'search'
)),
'showDownloadApp'
=>
true
,
'searchPage'
=>
true
,
'pageFooter'
=>
true
));
...
...
@@ -73,8 +43,8 @@ class SearchController extends AbstractAction
'discount'
=>
FILTER_DEFAULT
,
'gender'
=>
FILTER_DEFAULT
,
'p_d'
=>
FILTER_DEFAULT
,),
false
);
$query
=
isset
(
$condition
[
'query'
])
?
strtolower
(
trim
(
$condition
[
'query'
]))
:
null
;
$query
=
empty
(
$condition
[
'query'
])
?
null
:
strtolower
(
trim
(
$condition
[
'query'
]));
if
(
isset
(
$condition
[
'discount'
]))
{
$condition
[
'p_d'
]
=
rawurldecode
(
$condition
[
'discount'
]);
unset
(
$condition
[
'discount'
]);
...
...
@@ -120,16 +90,15 @@ class SearchController extends AbstractAction
// 跳转到品牌商品列表页
if
(
$domain
!==
null
)
{
$url
=
Helpers
::
url
(
''
,
array
(
'from'
=>
'search'
,
'query'
=>
$query
,
'gender'
=>
$condition
[
'gender'
]
),
$domain
);
$url
=
Helpers
::
url
(
''
,
array
(
'from'
=>
'search'
,
'query'
=>
$query
,
'gender'
=>
$condition
[
'gender'
]
),
$domain
);
$this
->
go
(
$url
);
}
}
/* 判断是不是品类, 是品类加导航标题(不显示搜索框) */
if
(
$haveQuery
)
{
$classNames
=
Category\ClassModel
::
getClassNames
();
...
...
@@ -178,25 +147,25 @@ class SearchController extends AbstractAction
$data
[
'goodList'
]
=
$condition
;
$data
[
'query'
]
=
$query
;
// 查询数据
if
(
!
isset
(
$condition
[
'query'
]))
{
$data
[
'goodList'
]
+=
Product\ListModel
::
getClassData
(
$condition
);
}
else
{
$listData
=
SearchData
::
searchByCondition
(
$condition
);
// 处理返回的数据
if
(
!
empty
(
$listData
[
'data'
][
'brand'
]))
{
$brandData
=
$listData
[
'data'
][
'brand'
];
$data
[
'brandWay'
]
=
array
(
'url'
=>
'http://'
.
$brandData
[
'brand_domain'
]
.
SUB_DOMAIN
,
'thumb'
=>
Helpers
::
getImageUrl
(
$brandData
[
'brand_ico'
],
75
,
40
),
'name'
=>
$brandData
[
'brand_name'
]
);
// 设置品牌默认值
$data
[
'goodList'
][
'brand'
]
=
$brandData
[
'id'
];
$data
[
'goodList'
]
+=
ListProcess
::
getListData
(
$listData
[
'data'
]);
}
$listData
=
array
();
}
// // 查询数据
// if (!isset($condition['query'])) {
// $data['goodList'] += Product\ListModel::getClassData($condition);
// } else {
// $listData = SearchData::searchByCondition($condition);
// // 处理返回的数据
// if (!empty($listData['data']['brand'])) {
// $brandData = $listData['data']['brand'];
// $data['brandWay'] = array(
// 'url' => 'http://' . $brandData['brand_domain'] . SUB_DOMAIN,
// 'thumb' => Helpers::getImageUrl($brandData['brand_ico'], 75, 40),
// 'name' => $brandData['brand_name']
// );
// // 设置品牌默认值
// $data['goodList']['brand'] = $brandData['id'];
// $data['goodList'] += ListProcess::getListData($listData['data']);
// }
// $listData = array();
// }
$this
->
_view
->
display
(
'list'
,
$data
);
}
...
...
yohobuy/m.yohobuy.com/application/models/Category/Brand.php
View file @
1294d5e
...
...
@@ -55,6 +55,10 @@ class BrandModel
// 模板中的使用JS标识
$result
[
'brandPage'
]
=
true
;
// 是否显示app下载浮层标识
$result
[
'showDownloadApp'
]
=
true
;
// 搜索链接地址
$result
[
'searchUrl'
]
=
Helpers
::
url
(
'/search.html'
,
null
,
'search'
);
/* 顶部的轮翻广告列表 */
if
(
!
empty
(
$brand
[
'brandTop'
][
0
][
'data'
]))
{
...
...
yohobuy/m.yohobuy.com/application/models/Category/Class.php
View file @
1294d5e
...
...
@@ -38,14 +38,8 @@ class ClassModel
}
do
{
$num
=
1
;
$data
=
ClassData
::
getClassesData
();
if
(
!
isset
(
$data
[
'code'
])
||
$data
[
'code'
]
!==
200
)
{
break
;
}
if
(
!
isset
(
$data
[
'data'
]))
{
if
(
empty
(
$data
[
'data'
]))
{
break
;
}
...
...
@@ -53,10 +47,7 @@ class ClassModel
$item
=
array
();
foreach
(
$data
[
'data'
]
as
$k
=>
$v
)
{
$oneClass
=
array
(
'name'
=>
$k
,
'ca'
=>
array
());
if
(
$num
===
1
)
{
$oneClass
[
'focus'
]
=
true
;
}
foreach
(
$v
as
$val
)
{
$item
=
array
();
$item
[
'name'
]
=
$val
[
'category_name'
];
...
...
@@ -69,14 +60,12 @@ class ClassModel
'sort'
=>
$value
[
'relation_parameter'
][
'sort'
],
'sort_name'
=>
$value
[
'category_name'
]
),
'list'
);
$item
[
'sub'
][]
=
$subitem
;
}
$oneClass
[
'ca'
][]
=
$item
;
}
$num
++
;
$result
[]
=
$oneClass
;
}
...
...
yohobuy/m.yohobuy.com/application/models/Guang/Index.php
View file @
1294d5e
...
...
@@ -138,7 +138,6 @@ class IndexModel
$build
[
'type'
]
=
$value
[
'name'
];
$build
[
'focus'
]
=
(
$value
[
'id'
]
==
$type
);
$data
[
'navs'
][]
=
$build
;
$data
[
'guang'
][
'infos'
][]
=
array
(
'show'
=>
$build
[
'focus'
],
'info'
=>
array
(),
...
...
@@ -155,6 +154,19 @@ class IndexModel
$data
[
'guang'
][
'swiper'
][]
=
$build
;
}
}
// 只有当$type=0时才有广告参数返回, 所以需要再调一次!!
else
{
$temp
=
ListData
::
article
(
'1,3'
,
0
,
0
,
''
,
$page
);
if
(
!
empty
(
$temp
[
'data'
][
'list'
][
'adlist'
]))
{
foreach
(
$temp
[
'data'
][
'list'
][
'adlist'
]
as
$value
)
{
$build
=
array
();
$build
[
'url'
]
=
Helpers
::
getFilterUrl
(
$value
[
'url'
]);
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$value
[
'src'
],
830
,
327
);
$data
[
'guang'
][
'swiper'
][]
=
$build
;
}
}
$temp
=
array
();
}
// 内容列表
if
(
!
empty
(
$article
[
'data'
][
'list'
][
'artList'
]))
{
...
...
yohobuy/m.yohobuy.com/application/models/Index/Home.php
View file @
1294d5e
...
...
@@ -168,7 +168,7 @@ class HomeModel
// 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式
$channelData
=
IndexData
::
getResourceData
(
'2,3'
,
self
::
CODE_FLOOR_GIRLS
);
if
(
isset
(
$channelData
[
'code'
])
&&
$channelData
[
'code'
]
==
200
)
{
$result
=
FloorProcess
::
getContent
(
$channelData
[
'data'
]);
$result
=
FloorProcess
::
getContent
(
$channelData
[
'data'
]
,
2
);
}
if
(
USE_CACHE
)
{
...
...
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
View file @
1294d5e
...
...
@@ -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 @
1294d5e
...
...
@@ -10,21 +10,24 @@ class ClassController extends AbstractAction
{
public
function
indexAction
()
{
$channel
=
Helpers
::
getChannelByCookie
();
$classes
=
ClassModel
::
getClassData
();
// 根据频道设置默认的焦点
if
(
!
empty
(
$classes
))
{
$classes
[
$channel
-
1
][
'focus'
]
=
true
;
}
$this
->
setTitle
(
'商品分类'
);
$this
->
setNavHeader
(
'商品分类'
);
$data
=
array
(
'categoryPage'
=>
true
,
'pageHeader'
=>
array
(
'navBack'
=>
true
,
'navHome'
=>
'/'
,
'navTitle'
=>
'商品分类'
),
'showDownloadApp'
=>
true
,
'category'
=>
array
(
'class'
=>
$classes
'class'
=>
$classes
,
'searchUrl'
=>
Helpers
::
url
(
'/search.html'
,
null
,
'search'
),
)
);
$this
->
setTitle
(
'商品分类'
);
$this
->
_view
->
display
(
'index'
,
$data
);
}
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
1294d5e
...
...
@@ -51,13 +51,14 @@ class IndexController extends AbstractAction
$this
->
setTitle
(
$name
);
$this
->
setNavHeader
(
$name
,
true
,
SITE_MAIN
);
$goodList
=
Product\ListModel
::
getClassData
(
$condition
);
if
(
!
empty
(
$condition
)
&&
!
empty
(
$goodList
))
{
$goodList
=
array_merge
(
$goodList
,
$condition
);
}
// $goodList = Product\ListModel::getClassData($condition);
// if (!empty($condition) && !empty($goodList)) {
// $goodList = array_merge($goodList, $condition);
// }
$this
->
_view
->
display
(
'index'
,
array
(
'goodListPage'
=>
true
,
'goodList'
=>
$goodList
,
'showDownloadApp'
=>
true
,
'goodList'
=>
$condition
,
));
}
...
...
@@ -113,9 +114,10 @@ class IndexController extends AbstractAction
}
$data
[
'goodListPage'
]
=
true
;
$data
[
'showDownloadApp'
]
=
true
;
// 从搜索页过来的,显示搜索框, 和进入品牌引导信息
if
(
$from
===
'search'
)
{
$data
[
'goodList'
]
=
Product\ListModel
::
getBrandData
(
$condition
,
$title
);
$data
[
'goodList'
]
=
array
(
);
$data
[
'goodList'
][
'brandWay'
]
=
false
;
$data
[
'goodList'
][
'search'
][
'default'
]
=
$query
;
$data
[
'goodList'
][
'search'
][
'url'
]
=
Helpers
::
url
(
''
,
null
,
'search'
);
...
...
@@ -123,7 +125,7 @@ class IndexController extends AbstractAction
// 品牌一览过来的展示品牌介绍和LOGO
else
{
$data
[
'brandHome'
]
=
Product\ListModel
::
getBrandIntro
(
$brandIds
[
0
],
$uid
,
$title
);
$data
[
'goodList'
]
=
Product\ListModel
::
getBrandData
(
$condition
,
$title
);
$data
[
'goodList'
]
=
array
(
);
}
$data
[
'goodList'
]
+=
$condition
;
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Newsale.php
View file @
1294d5e
...
...
@@ -26,12 +26,9 @@ class NewsaleController extends AbstractAction
$data
=
array
();
$data
[
'newArrivalPage'
]
=
true
;
$data
[
'headerBanner'
]
=
\Product\NewsaleModel
::
getNewFocus
(
$channel
);
$goodsList
=
\Product\NewsaleModel
::
getNewProducts
(
$channel
,
60
);
if
(
!
empty
(
$goodsList
))
{
$data
+=
$goodsList
;
}
// 设置一些筛选的默认参数
$data
+=
array
(
'showDownloadApp'
=>
true
,
'brand'
=>
'0'
,
'sort'
=>
'0'
,
'gender'
=>
Helpers
::
getGenderByCookie
(),
...
...
@@ -59,12 +56,9 @@ class NewsaleController extends AbstractAction
$data
=
array
();
$data
[
'discountPage'
]
=
true
;
$data
[
'headerBanner'
]
=
\Product\NewsaleModel
::
getNewFocus
(
$channel
);
$goodsList
=
\Product\NewsaleModel
::
getSaleProducts
(
$channel
,
60
);
if
(
!
empty
(
$goodsList
))
{
$data
+=
$goodsList
;
}
// 设置一些筛选的默认参数
$data
+=
array
(
'showDownloadApp'
=>
true
,
'brand'
=>
'0'
,
'sort'
=>
'0'
,
'gender'
=>
Helpers
::
getGenderByCookie
(),
...
...
yohobuy/m.yohobuy.com/configs/routes.index.ini
View file @
1294d5e
...
...
@@ -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