Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ptfw-uniapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯忠英
ptfw-uniapp
Commits
690edfa1
Commit
690edfa1
authored
Aug 06, 2019
by
刘攀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
3282b308
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
index.vue
src/pages/store/goods/list/index.vue
+13
-6
No files found.
src/pages/store/goods/list/index.vue
View file @
690edfa1
...
...
@@ -934,7 +934,7 @@ export default {
if
(
newList
.
length
)
{
util
.
getAllElementTop
(
classify
.
map
(
item
=>
item
.
dom_id
),
res
=>
res
.
map
(
item
=>
item
.
top
-
res
[
0
].
top
)
res
.
map
(
item
=>
(
item
&&
res
[
0
]
?
item
.
top
-
res
[
0
].
top
:
0
)
)
)
.
then
(
res
=>
(
this
.
_classifyTopVals
=
res
))
}
...
...
@@ -1375,12 +1375,19 @@ export default {
},
// 商品列表滚动监听
onCateringGoodsListScroll
(
e
)
{
if
(
this
.
_disabledScrollFlag
)
return
(
this
.
_disabledScrollFlag
=
false
)
if
(
this
.
_disabledScrollFlag
)
{
this
.
_disabledScrollFlag
=
false
return
}
let
index
=
0
this
.
_classifyTopVals
.
forEach
((
citem
,
cIndex
)
=>
{
if
(
citem
<
e
.
detail
.
scrollTop
)
index
=
cIndex
})
if
(
index
===
this
.
cateringCurrentClassifyIndex
)
return
if
(
this
.
_classifyTopVals
)
{
this
.
_classifyTopVals
.
forEach
((
citem
,
cIndex
)
=>
{
if
(
citem
<
e
.
detail
.
scrollTop
)
index
=
cIndex
})
}
if
(
index
===
this
.
cateringCurrentClassifyIndex
)
{
return
}
this
.
cateringCurrentClassifyIndex
=
index
this
.
listLeftIntoScroll
=
'left_classify_'
+
this
.
cateringClassifyArr
[
index
>
3
?
index
-
3
:
0
][
'id'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment