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
郭成尧
9 years ago
Commit
dbac9375a6e47d996bc69a4cbcb4d3cbe4e677d3
2 parents
e78598ac
1921ab9f
Merge branch 'feature/srchactshr' into release/5.0.0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
17 deletions
static/js/product/list.js
yohobuy/m.yohobuy.com/application/controllers/Search.php
static/js/product/list.js
View file @
dbac937
...
...
@@ -303,15 +303,6 @@ function search(opt) {
url
:
location
.
protocol
+
'//m.yohobuy.com/index/search/search'
,
data
:
setting
,
success
:
function
(
data
)
{
/* jump to activity page */
if
(
data
.
jumpActUrl
&&
data
.
jumpActUrl
.
length
>
0
)
{
if
(
$
(
'#jump-acturl'
).
length
<=
0
)
{
$
(
'body'
).
append
(
'<a href=\''
+
data
.
jumpActUrl
+
'\'><span id="jump-acturl"><span></a>'
);
}
$
(
'#jump-acturl'
).
click
();
}
var
noResult
=
'<p class="no-result">未找到相关搜索结果</p>'
,
num
,
$container
;
...
...
yohobuy/m.yohobuy.com/application/controllers/Search.php
View file @
dbac937
...
...
@@ -42,6 +42,14 @@ class SearchController extends AbstractAction
*/
public
function
listAction
()
{
if
(
$this
->
get
(
'query'
))
{
$activity
=
SearchData
::
searchKeyActivity
(
$this
->
get
(
'query'
));
if
(
$activity
[
'code'
]
===
200
&&
isset
(
$activity
[
'data'
])
&&
isset
(
$activity
[
'data'
][
'urlobj'
])
&&
isset
(
$activity
[
'data'
][
'urlobj'
][
'appUrl'
]))
{
$this
->
go
(
$activity
[
'data'
][
'urlobj'
][
'appUrl'
]);
exit
;
}
}
$uid
=
$this
->
getUid
()
?
$this
->
getUid
()
:
$this
->
get
(
'uid'
);
$isApp
=
$this
->
isApp
();
...
...
@@ -237,14 +245,6 @@ class SearchController extends AbstractAction
{
header
(
'Access-Control-Allow-Origin:*'
);
if
(
$this
->
get
(
'query'
))
{
$activity
=
SearchData
::
searchKeyActivity
(
$this
->
get
(
'query'
));
if
(
$activity
[
'code'
]
===
200
&&
isset
(
$activity
[
'data'
])
&&
isset
(
$activity
[
'data'
][
'urlobj'
])
&&
isset
(
$activity
[
'data'
][
'urlobj'
][
'appUrl'
]))
{
$this
->
echoJson
(
array
(
'jumpActUrl'
=>
$activity
[
'data'
][
'urlobj'
][
'appUrl'
]));
exit
;
}
}
$data
=
\Product\SearchModel
::
search
();
if
(
empty
(
$data
[
'new'
]))
{
...
...
Please
register
or
login
to post a comment