Merge branch 'develop'

admin [init ok]
lea++ blog platform [ok]
This commit is contained in:
life
2014-09-24 22:24:52 +08:00
parent 99956cfd72
commit 87269cc939
409 changed files with 28646 additions and 18 deletions

View File

@ -1,6 +1,7 @@
package info
import (
"math"
)
@ -10,4 +11,12 @@ type Page struct {
TotalPage int // 总页
Count int // 总记录数
List interface{}
}
func NewPage(page, perPageSize, count int, list interface{}) Page {
totalPage := 0
if count > 0 {
totalPage = int(math.Ceil(float64(count) / float64(perPageSize)))
}
return Page{page, totalPage, count, list}
}