mirror of
https://github.com/QingdaoU/OnlineJudgeFE.git
synced 2024-12-28 23:41:47 +00:00
修复首页公告不能正常分页问题
This commit is contained in:
parent
12cbf7fce1
commit
45da8cfddf
@ -13,8 +13,14 @@ export default {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAnnouncementList () {
|
getAnnouncementList (offset, limit) {
|
||||||
return ajax('announcement', 'get')
|
let params = {
|
||||||
|
offset: offset,
|
||||||
|
limit: limit
|
||||||
|
}
|
||||||
|
return ajax('announcement', 'get', {
|
||||||
|
params
|
||||||
|
})
|
||||||
},
|
},
|
||||||
login (data) {
|
login (data) {
|
||||||
return ajax('login', 'post', {
|
return ajax('login', 'post', {
|
||||||
|
@ -69,12 +69,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAnnouncementList (page = 1) {
|
getAnnouncementList (page = 1) {
|
||||||
let params = {
|
|
||||||
limit: this.limit,
|
|
||||||
offset: (page - 1) * this.limit
|
|
||||||
}
|
|
||||||
this.btnLoading = true
|
this.btnLoading = true
|
||||||
api.getAnnouncementList(params).then(res => {
|
api.getAnnouncementList((page - 1) * this.limit, this.limit).then(res => {
|
||||||
this.btnLoading = false
|
this.btnLoading = false
|
||||||
this.announcements = res.data.data.results
|
this.announcements = res.data.data.results
|
||||||
this.total = res.data.data.total
|
this.total = res.data.data.total
|
||||||
|
Loading…
Reference in New Issue
Block a user