| | |
| | | getArtcilePageList() { |
| | | var that = this; |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/blade-desk/notice/page?category=1&deptId=" + this.$store.state |
| | | url: this.$store.state.piAPI + "/blade-desk/notice/page?category=2&deptId=" + this.$store.state |
| | | .UserData |
| | | .dept_id, |
| | | method: 'GET', |
| | |
| | | success: (res) => { |
| | | if (res.data.code == 200) { |
| | | if (res.data.data.records) { |
| | | |
| | | //如果总数小于pageSize,不做其他操作 |
| | | if (res.data.data.total < this.pagesize) { |
| | | that.newsList = res.data.data.records; |
| | | this.status = 'nomore' |
| | | } else { |
| | | if (res.data.data.records.length < this.pagesize) { |
| | | //如果数量小于分页数量,则为最后一页 |
| | |
| | | this.status = 'loading'; |
| | | } |
| | | res.data.data.records.forEach(item => { |
| | | console.log(item); |
| | | that.newsList.push(item); |
| | | }) |
| | | } |
| | | } |
| | | uni.stopPullDownRefresh(); |
| | | |
| | | } |
| | | } |
| | | }); |