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
c656c68357cf71b09482b8ea36466870ed4bda4f
2 parents
f34cb24e
25110162
Merge branch 'release/4.4' of
http://git.dev.yoho.cn/web/yohobuywap
into release/4.4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
static/js/product/shop.js
template/m.yohobuy.com/actions/product/index/shop.phtml
static/js/product/shop.js
View file @
c656c68
...
...
@@ -18,6 +18,7 @@ var $ = require('jquery'),
scH
,
$nav1
=
$
(
'#pos-nav'
),
$nav2
=
$
(
'#pos-list'
),
$homePage
=
$
(
'.discount-area'
),
sTop
;
var
tip
=
require
(
'../plugin/tip'
),
...
...
@@ -31,7 +32,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>'
;
...
...
@@ -135,7 +137,8 @@ function newData(callback) {
type
:
'newest'
,
order
:
'1'
,
page
:
navInfo
.
new
.
page
,
shop_id
:
shopId
shop_id
:
shopId
,
brand
:
brand
};
req
.
callBack
=
function
(
data
)
{
$
(
'#new-arrival'
).
append
(
data
);
...
...
@@ -157,7 +160,8 @@ function hotData(callback) {
type
:
'sales'
,
order
:
'1'
,
page
:
navInfo
.
hot
.
page
,
shop_id
:
shopId
shop_id
:
shopId
,
brand
:
brand
};
req
.
callBack
=
function
(
data
)
{
$
(
'#popularity'
).
append
(
data
);
...
...
@@ -497,7 +501,8 @@ $.ajax({
type
:
'GET'
,
url
:
'/product/newsale/filter'
,
data
:
{
shop_id
:
shopId
shop_id
:
shopId
,
brand
:
brand
},
success
:
function
(
data
)
{
$goodsContainer
.
append
(
data
);
...
...
@@ -626,6 +631,7 @@ $subNav.on('touchend touchcancel', function(e) {
search
({
type
:
'shop_id'
,
id
:
shopId
,
brand
:
brand
,
url
:
'/index/search/search'
,
nextPage
:
false
});
...
...
@@ -646,6 +652,7 @@ function scrollHandler() {
search
({
type
:
'shop_id'
,
id
:
shopId
,
brand
:
brand
,
url
:
'/index/search/search'
,
nextPage
:
true
});
...
...
@@ -654,14 +661,18 @@ function scrollHandler() {
}
//srcoll to load more
$
(
window
).
scroll
(
function
()
{
window
.
requestAnimationFrame
(
scrollHandler
);
});
if
(
$homePage
.
length
>
0
)
{
$
(
window
).
scroll
(
function
()
{
window
.
requestAnimationFrame
(
scrollHandler
);
});
}
//初始请求最新第一页数据
search
({
type
:
'shop_id'
,
id
:
shopId
,
brand
:
brand
,
url
:
'/index/search/search'
,
nextPage
:
false
});
...
...
template/m.yohobuy.com/actions/product/index/shop.phtml
View file @
c656c68
...
...
@@ -7,6 +7,7 @@
{
{#if
appVersion
}
}
<input
type=
"hidden"
name=
"app_version"
value=
"{{appVersion}}"
>
<input
type=
"hidden"
name=
"shop_id"
value=
"{{shopId}}"
>
<input
type=
"hidden"
name=
"brand"
value=
"{{brand}}"
>
{
{else
}
}
<div
class=
"search-area"
>
<div
id=
"search-input"
class=
"search-input"
>
...
...
@@ -15,6 +16,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