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
Email Patches
Plain Diff
Browse Files
Authored by
yyq
9 years ago
Commit
9725ec5f880c3c448ed48ebca4629a906e2a8bbc
1 parent
c62e9ef1
店铺搜索无结果样式
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
4 deletions
template/www.yohobuy.com/partials/product/shop-all-goods.phtml
template/www.yohobuy.com/partials/product/shop-search-empty.phtml
template/www.yohobuy.com/partials/product/shop-search.phtml
web-static/img/product/search-bg.png
web-static/sass/product/_shop-index.css
yohobuy/www.yohobuy.com/application/models/Product/Shop.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
template/www.yohobuy.com/partials/product/shop-all-goods.phtml
0 → 100644
View file @
9725ec5
{
{#allGoods
}
}
<div
class=
"all-goods clearfix"
>
{
{>
index/floor-header
}
}
<div
class=
"goods-wrap"
>
{
{>
product/goods-list
}
}
</div>
{
{#if
href
}
}
<div
class=
"loading"
>
<a
href=
"{{href}}"
target=
"_blank"
>查看更多</a>
</div>
{
{/if
}
}
</div>
{
{/allGoods
}
}
...
...
template/www.yohobuy.com/partials/product/shop-search-empty.phtml
0 → 100644
View file @
9725ec5
<div class="search-empty">
<div class="empty-icon"></div>
<p class="res-tip">抱歉!未找到符合条件的商品</p>
<p>换个条件或关键词试试吧。</p>
</div>
\ No newline at end of file
...
...
template/www.yohobuy.com/partials/product/shop-search.phtml
0 → 100644
View file @
9725ec5
<div class="shop-search">
<form action="/shoplist" method="get" id="shop-search-form">
<span>
<input type="hidden" name="shopId" value="{{shopId}}">
<input id="shop-query-key" type="text" name="query" class="shop-query-key" autocomplete="off" x-webkit-speech="" lang="zh-CN" placeholder="关键词搜索" {{# shopQueryKey}}value="{{.}}"{{/ shopQueryKey}}>
</span>
<span class="iconfont shop-query-submit"></span>
</form>
</div>
...
...
web-static/img/product/search-bg.png
0 → 100644
View file @
9725ec5
1.89 KB
web-static/sass/product/_shop-index.css
View file @
9725ec5
...
...
@@ -213,6 +213,16 @@
.floor-header
{
margin-top
:
50px
;
.floor-title
{
margin
:
0
auto
;
width
:
298px
;
height
:
31px
;
line-height
:
31px
;
border
:
1px
solid
#000
;
font-size
:
16px
;
text-align
:
center
;
}
}
.new-arrivel
,
...
...
@@ -392,7 +402,8 @@
font-size
:
14px
;
li
{
display
:
inline-block
;
float
:
left
;
margin
:
6px
0
0
6px
;
padding
:
0
15px
;
}
...
...
@@ -436,6 +447,28 @@
}
}
.search-empty
{
text-align
:
center
;
padding-top
:
40px
;
.empty-icon
{
height
:
172px
;
background
:
resolve
(
'/product/search-bg.png'
)
no-repeat
center
center
;
}
>
p
{
color
:
#afafaf
;
font-size
:
14px
;
}
.res-tip
{
font-size
:
18px
;
color
:
#444
;
margin
:
20px
0
;
font-weight
:
500
;
}
}
.trend-info
{
width
:
100%
;
...
...
yohobuy/www.yohobuy.com/application/models/Product/Shop.php
View file @
9725ec5
...
...
@@ -229,9 +229,33 @@ class ShopModel
array
(
'href'
=>
''
,
'name'
=>
$data
[
'brandIntro'
][
'brandName'
],
'title'
=>
$data
[
'brandIntro'
][
'brandName'
])
)
);
// $data['name'] = '全部商品 ALL';
// $sort = self::getSort($res['sort']);
// $data['goodsMenu']['menuList'] = $sort;
// 搜索无商品时显示全部商品
if
(
isset
(
$searchCondition
[
'condition'
][
'query'
])
&&
!
empty
(
$searchCondition
[
'condition'
][
'query'
])
&&
empty
(
$data
[
'goods'
]))
{
$data
[
'searchEmpty'
]
=
true
;
unset
(
$searchCondition
[
'condition'
][
'query'
]);
$allProUrl
=
array
(
'product'
=>
SearchData
::
getProductUrl
(
$searchCondition
[
'condition'
]));
//批量调接口获取数据
$allRes
=
Yohobuy
::
getMulti
(
$allProUrl
);
$allResult
=
HelperSearch
::
getList
(
$allRes
,
array_merge
(
array
(
'defaultCover'
=>
true
),
$searchCondition
[
'options'
]
),
$searchCondition
[
'userInput'
]);
$sort
=
self
::
getSort
(
$res
[
'sort'
],
$parameters
[
'options'
][
'misort'
],
$shopId
);
$param
=
array_merge
(
$searchCondition
[
'userInput'
],
array
(
'navBar'
=>
1
,
'shopId'
=>
$shopId
));
$data
[
'allGoods'
][
'name'
]
=
'全部商品 ALL'
;
$data
[
'allGoods'
][
'list'
]
=
$allResult
[
'goods'
];
$data
[
'allGoods'
][
'opts'
]
=
$allResult
[
'opts'
];
$data
[
'allGoods'
][
'goodsMenu'
][
'menuList'
]
=
$sort
;
$data
[
'allGoods'
][
'goodsMenu'
][
'url'
]
=
self
::
$shopListUrl
.
'?'
.
http_build_query
(
$param
);
}
return
$data
;
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
9725ec5
...
...
@@ -532,6 +532,7 @@ class IndexController extends WebAction
'options'
=>
array
(
'controller'
=>
'Index'
,
'action'
=>
'index'
,
'misort'
=>
$this
->
get
(
'misort'
)
),
'uid'
=>
$uid
,
'navBar'
=>
$this
->
get
(
'navBar'
,
1
),
...
...
Please
register
or
login
to post a comment