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
Plain Diff
Browse Files
Authored by
毕凯
8 years ago
Commit
59ef6b30a5864114105fd74cf977985aefa91916
2 parents
da4a12cb
2d410672
Merge branch 'master' into release/5.7.1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
public/js/plugin/filter.js
utils/guang-process.js
public/js/plugin/filter.js
View file @
59ef6b3
...
...
@@ -15,13 +15,13 @@ let fCbFn, hCbFn; // 筛选和关闭的回调
// 隐藏筛选界面
function
hideFilter
()
{
setTimeout
(
function
()
{
$filter
.
addClass
(
'hide'
);
$filter
&&
$filter
.
addClass
(
'hide'
);
},
301
);
}
// 显示筛选界面
function
showFilter
()
{
$filter
.
removeClass
(
'hide'
);
$filter
&&
$filter
.
removeClass
(
'hide'
);
}
// 一级菜单点击时背景高亮
...
...
utils/guang-process.js
View file @
59ef6b3
...
...
@@ -313,8 +313,7 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
finalDetail
.
push
({
relatedReco
:
{
isApp
:
isApp
,
goods
:
goodsData
,
moreNum
:
goodsData
.
length
-
2
>
0
?
goodsData
.
length
-
2
:
0
goods
:
goodsData
}
});
}
...
...
@@ -380,14 +379,26 @@ const pushGoodsInfo = (finalDetail, goodsList, isApp) => {
_
.
forEach
(
finalDetail
,
(
value
,
key
)
=>
{
if
(
value
.
relatedReco
)
{
_
.
forEach
(
value
.
relatedReco
.
goods
,
(
item
,
subKey
)
=>
{
if
(
goodsObj
[
item
.
id
])
{
finalDetail
[
key
].
relatedReco
.
goods
[
subKey
]
=
goodsObj
[
item
.
id
];
let
goodsIds
=
[];
_
.
forEach
(
value
.
relatedReco
.
goods
,
relatedGoods
=>
{
goodsIds
.
push
(
relatedGoods
.
id
);
});
goodsIds
=
_
.
uniq
(
goodsIds
);
finalDetail
[
key
].
relatedReco
.
goods
=
[];
_
.
forEach
(
goodsIds
,
(
item
,
subKey
)
=>
{
if
(
goodsObj
[
item
])
{
finalDetail
[
key
].
relatedReco
.
goods
[
subKey
]
=
goodsObj
[
item
];
}
else
{
delete
finalDetail
[
key
].
relatedReco
.
goods
[
subKey
];
finalDetail
[
key
].
relatedReco
.
moreNum
--
;
}
});
let
moreNum
=
_
.
get
(
finalDetail
[
key
],
'relatedReco.goods.length'
,
0
);
finalDetail
[
key
].
relatedReco
.
moreNum
=
moreNum
-
2
>
0
?
moreNum
-
2
:
0
;
}
if
(
value
.
collocation
)
{
...
...
Please
register
or
login
to post a comment