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
63f040c733a4bc8178779b0d18df7c409d8bc897
1 parent
4465dcc7
删除冗余代码
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
271 deletions
template/m.yohobuy.com/actions/shop/index/brand.phtml
template/m.yohobuy.com/actions/shop/index/category.phtml
template/m.yohobuy.com/actions/shop/index/intro.phtml
yohobuy/m.yohobuy.com/application/modules/Shop/controllers/Index.php
template/m.yohobuy.com/actions/shop/index/brand.phtml
deleted
100644 → 0
View file @
4465dcc
{
{>
layout/header
}
}
{
{#
brands
}
}
<a
class=
"brand-list"
href=
"{{url}}"
>
{
{brandname
}
}
</a>
{
{/
brands
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
template/m.yohobuy.com/actions/shop/index/category.phtml
deleted
100644 → 0
View file @
4465dcc
{
{>
layout/header
}
}
<div
class=
"product-category yoho-page"
>
<div
id=
"allproduct"
class=
"allproduct"
>
<a
href=
{
{allproduct
}
}>
<p
class=
"allproductParagaraph"
>全部商品</p>
<i
class=
"arrow-icon iconfont"
>
614
;</i>
</a>
</div>
<div
class=
"margin-under-allproduct"
>
</div>
<div
class=
"category-container clearfix"
>
<div
class=
"content"
>
{
{#
content
}
}
<ul
class=
"primary-level"
>
{
{#
class
}
}
<li
class=
"p-level-item"
>
{
{name
}
}
<div
class=
"primary-level-trilangle trilanglefont hide"
>
64
a;</div>
</li>
{
{/
class
}
}
</ul>
<div
class=
"sub-level-container hide"
>
{
{#
category
}
}
<ul
class=
"sub-level"
>
{
{#
subcategory
}
}
<li>
<a
href=
{
{url
}
}>
{
{category_name
}
}
</a>
</li>
{
{/
subcategory
}
}
</ul>
{
{/
category
}
}
</div>
{
{/
content
}
}
</div>
</div>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
template/m.yohobuy.com/actions/shop/index/intro.phtml
deleted
100644 → 0
View file @
4465dcc
{
{>
layout/header
}
}
<div
class
='shop_introduation'>
<a
class=
"banner"
>
<img
src=
"{{content.shop_logo}}"
>
</a>
<div
class=
"descripition"
>
{
{content.shop_intro
}
}
</div>
<p
class=
"fo"
>
<span
class=
"iconfont"
>
649
;</span>
100
%品牌授权正品
</p>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
yohobuy/m.yohobuy.com/application/modules/Shop/controllers/Index.php
deleted
100644 → 0
View file @
4465dcc
<?php
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/4/21
* Time: 11:11
*/
use
Action\AbstractAction
;
use
LibModels\Wap\Shop\ShopData
;
use
Plugin\Helpers
;
class
IndexController
extends
AbstractAction
{
/**
* 店铺品牌首页
*
* @return mixed
*/
public
function
brandAction
()
{
$result
=
array
();
// 假数据
$result
=
$this
->
getCategoryContent
();
$result2
=
IntroData
::
getShopIntro
(
356
);
return
$this
->
_view
->
display
(
'category'
,
array
(
'content'
=>
$result
,
));
}
/**
* 店铺品牌品类页,需要判断单品店还是多品店
*
* @return mixed
*/
public
function
categoryAction
()
{
$requestData
=
filter_input_array
(
INPUT_GET
,
array
(
'shop_id'
=>
FILTER_DEFAULT
,
));
if
(
empty
(
$requestData
[
'shop_id'
]))
{
$this
->
go
(
SITE_MAIN
);
}
$result
=
array
();
$resource
=
array
();
$resource
[
'category'
]
=
ShopData
::
getShopCategory
(
$requestData
[
'shop_id'
],
Helpers
::
getChannelByCookie
(),
Helpers
::
getGenderByCookie
());
$resource
[
'brands'
]
=
ShopData
::
getShopBrands
(
$requestData
[
'shop_id'
]);
if
(
$resource
[
'category'
][
'code'
]
===
200
)
{
$class
=
array
();
$category
=
array
();
foreach
(
$resource
[
'category'
][
'data'
]
as
&
$item
)
{
array_push
(
$class
,
array
(
'name'
=>
$item
[
'category_name'
]));
foreach
(
$item
[
'sub'
]
as
&
$item2
)
{
$item2
[
'url'
]
=
Helpers
::
url
(
''
);
// tar mark 还不知道链接是啥样的
}
array_push
(
$category
,
array
(
'subcategory'
=>
$item
[
'sub'
]));
}
$result
[
'class'
]
=
$class
;
$result
[
'category'
]
=
$category
;
}
if
(
$resource
[
'brands'
][
'code'
]
===
200
)
{
$result
[
'brands'
]
=
$resource
[
'brands'
][
'data'
];
}
// 处理图片链接
foreach
(
$result
[
'brands'
]
as
&
$item
)
{
$item
[
'brand_ico'
]
=
\Plugin\Images
::
getImageUrl
(
$item
[
'brand_ico'
],
0
,
0
);
}
// $result = $this->getCategoryContent();
ShopData
::
debugOut
(
$result
,
false
);
return
$this
->
_view
->
display
(
'category'
,
array
(
'productCategoryPage'
=>
true
,
'content'
=>
$result
,
));
}
/**
* 店铺简介页面
*
* @return mixed
*/
public
function
introAction
()
{
$requestData
=
filter_input_array
(
INPUT_GET
,
array
(
'shop_id'
=>
FILTER_DEFAULT
,
));
if
(
empty
(
$requestData
[
'shop_id'
]))
{
$this
->
go
(
SITE_MAIN
);
}
$result
=
array
();
$resource
=
ShopData
::
getShopIntro
(
$requestData
[
'shop_id'
]);
if
(
$resource
[
'code'
]
===
200
)
{
$result
=
$resource
[
'data'
];
}
return
$this
->
_view
->
display
(
'intro'
,
array
(
'content'
=>
$result
,
));
}
/**
* 店铺分类品类页数据模拟
*
* @return array
*/
public
function
getCategoryContent
()
{
return
array
(
// 数据模拟
'class'
=>
array
(
array
(
'name'
=>
'上衣'
,
),
array
(
'name'
=>
'裤装'
,
),
array
(
'name'
=>
'鞋靴'
,
),
array
(
'name'
=>
'包类'
,
)
),
'category'
=>
array
(
array
(
'subcategory'
=>
array
(
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'上衣衣1'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'上衣衣2'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'上衣衣3'
),
)
),
array
(
'subcategory'
=>
array
(
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'裤装1'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'裤装2'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'裤装3'
),
)
),
array
(
'subcategory'
=>
array
(
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'鞋靴1'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'鞋靴2'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'鞋靴3'
)
)
),
array
(
'subcategory'
=>
array
(
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'包类1'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'包类2'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'包类3'
)
)
)
)
);
}
/**
* 店铺简介数据模拟
*
* @return array
*/
public
function
getIntroContent
()
{
return
array
(
// 数据模拟
);
}
}
\ No newline at end of file
Please
register
or
login
to post a comment