Newer
Older
import {Component, ViewChild} from '@angular/core';
import {InfiniteScrollContent, IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppGlobal, AppService} from "../../../service/http.service";
import {MineService} from "../mine.service";
import {CommonService} from "../../../provide/common.service";
import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
@IonicPage()
@Component({
selector: 'page-verify',
templateUrl: 'verify.html',
})
export class VerifyPage {
@ViewChild(InfiniteScrollContent) infiniteScrollContent: InfiniteScrollContent;
picture: string = AppGlobal.domain + '/wisdomgroup';
isLoad = true;
loadMore = true;
totalNum; //总条数
constructor(public navCtrl: NavController, public navParams: NavParams,
public mineSer: MineService, public commonSer: CommonService) {
}
ionViewDidEnter() {
this.getList();
}
}
getList() {
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount
};
this.isLoad = false;
this.totalNum = res.data.total;
}
)
}
//下拉刷新
doRefresh(e) {
this.loadMore = true;
this.infiniteScrollContent.inf.enable(true);
const data = {
pageNum: 1,
pageCount: this.pageCount
};
this.totalNum = res.data.total;
setTimeout(() => {
this.commonSer.toast('刷新成功');
e.complete()
}, 800);
}
)
}
//加载更多
doInfinite(e) {
this.loadMore = false;
e.enable(false);
return false;
}
this.pageNum++;
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount
};
(res) => {
this.totalNum = res.data.total;
res.data.list.forEach(e => {
});
setTimeout(() => {
e.complete()
}, 800);
}
)
}
//查看文章详情
goToDetail(item) {