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
Email Patches
Plain Diff
Browse Files
Authored by
陈峰
7 years ago
Commit
5d17beadaf56aff15db9c0dbf6cccb9c545ee5f0
1 parent
4cf22086
hotfix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
27 deletions
apps/guang/models/guang-service.js
apps/product/models/list-handler.js
apps/guang/models/guang-service.js
View file @
5d17bea
...
...
@@ -879,13 +879,15 @@ module.exports = class extends global.yoho.BaseModel {
let
other
=
_
.
isFunction
(
that
.
_articleContentFormat
()[
key
])
?
that
.
_articleContentFormat
()[
key
](
val
.
data
)
:
''
;
// 前五张图片添加alt
if
(
altNum
<
6
&&
(
other
.
pic
||
other
.
smallPic
))
{
other
.
alt
=
title
;
altNum
+=
other
.
pic
?
1
:
other
.
smallPic
.
length
;
}
if
(
other
)
{
// 前五张图片添加alt
if
(
altNum
<
6
&&
(
other
.
pic
||
other
.
smallPic
))
{
other
.
alt
=
title
;
altNum
+=
other
.
pic
?
1
:
other
.
smallPic
.
length
;
}
content
.
push
(
other
);
content
.
push
(
other
);
}
}
});
});
...
...
apps/product/models/list-handler.js
View file @
5d17bea
...
...
@@ -334,7 +334,7 @@ class FilterTools {
let
{
baseUrl
,
origin
,
params
}
=
this
;
const
filter
=
_
.
get
(
origin
,
'filter'
,
{});
if
(
!
filter
.
brand
.
length
)
{
if
(
!
filter
.
brand
||
!
filter
.
brand
.
length
)
{
return
false
;
}
const
brands
=
[];
...
...
@@ -586,26 +586,28 @@ const handleOptSortData = (params, filter, baseUrl) => {
}];
const
checks
=
[];
if
(
filter
.
new
||
params
.
new
===
'Y'
)
{
checks
.
push
({
name
:
'新品'
,
checked
:
params
.
new
===
'Y'
,
href
:
handleFilterUrl
(
baseUrl
,
params
,
{
new
:
'Y'
},
params
.
new
===
'Y'
?
{
new
:
true
}
:
{})
});
}
if
(
filter
.
specialoffer
||
params
.
specialoffer
===
'Y'
)
{
checks
.
push
({
name
:
'打折'
,
checked
:
params
.
specialoffer
===
'Y'
,
href
:
handleFilterUrl
(
baseUrl
,
params
,
{
specialoffer
:
'Y'
},
params
.
specialoffer
===
'Y'
?
{
specialoffer
:
true
}
:
{})
// eslint-disable-line
});
}
if
(
filter
.
limited
||
params
.
limited
===
'Y'
)
{
checks
.
push
({
name
:
'限量'
,
checked
:
params
.
limited
===
'Y'
,
href
:
handleFilterUrl
(
baseUrl
,
params
,
{
limited
:
'Y'
},
params
.
limited
===
'Y'
?
{
limited
:
true
}
:
{})
});
if
(
filter
)
{
if
(
filter
.
new
||
params
.
new
===
'Y'
)
{
checks
.
push
({
name
:
'新品'
,
checked
:
params
.
new
===
'Y'
,
href
:
handleFilterUrl
(
baseUrl
,
params
,
{
new
:
'Y'
},
params
.
new
===
'Y'
?
{
new
:
true
}
:
{})
});
}
if
(
filter
.
specialoffer
||
params
.
specialoffer
===
'Y'
)
{
checks
.
push
({
name
:
'打折'
,
checked
:
params
.
specialoffer
===
'Y'
,
href
:
handleFilterUrl
(
baseUrl
,
params
,
{
specialoffer
:
'Y'
},
params
.
specialoffer
===
'Y'
?
{
specialoffer
:
true
}
:
{})
// eslint-disable-line
});
}
if
(
filter
.
limited
||
params
.
limited
===
'Y'
)
{
checks
.
push
({
name
:
'限量'
,
checked
:
params
.
limited
===
'Y'
,
href
:
handleFilterUrl
(
baseUrl
,
params
,
{
limited
:
'Y'
},
params
.
limited
===
'Y'
?
{
limited
:
true
}
:
{})
});
}
}
return
{
sortType
,
checks
};
};
...
...
Please
register
or
login
to post a comment