let deletes =(batchNo)=>{
// console.log('删除');
conService.deleted(batchNo).then(
rem => {
if (rem.success) {
var listers = () => {
let bool = (Math.ceil(this.state.totalnum / 10) === this.state.currentPage) && this.state.currentPage > 1 && (this.state.totalnum % 10) === 1 && this.state.totalnum !== 1;
// console.log(' this.state.totalnum % 10, this.state.totalnum !== 1', this.state.currentPage, this.state.totalnum % 10, this.state.totalnum !== 1);
if (bool) {
this.setState({
currentPage: Number(this.state.currentPage) - 1
});
}
};
//在更新数据之前判断是否跳到上一页
this.upData(listers());
} else {
message.info(rem.message);
}
}
);
}
网友评论