Commit 11ce2696 authored by wangqinghua's avatar wangqinghua

首页分页的问题

parent 7b517dda
......@@ -113,11 +113,11 @@
</div>
<ion-slides (ionSlideDidChange)="slideChanged()" [loop]="false">
<ng-container *ngFor="let item of slideList;let i = index;">
<ng-container *ngFor="let item of slideArr;let i = index;">
<ion-slide>
<ion-content>
<div class="main-news">
<ng-container *ngFor="let new of item;">
<ng-container *ngFor="let new of slideList[i];">
<ng-container *ngIf="new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)">
<ion-col col-8 class="news-left">
......
......@@ -80,7 +80,8 @@ export class HomePage {
plateType;
index;
slideList = [];
slideList = new Array(5);
slideArr = new Array(5);
itemWidth;
spanWidth; //文字宽度
......@@ -205,7 +206,6 @@ export class HomePage {
}
change(item) {
console.log('213');
if (this.index === item.index) return;
this.index = item.index;
this.pageNum = 1;
......@@ -234,7 +234,6 @@ export class HomePage {
});
this.slideList[this.index] = arr;
}
console.log(arr);
this.slides.slideTo(this.index, 500);
}
)
......@@ -242,7 +241,6 @@ export class HomePage {
//加载更多
doInfinite(e) {
console.log('doInfinite');
if (this.total < this.pageSize || this.total == this.pageSize) {
e.complete();
return false;
......@@ -259,7 +257,6 @@ export class HomePage {
this.tabsSer.stuffPage(data).subscribe(
(res) => {
e.complete();
console.log('e.complete();');
res.data.list.forEach(e => {
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
......
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