Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
杨延青
6 years ago
Commit
a6f9e521c93e04ce1639cf10e7284a4466383539
2 parents
e8ad0bb2
dd265c22
Merge branch 'feature/styleId' into 'release/6.8.3'
解决style id为多个时选中异常问题 See merge request
!397
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
apps/product/models/list-handler.js
apps/product/models/search-handler.js
apps/product/models/list-handler.js
View file @
a6f9e52
...
...
@@ -349,9 +349,9 @@ class FilterTools {
condition
.
totalName
;
}
}
else
if
(
k
===
'style'
)
{
const
styleids
=
_
.
split
(
params
.
style
,
','
)
;
const
styleids
=
(
params
.
style
||
''
)
+
','
;
const
styleFinds
=
_
.
filter
(
filter
.
style
,
style
=>
_
.
some
(
styleids
,
id
=>
_
.
parseInt
(
id
)
===
style
.
style_id
));
style
=>
styleids
.
includes
(
`
$
{
style
.
style_id
},
`
));
if
(
styleFinds
.
length
)
{
condition
.
name
=
styleFinds
.
length
>=
2
?
...
...
@@ -540,13 +540,13 @@ class FilterTools {
const
filter
=
_
.
get
(
origin
,
'filter'
,
{});
let
styles
=
[];
const
href
=
handleFilterUrl
(
baseUrl
,
params
,
{
style
:
'${style}'
});
const
styleids
=
_
.
split
(
params
.
style
,
','
)
;
const
styleids
=
(
params
.
style
||
''
)
+
','
;
_
.
each
(
filter
.
style
,
style
=>
{
styles
.
push
({
name
:
style
.
style_name
,
href
:
href
.
replace
(
'${style}'
,
style
.
style_id
),
checked
:
_
.
some
(
styleids
,
id
=>
_
.
parseInt
(
id
)
===
style
.
style_id
),
checked
:
styleids
.
includes
(
`
$
{
style
.
style_id
},
`
),
id
:
style
.
style_id
});
});
...
...
apps/product/models/search-handler.js
View file @
a6f9e52
...
...
@@ -877,10 +877,10 @@ exports.handleSeniorFilterData = (data, params) => {
if
(
!
_
.
isEmpty
(
data
.
style
))
{
let
sub
=
[],
conName
=
[];
let
styles
=
_
.
split
(
_
.
get
(
params
,
'style'
,
''
),
','
)
;
let
styles
=
_
.
get
(
params
,
'style'
,
''
)
+
','
;
_
.
forEach
(
data
.
style
,
value
=>
{
let
ched
=
styles
.
in
dexOf
(
`
$
{
value
.
style_id
}
`
)
>=
0
;
let
ched
=
styles
.
in
cludes
(
`
$
{
value
.
style_id
},
`
)
;
if
(
ched
&&
conName
.
length
<
2
)
{
conName
.
push
(
value
.
style_name
);
...
...
Please
register
or
login
to post a comment