Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
2376f8c7
Commit
2376f8c7
authored
Jun 22, 2021
by
chengzhichun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限时特惠
parent
8fa9993f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
src/components/basicTool/transverse-label/index.vue
+25
-2
src/pages/home/index.vue
+7
-1
No files found.
src/components/basicTool/transverse-label/index.vue
View file @
2376f8c7
...
...
@@ -77,7 +77,7 @@
<cube-nav
:datas=
"item1"
></cube-nav>
</div>
<div
v-else-if=
"item1.componentCode == 'time-limited-discount' && item1.componentInfo.visible == 1"
>
<time-limited-discount
:datas=
"item1"
></time-limited-discount>
<time-limited-discount
:datas=
"item1"
class=
"time-limited-discount"
:id=
"'time-limited-discount' + index"
></time-limited-discount>
</div>
<div
v-if=
"item1.componentCode == 'links' && item1.componentInfo.visible == 1"
>
<links
:datas=
"item1"
></links>
...
...
@@ -353,7 +353,15 @@ export default {
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
getAllTabWidth
();
setTimeout
(()
=>
{
if
(
this
.
$parent
.
$mp
.
page
.
selectAllComponents
(
'.time-limited-discount'
)){
this
.
$parent
.
$mp
.
page
.
selectAllComponents
(
'.time-limited-discount'
).
forEach
(
item
=>
{
item
.
loaded
=
false
;
item
.
isContain
=
false
;
item
.
getScroll
()
})
}
},
2000
)
});
},
methods
:
{
...
...
@@ -365,7 +373,22 @@ export default {
this
.
tabInfoList
=
rect
[
0
]
||
[];
this
.
initTabs
(
0
);
},
getScroll
(){
if
(
this
.
$parent
.
$mp
.
page
.
selectAllComponents
(
'.time-limited-discount'
)){
this
.
$parent
.
$mp
.
page
.
selectAllComponents
(
'.time-limited-discount'
).
forEach
(
item
=>
{
item
.
getScroll
()
})
}
},
changeTab
(
res
)
{
console
.
log
(
this
.
$parent
.
$mp
.
page
.
selectAllComponents
(
'.time-limited-discount'
),
'====111111222'
)
if
(
this
.
$parent
.
$mp
.
page
.
selectAllComponents
(
'.time-limited-discount'
)){
this
.
$parent
.
$mp
.
page
.
selectAllComponents
(
'.time-limited-discount'
).
forEach
(
item
=>
{
item
.
loaded
=
false
;
item
.
isContain
=
false
;
item
.
getScroll
()
})
}
this
.
active
=
res
.
target
.
index
;
},
timeOutInitTabs
(
notGetAllTabWidth
)
{
...
...
src/pages/home/index.vue
View file @
2376f8c7
...
...
@@ -70,7 +70,7 @@
<official-account></official-account>
</div>
<div
v-if=
"item.componentCode == 'transverse-label' && item.componentInfo.visible == 1"
>
<transverse-label
:datas=
"item"
:componentIndex=
"index"
></transverse-label>
<transverse-label
:datas=
"item"
:
ref=
"'transverse-label' + index"
:
componentIndex=
"index"
></transverse-label>
</div>
<div
v-if=
"item.componentCode == 'photo-gallery' && item.componentInfo.visible == 1"
>
<photo-gallery
:datas=
"item"
></photo-gallery>
...
...
@@ -292,6 +292,8 @@ export default {
this
.
active
=
checkTabbarPage
(
'/'
)
}
console
.
log
(
this
,
'this--=================='
)
this
.
$mp
.
page
.
onPageScroll
=
(
el
)
=>
{
throttle
(
this
.
scrolls
(
el
),
100
)
};
...
...
@@ -430,6 +432,10 @@ export default {
let
com
=
this
.
$mp
.
page
.
selectComponent
(
".merchants-list"
+
i
)
;
com
&&
com
.
getScroll
(
el
);
}
if
(
element
.
componentCode
==
"transverse-label"
){
let
com
=
this
.
$refs
[
"transverse-label"
+
i
][
0
];
com
&&
com
.
getScroll
();
}
}
}
...
...
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