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() {
pageCount: this.pageCount,
obj: {
publishStatus: this.publishStatus //2 待审核 ,3 已审核
}
this.isLoad = false;
this.totalNum = res.data.total;
}
)
}
//退回已审核文章
recall(item,e) {
e.stopPropagation();
this.commonSer.alert('确认退回当前文章', () => {
this.mineSer.stuffRecall(item.id).subscribe(
(res) => {
this.getList(this.publishStatus);
}
)
});
}
//下拉刷新
doRefresh(e) {
this.loadMore = true;
this.infiniteScrollContent.inf.enable(true);
this.getList(this.publishStatus);
setTimeout(() => {
this.commonSer.toast('刷新成功');
e.complete()
}, 800);
this.loadMore = false;
e.enable(false);
return false;
}
this.pageNum++;
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount,
obj: {
publishStatus: this.publishStatus //2 待审核 ,3 已审核
}
(res) => {
this.totalNum = res.data.total;
res.data.list.forEach(e => {
});
setTimeout(() => {
e.complete()
}, 800);
}
)
}
//查看文章详情
goToDetail(item) {