Commit aaa64f3e authored by wangqinghua's avatar wangqinghua

更新首页滑动加载下拉失败

parent 96105f19
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.2.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.partyCloud.starter.test" version="0.2.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云(测试)</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......
<div class="slides-content">
<ion-slides (ionSlideDidChange)="slideChange($event)" #slides *ngIf="slidersItems.length>0"
loop="true"
autoplay="2000" speed="1500">
<ion-slides (ionSlideDidChange)="slideChange($event)" *ngIf="slidersItems.length>0"
loop="true" autoplay="2000" speed="1500">
<ion-slide *ngFor="let item of slidersItems;">
<img src="{{picture+item.imgUrl}}" class="slide-image" (click)="goToDetail(item)">
</ion-slide>
......
......@@ -146,6 +146,7 @@ page-discover {
.swiper-slide{
align-items: baseline;
font-size: 1.4rem;
overflow-y: auto;
}
.slide-zoom{
text-align: left;
......
......@@ -67,7 +67,7 @@
</div>
</div>
<ion-slides (ionSlideDidChange)="slideChange($event)" loop="true">
<ion-slides initialSlide="4" (ionSlideDidChange)="slideChange($event)" loop="true">
<ion-slide *ngFor="let item of slideList">
<div class="main-news">
<ng-container *ngFor="let new of item;">
......
......@@ -120,7 +120,7 @@ page-home {
//新闻区
.main-news {
padding: 0 1rem;
text-align: left;
.news-item {
padding: .8rem 0;
......@@ -189,6 +189,7 @@ page-home {
.swiper-slide{
align-items: baseline;
font-size: 1.4rem;
overflow-y: auto;
}
.slide-zoom{
text-align: left;
......
......@@ -48,6 +48,7 @@ export class HomePage {
isScroll = false; //tabs置顶
noReadNum;
initSlide = 0;
signObj = {
'text': '',
......@@ -145,17 +146,22 @@ export class HomePage {
}
});
this.slideList[index] = arr;
this.slides1.slideTo(index, 500);
if(this.slides1) this.slides1.slideTo(index, 500);
}
}
)
}
slideChange(e) {
if(this.initSlide == 0){ //防止初始化加载
this.initSlide = 1;
return false;
}
let index = this.slides1.getActiveIndex();
if (index == this.tabsList.length) index = 0;
if (index == this.tabsList.length + 1) index = 1;
this.change(this.tabsList[index])
console.log(index);
}
......@@ -186,7 +192,7 @@ export class HomePage {
localStorage.setItem('partyBir', nowDay);
this.isBir = false;
this.homeMiddleTips.nativeElement.style.height = "60px";
this.homeMiddleTips.nativeElement.style.height = "50px";
this.homeMiddleTips.nativeElement.style.padding = ".5rem";
let child_div = this.verticaLamp.nativeElement.children;
const scrollWidth = this.verticaLamp.nativeElement.offsetWidth;
......
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