Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
zhangxiaoru
8 years ago
Commit
1a1dde5ee4980935c37dccc124162553f61613f1
1 parent
cc80e80c
search
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
apps/product/controllers/search.js
public/js/product/search/list.js
apps/product/controllers/search.js
View file @
1a1dde5
...
...
@@ -140,7 +140,7 @@ const index = (req, res, next) => {
render
(
result
);
}).
catch
(
next
);
}
})((
result
)
=>
{
res
.
render
(
'search/index'
,
{
module
:
'product'
,
...
...
@@ -156,8 +156,8 @@ const index = (req, res, next) => {
}
});
})
});
};
/**
...
...
public/js/product/search/list.js
View file @
1a1dde5
...
...
@@ -412,12 +412,12 @@ function search(opt) {
lazyLoad
(
$container
.
find
(
'.lazy'
));
RES_QTY
=
$container
.
find
(
'.total'
).
data
(
'id'
);
FILTER_VALUE
=
JSON
.
stringify
(
setting
).
replace
(
/
\{
|
\}
|
\"
/g
,
""
);
FILTER_VALUE
=
JSON
.
stringify
(
setting
).
replace
(
/
\{
|
\}
|
\"
/g
,
''
);
$container
.
find
(
'.good-info'
).
each
(
function
()
{
var
goodid
=
$
(
this
).
data
(
'good-id'
);
if
(
goodid
)
{
if
(
goodid
)
{
goodIds
.
push
(
goodid
);
}
});
...
...
@@ -440,17 +440,17 @@ function search(opt) {
num
=
$container
.
find
(
'.good-info'
).
length
;
$container
.
append
(
data
);
if
(
$container
.
find
(
'.total'
))
{
if
(
$container
.
find
(
'.total'
))
{
$container
.
find
(
'.total'
)[
1
].
remove
();
}
$container
.
find
(
'.good-info:gt('
+
(
num
-
1
)
+
')'
).
each
(
function
()
{
var
goodid
=
$
(
this
).
data
(
'good-id'
);
if
(
goodid
)
{
if
(
goodid
)
{
goodIds
.
push
(
goodid
);
}
})
})
;
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
...
...
@@ -746,7 +746,7 @@ $listNav.on('touchstart', 'li', function() {
$
(
'#goods-container'
).
on
(
'click'
,
'.good-info'
,
function
(
event
)
{
var
PRD_ID
=
$
(
this
).
data
(
'good-id'
),
PRD_NUM
=
$
(
this
).
index
()
+
1
,
FILTER_VALUE
=
JSON
.
stringify
(
qwert
).
replace
(
/
\{
|
\}
|
\"
/g
,
""
);
FILTER_VALUE
=
JSON
.
stringify
(
qwert
).
replace
(
/
\{
|
\}
|
\"
/g
,
''
);
event
.
preventDefault
();
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
...
...
@@ -765,4 +765,4 @@ $('#goods-container').on('click', '.good-info', function(event) {
}
return
false
;
})
})
;
...
...
Please
register
or
login
to post a comment