小调整,修复一bug
This commit is contained in:
parent
72a37d3bc8
commit
8dded98f39
|
@ -29,7 +29,7 @@ var twentyFifteen = PageEle{
|
|||
<span class="meta-nav screen-reader-text">页 </span>%d</span>`,
|
||||
}
|
||||
|
||||
func (p PageEle) Current(page, totalPage int) string {
|
||||
func (p PageEle) Current(page, totalPage, totalRow int) string {
|
||||
return fmt.Sprintf(p.CurrentEle, page)
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ func (i *IndexHandle) ParseIndex(parm *IndexParams) (err error) {
|
|||
i.Stats = constraints.ParamError
|
||||
return
|
||||
}
|
||||
i.Param.CacheKey = i.Param.getSearchKey()
|
||||
i.Param.ParseParams()
|
||||
i.Param.CacheKey = i.Param.getSearchKey()
|
||||
i.GinH["title"] = i.Param.getTitle()
|
||||
i.GinH["search"] = i.Param.Search
|
||||
i.GinH["header"] = i.Param.Header
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
)
|
||||
|
||||
type Elements interface {
|
||||
Current(page, totalPage int) string
|
||||
Current(page, totalPage, totalRows int) string
|
||||
Prev(url string) string
|
||||
Next(url string) string
|
||||
Dots() string
|
||||
|
@ -67,7 +67,7 @@ func (p ParsePagination) ToHtml() (html string) {
|
|||
for page := start; page <= end; page++ {
|
||||
h := ""
|
||||
if p.CurrentPage == page {
|
||||
h = p.Current(page, p.TotalPage)
|
||||
h = p.Current(page, p.TotalPage, p.TotalRaw)
|
||||
} else {
|
||||
h = p.Middle(page, p.Url(p.Path, p.Query, page))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user