Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
Rock Zhang
9 years ago
Commit
2cf68188db1e24a80d1b46414d09a2044b7e4fe5
1 parent
4d72c179
修改一些模板变量以及模板文件命名
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
60 additions
and
29 deletions
library/Plugin/FloorProcess.php
template/m.yohobuy.com/partials/common/floor_header_more.phtml
template/m.yohobuy.com/partials/common/goods_category.phtml
template/m.yohobuy.com/partials/common/hot_brands.phtml
template/m.yohobuy.com/partials/common/icons-enter.phtml → template/m.yohobuy.com/partials/common/icons_enter.phtml
template/m.yohobuy.com/partials/common/trend-topics.phtml → template/m.yohobuy.com/partials/common/trend_topics.phtml
template/m.yohobuy.com/partials/common/trendsetter-collocation.phtml → template/m.yohobuy.com/partials/common/trendsetter_collocation.phtml
template/m.yohobuy.com/partials/girls/hot_brands.phtml
yohobuy/m.yohobuy.com/application/controllers/Girls.php
library/Plugin/FloorProcess.php
View file @
2cf6818
...
...
@@ -74,6 +74,9 @@ class FloorProcess
$one
[
'img'
]
=
Helpers
::
getImageUrl
(
$one
[
'src'
],
186
,
203
,
1
);
unset
(
$one
[
'src'
]);
}
$data
[
'is_show_name'
]
=
$data
[
'title'
][
'is_show'
];
$data
[
'name'
]
=
$data
[
'title'
][
'title'
];
unset
(
$data
[
'title'
]);
$result
=
$data
;
return
$result
;
...
...
@@ -88,6 +91,7 @@ class FloorProcess
{
$result
=
array
();
$data
[
'is_show_name'
]
=
$data
[
'is_show_name'
]
==
'Y'
?
1
:
0
;
$data
[
'name'
]
=
$data
[
'title'
][
'title'
];
unset
(
$data
[
'title'
]);
foreach
(
$data
[
'list'
]
as
&
$one
)
{
...
...
@@ -152,6 +156,9 @@ class FloorProcess
$one
[
'img'
]
=
Helpers
::
getImageUrl
(
$one
[
'src'
],
186
,
203
,
1
);
unset
(
$one
[
'src'
]);
}
$data
[
'banner'
][
'list'
]
=
$data
[
'big_image'
];
unset
(
$data
[
'big_image'
]);
foreach
(
$data
[
'list'
]
as
&
$one
)
{
$one
[
'img'
]
=
Helpers
::
getImageUrl
(
$one
[
'src'
],
186
,
203
,
1
);
unset
(
$one
[
'src'
]);
...
...
@@ -170,10 +177,14 @@ class FloorProcess
{
$result
=
array
();
$data
[
'banner'
]
=
array
();
foreach
(
$data
[
'big_image'
]
as
&
$one
)
{
$one
[
'img'
]
=
Helpers
::
getImageUrl
(
$one
[
'src'
],
186
,
203
,
1
);
unset
(
$one
[
'src'
]);
}
$data
[
'banner'
][
'list'
]
=
$data
[
'big_image'
];
unset
(
$data
[
'big_image'
]);
foreach
(
$data
[
'list'
]
as
&
$one
)
{
$one
[
'img'
]
=
Helpers
::
getImageUrl
(
$one
[
'src'
],
186
,
203
,
1
);
unset
(
$one
[
'src'
]);
...
...
@@ -200,4 +211,22 @@ class FloorProcess
return
$result
;
}
/**
* 也许喜欢数据处理方法
* @param array $data 也许喜欢数据
* @return array 处理之后的也许喜欢数据
*/
public
static
function
maybeLike
(
$data
)
{
$result
=
array
();
foreach
(
$data
as
&
$one
)
{
$one
[
'img'
]
=
Helpers
::
getImageUrl
(
$one
[
'src'
],
235
,
314
,
1
);
unset
(
$one
[
'src'
]);
}
$result
=
$data
;
return
$result
;
}
}
...
...
template/m.yohobuy.com/partials/common/floor_header_more.phtml
View file @
2cf6818
{
{#
title
}
}
<div
class=
"floor-header-more"
>
<h2>{{name}}</h2>
{{# more}}
<a class="more-btn iconfont" href="{{.}}"></a>
{{/ more}}
</div>
\ No newline at end of file
<h
2
>
{
{title
}
}</h
2
>
<a
class=
"more-btn iconfont"
href=
"{{more_url}}"
>
{
{more_name
}
}</a>
</div>
{
{/
title
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/common/goods_category.phtml
View file @
2cf6818
...
...
@@ -6,7 +6,7 @@
{
{#
list
}
}
<li
class=
"swiper-slide"
>
<a
href=
"{{url}}"
>
<img
class=
"lazy"
src=
"{{img}}"
alt=
""
>
<img
class=
"lazy"
src=
"{{img}}"
alt=
"
{{title}}
"
>
</a>
</li>
{
{/
list
}
}
...
...
template/m.yohobuy.com/partials/common/hot_brands.phtml
View file @
2cf6818
{
{>
common/floor_header
}
}
<ul
class=
"hot-brands clearfix"
>
{
{#
brands
}
}
{
{#
list
}
}
<li
class=
"brand"
>
<a
href=
"{{url}}"
>
<div
class=
"brand-logo"
>
...
...
@@ -9,7 +9,7 @@
<p
class=
"brand-name"
>
{
{name
}
}</p>
</a>
</li>
{
{/
brands
}
}
{
{/
list
}
}
<li
class=
"more"
>
<a
href=
"{{more}}"
></a>
</li>
...
...
template/m.yohobuy.com/partials/common/icons
-
enter.phtml → template/m.yohobuy.com/partials/common/icons
_
enter.phtml
View file @
2cf6818
<div class="icons-wrapper">
<ul class="icons-list clearfix">
{{#list}}
<li class="icons-item"><a href="{{url}}" class="imagebar"><img class="lazy" data-original="{{img}}" alt=""></a><a href="{{url}}" class="linkbar">{{t
ext
}}</a></li>
<li class="icons-item"><a href="{{url}}" class="imagebar"><img class="lazy" data-original="{{img}}" alt=""></a><a href="{{url}}" class="linkbar">{{t
itle
}}</a></li>
{{/list}}
</ul>
</div>
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/common/trend
-
topics.phtml → template/m.yohobuy.com/partials/common/trend
_
topics.phtml
View file @
2cf6818
...
...
@@ -13,7 +13,7 @@
<p class="title">{{title}}</p>
<p class="time">
<span class="iconfont time-icon"></span>
<span>{{time}}</span>
<span>{{
publish_
time}}</span>
</p>
</div>
</a>
...
...
template/m.yohobuy.com/partials/common/trendsetter
-
collocation.phtml → template/m.yohobuy.com/partials/common/trendsetter
_
collocation.phtml
View file @
2cf6818
<div class="trend-coll-wrapper">
{{> common/floor_header_more}}
<div class="trend-coll-content clearfix">
{{#
leftspan
}}
{{#
article
}}
<div class="lspan">
<a href="{{url}}"><img class="lazy rspanimg" data-original="{{img}}" ></a>
</div>
{{/leftspan}}
{{#rightspan}}
<div class="rspan">
<a href="{{url}}"><img class="lazy lspanimg" data-original="{{img}}" ></a>
</div>
{{/rightspan}}
{{/ article}}
</div>
<div class="trend-coll-tail">
<h3 class="recommend-title">推荐搭配</h3>
<div class="recommend-swiper">
<ul class="recommend-list clearfix">
{{# recommend
list
}}
{{# recommend
_collocation
}}
<li class="recommend-item swiper-slide"><a href="{{url}}"><img class="lazy" src="{{img}}" alt="" /></a></li>
{{/ recommend
list
}}
{{/ recommend
_collocation
}}
</ul>
</div>
</div>
...
...
template/m.yohobuy.com/partials/girls/hot_brands.phtml
View file @
2cf6818
<div class="hot-brands girls">
{{> common/floor_header
_more
}}
{{> common/floor_header}}
<div class="brands-swiper">
<ul class="brands-list swiper-wrapper clearfix">
{{# list}}
...
...
yohobuy/m.yohobuy.com/application/controllers/Girls.php
View file @
2cf6818
...
...
@@ -2,6 +2,7 @@
use
Action\AbstractAction
;
use
LibModels\Wap\Home\IndexData
;
use
LibModels\Wap\Product\RecomData
;
use
Plugin\Helpers
;
use
Plugin\FloorProcess
;
/**
...
...
@@ -18,8 +19,8 @@ class GirlsController extends AbstractAction
$data
=
array
(
'headerDownload'
=>
$this
->
getHeaderDownload
(),
'homeHeader'
=>
array
(
'bgColor'
=>
'#FF88AE'
,
'searchUrl'
=>
''
'bgColor'
=>
'#FF88AE'
,
'searchUrl'
=>
''
),
'searchUrl'
=>
''
,
'sideNav'
=>
array
(),
...
...
@@ -42,7 +43,7 @@ class GirlsController extends AbstractAction
$iconsEnter
=
array
();
$singleImage
=
array
();
$hotCategory
=
array
();
$hotBrands
Scroll
=
array
();
$hotBrands
=
array
();
$trendColloaction
=
array
();
$trendTopics
=
array
();
$goodsCategory
=
array
();
...
...
@@ -72,7 +73,7 @@ class GirlsController extends AbstractAction
break
;
case
'app_hot_brands'
:
// 推荐品牌
$oneHotBrand
=
FloorProcess
::
$template
(
$floorData
);
$hotBrands
Scroll
[]
=
$oneHotBrand
;
$hotBrands
[]
=
$oneHotBrand
;
break
;
case
'trendsetter_collocation'
:
// 潮人·搭配
$oneTrendSetter
=
FloorProcess
::
$template
(
$floorData
);
...
...
@@ -103,7 +104,7 @@ class GirlsController extends AbstractAction
'bannerTop'
=>
$bannerTop
,
'iconsEnter'
=>
$iconsEnter
,
'hotCategory'
=>
$hotCategory
,
'hotBrands
Scroll'
=>
$hotBrandsScroll
,
'hotBrands
'
=>
$hotBrands
,
'trendColloaction'
=>
$trendColloaction
,
'trendTopics'
=>
$trendTopics
,
'goodsCategory'
=>
$goodsCategory
...
...
@@ -111,10 +112,16 @@ class GirlsController extends AbstractAction
$data
[
'content'
]
=
$content
;
}
echo
'<pre>'
;
print_r
(
$data
);
exit
;
$data
=
array
(
// 也许喜欢
$maybeLikeData
=
RecomData
::
mayLike
(
'2,3'
,
2
);
$maybeLike
=
array
();
if
(
$maybeLike
[
'code'
]
==
200
)
{
$maybeLike
=
$maybeLike
[
'data'
][
'product_list'
];
}
/*$data = array(
'headerDownload' => array(
'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',
'url' => 'http://www.baidu.com'
...
...
@@ -592,7 +599,7 @@ class GirlsController extends AbstractAction
'url' => ''
)
));
));
*/
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
$this
->
_view
->
display
(
'index'
,
$data
);
...
...
Please
register
or
login
to post a comment