Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
party-build-cloud
Commits
10383c29
Commit
10383c29
authored
Jun 05, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章分类滚动
parent
fd87d6c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
stuff-detail.ts
src/pages/home-pages/stuff-detail/stuff-detail.ts
+2
-4
discover.html
src/pages/tabs/discover/discover.html
+3
-3
discover.ts
src/pages/tabs/discover/discover.ts
+12
-1
No files found.
src/pages/home-pages/stuff-detail/stuff-detail.ts
View file @
10383c29
...
...
@@ -55,8 +55,6 @@ export class StuffDetailPage {
setTimeout
(()
=>
{
this
.
footerView
=
true
;
},
300
)
//增加浏览量
// this.initVideo();
}
//获取文章信息
...
...
@@ -89,8 +87,8 @@ export class StuffDetailPage {
}
this
.
tabSer
.
updateNumByType
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errcode
==
'1000'
)
{
this
.
commonSer
.
log
(
'浏览数 +1'
)
if
(
res
.
data
.
content
)
{
this
.
commonSer
.
toast
(
res
.
data
.
content
);
}
}
)
...
...
src/pages/tabs/discover/discover.html
View file @
10383c29
...
...
@@ -92,9 +92,9 @@
<div
id=
"swiper-discover"
class=
"swiper-container"
>
<div
class=
"swiper-wrapper"
>
<ng-container
*
ngFor=
"let new of slideList;let i = index;"
>
<div
class=
"swiper-slide"
>
<ion-content>
<div
class=
"search-content"
>
<div
class=
"swiper-slide"
(
scroll
)="
test
($
event
)"
>
<ion-content
(
ionScroll
)="
test
($
event
)"
>
<div
class=
"search-content"
(
scroll
)="
test
($
event
)"
>
<ng-container
*
ngFor=
"let item of new;"
>
<div
*
ngIf=
"obj.childrenName != '你问我答'"
class=
"search-item"
(
click
)="
goToDetail
(
item
)"
>
<p
class=
"item-info"
>
...
...
src/pages/tabs/discover/discover.ts
View file @
10383c29
...
...
@@ -29,6 +29,7 @@ export class DiscoverPage {
@
ViewChild
(
'newContentParent'
)
newContentParent
:
ElementRef
;
@
ViewChild
(
'scrollTab'
)
scrollTab
:
ElementRef
;
@
ViewChild
(
Content
)
content
:
Content
;
@
ViewChild
(
'slideContent'
)
slideContent
:
Content
;
//所属板块类型:
//1党章党规,2系列讲话,3中央精神,4本市部署,5通知公告,6党建动态,7工作提示,8党务参考
...
...
@@ -280,6 +281,16 @@ export class DiscoverPage {
}
})
})
// this.slideContent.ionScroll.subscribe(($event) => {
// this.zone.run(() => {
// console.log(this.slideContent);
// })
// })
}
test
(
e
){
console
.
log
(
e
);
}
//初始化swiper
...
...
@@ -296,7 +307,7 @@ export class DiscoverPage {
slideChangeTransitionEnd
:
function
()
{
that
.
swiper
.
update
();
that
.
changeParent
(
that
.
tabsList
[
this
.
activeIndex
]);
const
distancs
=
this
.
activeIndex
*
that
.
itemWidth
/
2
;
//滑动的长度
const
distancs
=
this
.
activeIndex
*
that
.
itemWidth
/
2
;
//滑动的长度
let
scrollInter
=
window
.
setInterval
(()
=>
{
if
(
distancs
==
that
.
newContentParent
.
nativeElement
.
scrollLeft
)
{
window
.
clearInterval
(
scrollInter
);
...
...
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