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
dac40e501238a87a0e852f0acf2695da4b7f0e53
2 parents
8ce88e2f
c7f92eba
Merge branch 'hotfix/shopBetter' of git.yoho.cn:fe/YOHOBUYWAP into hotfix/shopBetter
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
13 deletions
static/js/product/list.js
static/js/product/shop.js
template/m.yohobuy.com/actions/product/index/shop.phtml
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
static/js/product/list.js
View file @
dac40e5
...
...
@@ -300,7 +300,7 @@ function search(opt) {
$
.
ajax
({
type
:
'GET'
,
url
:
'
/index/search/search'
,
url
:
location
.
protocol
+
'//m.yohobuy.com
/index/search/search'
,
data
:
setting
,
success
:
function
(
data
)
{
var
noResult
=
'<p class="no-result">未找到相关搜索结果</p>'
,
...
...
static/js/product/shop.js
View file @
dac40e5
...
...
@@ -180,7 +180,7 @@ function getParam(req) {
function
newData
(
callback
)
{
var
req
=
{};
req
.
url
=
'
/index/search/search'
;
req
.
url
=
location
.
protocol
+
'//m.yohobuy.com
/index/search/search'
;
req
.
data
=
{
type
:
'newest'
,
order
:
'1'
,
...
...
@@ -205,7 +205,7 @@ function newData(callback) {
function
hotData
(
callback
)
{
var
req
=
{};
req
.
url
=
'
/index/search/search'
;
req
.
url
=
location
.
protocol
+
'//m.yohobuy.com
/index/search/search'
;
req
.
data
=
{
type
:
'hot'
,
order
:
'1'
,
...
...
@@ -333,7 +333,7 @@ function scrollHandler() {
type
:
'shop_id'
,
id
:
shopId
,
brand
:
brand
,
url
:
'
/index/search/search'
,
url
:
location
.
protocol
+
'//m.yohobuy.com
/index/search/search'
,
nextPage
:
true
});
}
...
...
@@ -504,7 +504,7 @@ function search(opt) {
}
if
(
!
opt
.
url
)
{
opt
.
url
=
'
/index/search/search'
;
opt
.
url
=
location
.
protocol
+
'//m.yohobuy.com
/index/search/search'
;
}
if
(
!
opt
.
nextPage
)
{
...
...
@@ -820,7 +820,7 @@ $subNav.on('touchend touchcancel', function(e) {
type
:
'shop_id'
,
id
:
shopId
,
brand
:
brand
,
url
:
'
/index/search/search'
,
url
:
location
.
protocol
+
'//m.yohobuy.com
/index/search/search'
,
nextPage
:
false
});
}
...
...
template/m.yohobuy.com/actions/product/index/shop.phtml
View file @
dac40e5
...
...
@@ -6,7 +6,6 @@
<div
id=
"nav-top"
>
{
{>
layout/page_header
}
}
<!--
tar
modifield
160826
-->
<input
type=
"hidden"
name=
"channel"
value=
"{{channel}}"
>
<input
type=
"hidden"
name=
"app_version"
value=
"{{appVersion}}"
>
<input
type=
"hidden"
name=
"shop_id"
value=
"{{shopId}}"
>
<input
type=
"hidden"
name=
"brand"
value=
"{{brand}}"
>
...
...
@@ -19,7 +18,6 @@
<form
id=
"search-form"
action=
{
{url
}
}
method=
"get"
>
<i
class=
"search-icon iconfont"
>
60
f;</i>
<input
type=
"text"
placeholder=
"搜索店铺内潮品"
name=
"query"
class=
"buriedpoint"
>
<input
type=
"hidden"
name=
"channel"
value=
"{{channel}}"
>
<input
type=
"hidden"
name=
"shop_id"
value=
"{{shopId}}"
>
<input
type=
"hidden"
name=
"coverChannel"
value=
"{{coverChannel}}"
>
<i
class=
"clear-input iconfont hide"
>
626
;</i>
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
dac40e5
...
...
@@ -487,15 +487,12 @@ class IndexController extends AbstractAction
/* tar add 160826 */
$data
[
'gender'
]
=
$this
->
get
(
'gender'
);
$data
[
'channel'
]
=
$this
->
get
(
'yh_channel'
)
?
$this
->
get
(
'yh_channel'
)
:
Helpers
::
getChannelByCookie
();
//接受APP传来的封面频道参数
$coverChannel
=
Helpers
::
getYhHhannel
(
$this
->
get
(
'yh_channel'
,
''
));
$filter
=
Product\SearchModel
::
filter
(
array
(
'shop_id'
=>
$shopId
,
'gender'
=>
empty
(
$data
[
'gender'
])
?
''
:
$data
[
'gender'
],
'channel'
=>
empty
(
$data
[
'channel'
])
?
''
:
$data
[
'channel'
],
'brand'
=>
empty
(
$data
[
'brand'
])
?
''
:
$data
[
'brand'
]
));
$data
[
'filter'
]
=
isset
(
$filter
[
'filter'
])
?
$filter
[
'filter'
]
:
array
();
...
...
@@ -504,7 +501,6 @@ class IndexController extends AbstractAction
$goods
=
\Product\SearchModel
::
search
(
array
(
'shop'
=>
$shopId
,
'gender'
=>
empty
(
$data
[
'gender'
])
?
''
:
$data
[
'gender'
],
'channel'
=>
empty
(
$data
[
'channel'
])
?
''
:
$data
[
'channel'
],
'brand'
=>
empty
(
$data
[
'brand'
])
?
''
:
$data
[
'brand'
],
'coverChannel'
=>
$coverChannel
));
...
...
@@ -517,7 +513,6 @@ class IndexController extends AbstractAction
'url'
=>
Helpers
::
url
(
'/product/index/category'
,
array
(
'shop_id'
=>
$shopId
))
),
'gender'
=>
$data
[
'gender'
],
'channel'
=>
$data
[
'channel'
],
'coverChannel'
=>
$coverChannel
,
'appVersion'
=>
!
empty
(
$appVersion
)
));
...
...
Please
register
or
login
to post a comment