Commit 4e9a1bfd authored by wangqinghua's avatar wangqinghua

swiper

parent b896e1f1
...@@ -384,9 +384,10 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios { ...@@ -384,9 +384,10 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
font-size: 1.8rem; font-size: 1.8rem;
padding: .4rem 0;
border-top-right-radius: 5px; border-top-right-radius: 5px;
border-top-left-radius: 5px; border-top-left-radius: 5px;
height: 35px;
line-height: 35px;
} }
.record-content { .record-content {
......
...@@ -106,7 +106,7 @@ export class PublishPage { ...@@ -106,7 +106,7 @@ export class PublishPage {
return false; return false;
} }
const options: CameraOptions = { const options: CameraOptions = {
quality: 100, quality: 70,
destinationType: this.camera.DestinationType.FILE_URI, destinationType: this.camera.DestinationType.FILE_URI,
encodingType: this.camera.EncodingType.PNG, encodingType: this.camera.EncodingType.PNG,
mediaType: this.camera.MediaType.PICTURE, mediaType: this.camera.MediaType.PICTURE,
......
...@@ -91,7 +91,7 @@ export class PersonInfoPage { ...@@ -91,7 +91,7 @@ export class PersonInfoPage {
//选择图片 //选择图片
selectPicture(srcType) { selectPicture(srcType) {
const options: CameraOptions = { const options: CameraOptions = {
quality: 100, quality: 50,
destinationType: this.camera.DestinationType.FILE_URI, destinationType: this.camera.DestinationType.FILE_URI,
encodingType: this.camera.EncodingType.PNG, encodingType: this.camera.EncodingType.PNG,
mediaType: this.camera.MediaType.PICTURE, mediaType: this.camera.MediaType.PICTURE,
......
...@@ -111,11 +111,11 @@ ...@@ -111,11 +111,11 @@
</ion-slides> </ion-slides>
<!-- <ion-infinite-scroll #infiniteScrollContentEle (ionInfinite)="doInfinite($event)">--> <ion-infinite-scroll #infiniteScrollContentEle (ionInfinite)="doInfinite($event)">
<!-- <ion-infinite-scroll-content--> <ion-infinite-scroll-content
<!-- loadingSpinner="bubbles"--> loadingSpinner="bubbles"
<!-- loadingText="加载中"></ion-infinite-scroll-content>--> loadingText="加载中"></ion-infinite-scroll-content>
<!-- </ion-infinite-scroll>--> </ion-infinite-scroll>
<p class="noData" *ngIf="!loadMore">你已经看到我的底线了</p> <p class="noData" *ngIf="!loadMore">你已经看到我的底线了</p>
......
...@@ -68,6 +68,7 @@ page-discover { ...@@ -68,6 +68,7 @@ page-discover {
padding: 0 1rem; padding: 0 1rem;
.search-item{ .search-item{
padding: .8rem 0; padding: .8rem 0;
overflow-y: scroll;
.item-info{ .item-info{
margin: .8rem 0; margin: .8rem 0;
color: #989898; color: #989898;
......
...@@ -158,7 +158,7 @@ export class DiscoverPage { ...@@ -158,7 +158,7 @@ export class DiscoverPage {
toIndex; toIndex;
//分页 //分页
pageCount = 100; pageCount = 10;
loadMore = true; loadMore = true;
totalNum; totalNum;
...@@ -186,7 +186,7 @@ export class DiscoverPage { ...@@ -186,7 +186,7 @@ export class DiscoverPage {
//父级选择 //父级选择
changeParent(item) { changeParent(item) {
this.newsContent.nativeElement.scrollLeft = 0; //二级菜单滑动重置 this.newsContent.nativeElement.scrollLeft = 0; //二级菜单滑动重置
// this.infiniteScrollContent.inf.enable(true); this.infiniteScrollContent.inf.enable(true);
this.loadMore = true; this.loadMore = true;
const index = item.indexParent; const index = item.indexParent;
...@@ -227,7 +227,7 @@ export class DiscoverPage { ...@@ -227,7 +227,7 @@ export class DiscoverPage {
//子级选择 //子级选择
changeChildren(item) { changeChildren(item) {
this.indexChildren = item.indexChildren; this.indexChildren = item.indexChildren;
// this.infiniteScrollContent.inf.enable(true); this.infiniteScrollContent.inf.enable(true);
this.loadMore = true; this.loadMore = true;
...@@ -255,6 +255,7 @@ export class DiscoverPage { ...@@ -255,6 +255,7 @@ export class DiscoverPage {
//下拉刷新 //下拉刷新
doRefresh(e) { doRefresh(e) {
this.infiniteScrollContent.inf.enable(true);
const data = { const data = {
pageNum: 1, pageNum: 1,
pageCount: this.pageCount, pageCount: this.pageCount,
...@@ -272,9 +273,9 @@ export class DiscoverPage { ...@@ -272,9 +273,9 @@ export class DiscoverPage {
e.imgUrl = e.attachments[0].path; e.imgUrl = e.attachments[0].path;
} }
}) })
this.slideList[this.toIndex] = this.newList;
setTimeout(() => { setTimeout(() => {
this.commonSer.toastTime('刷新成功!', 800) this.slideList[this.toIndex] = this.newList;
this.commonSer.toastTime('刷新成功!', 800);
e.complete(); e.complete();
}, 1000); }, 1000);
} }
...@@ -300,7 +301,7 @@ export class DiscoverPage { ...@@ -300,7 +301,7 @@ export class DiscoverPage {
'resourceType': 1 'resourceType': 1
} }
}; };
this.renderer.setStyle(this.infiniteScrollContentEle.nativeElement.children[0], 'minHeight', '60px'); // this.renderer.setStyle(this.infiniteScrollContentEle.nativeElement.children[0], 'minHeight', '60px');
this.tabsSer.stuffPage(data).subscribe( this.tabsSer.stuffPage(data).subscribe(
(res) => { (res) => {
let arr = res.data.list; let arr = res.data.list;
...@@ -314,7 +315,7 @@ export class DiscoverPage { ...@@ -314,7 +315,7 @@ export class DiscoverPage {
} }
setTimeout(() => { setTimeout(() => {
infiniteScroll.complete(); infiniteScroll.complete();
this.renderer.setStyle(this.infiniteScrollContentEle.nativeElement.children[0], 'minHeight', '0px'); // this.renderer.setStyle(this.infiniteScrollContentEle.nativeElement.children[0], 'minHeight', '0px');
}, 1000) }, 1000)
} }
) )
......
...@@ -139,7 +139,6 @@ ...@@ -139,7 +139,6 @@
<p class="noData" *ngIf="!loadMore">你已经看到我的底线了</p> <p class="noData" *ngIf="!loadMore">你已经看到我的底线了</p>
</div> </div>
</div> </div>
</ng-container> </ng-container>
</div> </div>
</div> </div>
......
...@@ -346,49 +346,16 @@ page-home { ...@@ -346,49 +346,16 @@ page-home {
} }
} }
//新闻区 #swiper-article.swiper-container {
.main-news { height: fit-content;
padding: 0 1rem 5rem 1rem;
//height: inherit;
.news-item {
padding: .8rem 0;
.news-left {
display: flex;
flex-flow: row wrap;
min-height: 100%;
.news-title {
align-self: flex-start;
font-weight: bold;
width: 100%;
margin-bottom: .6rem;
}
.news-end {
//align-self: flex-end;
color: #999999;
span { .swiper-wrapper {
margin-right: 1rem; height: fit-content;
}
}
}
.news-right {
text-align: center;
img { .swiper-slide {
border-radius: .5rem; height: fit-content;
height: 60px;
}
} }
} }
.news-item + .news-item {
border-top: 1px solid #eeeeee;
}
} }
} }
......
...@@ -170,7 +170,6 @@ export class HomePage { ...@@ -170,7 +170,6 @@ export class HomePage {
loop: false, loop: false,
on: { on: {
slideChangeTransitionEnd: function () { slideChangeTransitionEnd: function () {
console.log(this.activeIndex);
that.swiperArticle.update(); that.swiperArticle.update();
that.change(that.tabsList[this.activeIndex]); that.change(that.tabsList[this.activeIndex]);
}, },
...@@ -229,6 +228,7 @@ export class HomePage { ...@@ -229,6 +228,7 @@ export class HomePage {
this.slideList[this.index] = arr; this.slideList[this.index] = arr;
} }
if (this.swiperArticle) this.swiperArticle.slideTo(this.index, 500); if (this.swiperArticle) this.swiperArticle.slideTo(this.index, 500);
this.content.resize();
} }
) )
} }
...@@ -254,7 +254,7 @@ export class HomePage { ...@@ -254,7 +254,7 @@ export class HomePage {
(res) => { (res) => {
this.partyObj = res.apiResult.data; this.partyObj = res.apiResult.data;
//获取是否展示过政治生日 //获取是否展示过政治生日
const nowDay = this.datePipe.transform(new Date(), 'yyyy-MM-dd'); const nowDay = this.datePipe.transform(new Date(), 'yyyy-MM-dd HH');
const partyBir = localStorage.getItem('partyBir'); const partyBir = localStorage.getItem('partyBir');
if (nowDay == partyBir) { if (nowDay == partyBir) {
setTimeout(() => { setTimeout(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment