| | |
| | | |
| | | _fetch() { |
| | | if (typeof this._fetchData === 'function') { |
| | | this._fetchData(this.data.cPage) |
| | | const promise = this._fetchData(this.data.cPage); |
| | | if (!promise) return; |
| | | promise |
| | | .then(head => { |
| | | if (head) { |
| | | let cPage = head.currentPage |
| | | ? parseInt(head.currentPage) |
| | | : parseInt(head.page); |
| | | let cPage = head.currentPage ? parseInt(head.currentPage) : parseInt(head.page); |
| | | let tPage = parseInt(head.totalPage); |
| | | let totalCount = head.totalCount ? parseInt(head.totalCount) : 0; |
| | | this._setPagination(cPage, tPage, totalCount); |