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
c5a3138f3e821c2e710d7b3b67b61aa4dae30158
1 parent
5d2e35fb
添加设置参数 fix 价格显示不全bug
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
6 deletions
static/js/product/shop.js
static/sass/product/_shop-index.css
template/m.yohobuy.com/actions/product/index/shop.phtml
static/js/product/shop.js
View file @
c5a3138
...
...
@@ -31,7 +31,8 @@ var $subNav = $('.home-sub-nav'),
$pgc
=
$
(
$goodsChildren
.
get
(
1
)),
$dgc
=
$
(
$goodsChildren
.
get
(
2
)),
shopId
=
$
(
'input[name="shop_id"]'
).
val
(),
appVersion
=
$
(
'input[name="app_version"]'
).
val
();
appVersion
=
$
(
'input[name="app_version"]'
).
val
(),
brand
=
$
(
'input[name="brand"]'
).
val
();
var
winH
=
$
(
window
).
height
(),
noResult
=
'<p class="no-result">未找到相关搜索结果</p>'
;
...
...
@@ -143,6 +144,16 @@ function getPageGoods(info) {
});
}
function
getParam
(
req
)
{
if
(
shopId
)
{
req
.
data
.
shop_id
=
shopId
;
}
if
(
brand
)
{
req
.
data
.
brand
=
brand
;
}
}
function
newData
(
callback
)
{
var
req
=
{};
...
...
@@ -150,9 +161,11 @@ function newData(callback) {
req
.
data
=
{
type
:
'newest'
,
order
:
'1'
,
page
:
navInfo
.
new
.
page
,
shop_id
:
shopId
page
:
navInfo
.
new
.
page
};
getParam
(
req
);
req
.
callBack
=
function
(
data
)
{
$
(
'#new-arrival'
).
append
(
data
);
navInfo
.
new
.
page
++
;
...
...
@@ -172,9 +185,11 @@ function hotData(callback) {
req
.
data
=
{
type
:
'hot'
,
order
:
'1'
,
page
:
navInfo
.
hot
.
page
,
shop_id
:
shopId
page
:
navInfo
.
hot
.
page
};
getParam
(
req
);
req
.
callBack
=
function
(
data
)
{
$
(
'#popularity'
).
append
(
data
);
navInfo
.
hot
.
page
++
;
...
...
@@ -445,6 +460,7 @@ function search(opt) {
page
:
page
});
searching
=
true
;
loading
.
showLoadingMask
();
...
...
@@ -512,7 +528,8 @@ $.ajax({
type
:
'GET'
,
url
:
'/search/filter'
,
data
:
{
shop_id
:
shopId
shop_id
:
shopId
,
brand
:
brand
},
success
:
function
(
data
)
{
$goodsContainer
.
append
(
data
);
...
...
@@ -658,6 +675,7 @@ $subNav.on('touchend touchcancel', function(e) {
search
({
type
:
'shop_id'
,
id
:
shopId
,
brand
:
brand
,
url
:
'/index/search/search'
,
nextPage
:
false
});
...
...
@@ -678,6 +696,7 @@ function scrollHandler() {
search
({
type
:
'shop_id'
,
id
:
shopId
,
brand
:
brand
,
url
:
'/index/search/search'
,
nextPage
:
true
});
...
...
@@ -695,6 +714,7 @@ $(window).scroll(function() {
search
({
type
:
'shop_id'
,
id
:
shopId
,
brand
:
brand
,
url
:
'/index/search/search'
,
nextPage
:
false
});
...
...
static/sass/product/_shop-index.css
View file @
c5a3138
...
...
@@ -255,6 +255,9 @@
margin
:
0
;
line-height
:
32px
;
text-align
:
left
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
...
...
template/m.yohobuy.com/actions/product/index/shop.phtml
View file @
c5a3138
...
...
@@ -15,6 +15,7 @@
<input
type=
"text"
placeholder=
"搜索店铺内潮品"
name=
"query"
class=
"buriedpoint"
>
<input
type=
"hidden"
name=
"shop_id"
value=
"{{shopId}}"
>
<input
type=
"hidden"
name=
"app_version"
value=
"{{appVersion}}"
>
<input
type=
"hidden"
name=
"brand"
value=
"{{brand}}"
>
<i
class=
"clear-input iconfont hide"
>
626
;</i>
<button
id=
"search"
class=
"search buriedpoint"
type=
"submit"
>搜索</button>
</form>
...
...
Please
register
or
login
to post a comment