Fix: cannot list multiple pages in async task page
This commit is contained in:
parent
c89327631e
commit
5bda037d74
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ func ListTasks(uid uint, page, pageSize int, order string) ([]Task, int) {
|
|||
dbChain = dbChain.Where("user_id = ?", uid)
|
||||
|
||||
// 计算总数用于分页
|
||||
dbChain.Model(&Share{}).Count(&total)
|
||||
dbChain.Model(&Task{}).Count(&total)
|
||||
|
||||
// 查询记录
|
||||
dbChain.Limit(pageSize).Offset((page - 1) * pageSize).Order(order).Find(&tasks)
|
||||
|
|
Loading…
Reference in a new issue