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
hf
9 years ago
Commit
569101653b6b1269fe69bf83d1ef037d7bb15ae7
1 parent
44559b51
fixes bug to search page
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
template/m.yohobuy.com/partials/product/list.phtml
yohobuy/m.yohobuy.com/application/controllers/Search.php
yohobuy/m.yohobuy.com/application/models/Product/Search.php
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
template/m.yohobuy.com/partials/product/list.phtml
View file @
5691016
{
{#
goodList
}
}
{
{#
search
}
}
<div
id=
"search-input"
class=
"search-input"
>
<form
id=
"search-form"
action=
{
{url
}
}
method=
"get"
>
<form
id=
"search-form"
action=
"{{url}}"
method=
"get"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
<input
type=
"text"
value=
{
{default
}
}
name=
"query"
>
<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>
...
...
yohobuy/m.yohobuy.com/application/controllers/Search.php
View file @
5691016
...
...
@@ -246,6 +246,7 @@ class SearchController extends AbstractAction
// $data = Product\ListModel::getClassData($condition);
$data
=
Product\SearchModel
::
getSearchData
(
$condition
);
}
while
(
false
);
if
(
empty
(
$data
[
'new'
]))
{
...
...
yohobuy/m.yohobuy.com/application/models/Product/Search.php
View file @
5691016
...
...
@@ -49,7 +49,7 @@ class SearchModel
// 处理返回的数据
if
(
isset
(
$listData
[
'code'
])
&&
$listData
[
'code'
]
===
200
)
{
$result
=
ListProcess
::
getListData
(
$listData
[
'data'
],
false
);
}
}
if
(
USE_CACHE
)
{
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
...
...
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
View file @
5691016
...
...
@@ -159,7 +159,7 @@ class PlusstarController extends AbstractAction
// 相关文章
foreach
(
$brandInfo
[
'getArticleByBrand'
]
as
$value
)
{
$data
[
'ps'
][
'infos'
][]
=
Helpers
::
formatArticle
(
$value
,
false
,
false
,
false
,
$uid
);
$data
[
'ps'
][
'infos'
][]
=
Helpers
::
formatArticle
(
$value
,
false
,
$isApp
,
false
,
$uid
);
}
// 设置头部信息
...
...
@@ -172,7 +172,7 @@ class PlusstarController extends AbstractAction
$data
[
'shareLink'
]
=
$defaultUrl
;
$data
[
'shareTitle'
]
=
$data
[
'ps'
][
'name'
];
$data
[
'shareDesc'
]
=
(
mb_strlen
(
$data
[
'ps'
][
'intro'
],
'utf-8'
)
>
800
)
?
mb_substr
(
$data
[
'ps'
][
'intro'
],
0
,
80
0
,
'utf-8'
)
.
'...'
:
$data
[
'ps'
][
'intro'
];
$data
[
'shareDesc'
]
=
(
mb_strlen
(
$data
[
'ps'
][
'intro'
],
'utf-8'
)
>
120
)
?
mb_substr
(
$data
[
'ps'
][
'intro'
],
0
,
12
0
,
'utf-8'
)
.
'...'
:
$data
[
'ps'
][
'intro'
];
$data
[
'shareImg'
]
=
$data
[
'ps'
][
'logo'
];
$brandInfo
=
array
();
...
...
Please
register
or
login
to post a comment