mirror of
https://github.com/Monibuca/plugin-record.git
synced 2025-10-05 16:56:53 +08:00
修复分页搜索问题
This commit is contained in:
@@ -158,7 +158,7 @@ func (conf *RecordConfig) API_list_page(w http.ResponseWriter, r *http.Request)
|
|||||||
if pageNumInt > 0 {
|
if pageNumInt > 0 {
|
||||||
totalPageCount = (totalCount / pageSizeInt) + 1 //总页数
|
totalPageCount = (totalCount / pageSizeInt) + 1 //总页数
|
||||||
remainCount := totalCount % pageSizeInt //分页后剩余条数
|
remainCount := totalCount % pageSizeInt //分页后剩余条数
|
||||||
if remainCount == 0 {
|
if remainCount == 0 && totalPageCount != 1 {
|
||||||
totalPageCount = totalCount / pageSizeInt
|
totalPageCount = totalCount / pageSizeInt
|
||||||
}
|
}
|
||||||
if pageNumInt > totalPageCount {
|
if pageNumInt > totalPageCount {
|
||||||
@@ -245,7 +245,7 @@ func (conf *RecordConfig) API_list_recording_page(w http.ResponseWriter, r *http
|
|||||||
if pageNumInt > 0 {
|
if pageNumInt > 0 {
|
||||||
totalPageCount = (totalCount / pageSizeInt) + 1 //总页数
|
totalPageCount = (totalCount / pageSizeInt) + 1 //总页数
|
||||||
remainCount := totalCount % pageSizeInt //分页后剩余条数
|
remainCount := totalCount % pageSizeInt //分页后剩余条数
|
||||||
if remainCount == 0 {
|
if remainCount == 0 && totalPageCount != 1 {
|
||||||
totalPageCount = totalCount / pageSizeInt
|
totalPageCount = totalCount / pageSizeInt
|
||||||
}
|
}
|
||||||
if pageNumInt > totalPageCount {
|
if pageNumInt > totalPageCount {
|
||||||
|
Reference in New Issue
Block a user