分页默认大小
This commit is contained in:
@@ -331,7 +331,7 @@ func main() {
|
||||
// 获取图片列表
|
||||
var images ListView
|
||||
var image_list []Image
|
||||
images.Page, images.PageSize = stringToInt(r.URL.Query().Get("page"), 1), stringToInt(r.URL.Query().Get("pageSize"), 10)
|
||||
images.Page, images.PageSize = stringToInt(r.URL.Query().Get("page"), 1), stringToInt(r.URL.Query().Get("pageSize"), 20)
|
||||
rows, err := mysqlConnection.Database.Query("SELECT id, width, height, content, update_time, create_time, user_id, article_id, article_category_top_id, praise_count, collect_count FROM web_images"+conditions.String()+" LIMIT ?, ?", (images.Page-1)*images.PageSize, images.PageSize)
|
||||
if err != nil {
|
||||
log.Println("获取图片列表失败", err)
|
||||
@@ -499,7 +499,7 @@ func main() {
|
||||
|
||||
// 获取标签列表
|
||||
var tags ListView
|
||||
tags.Page, tags.PageSize = stringToInt(r.FormValue("page"), 1), stringToInt(r.FormValue("pageSize"), 10)
|
||||
tags.Page, tags.PageSize = stringToInt(r.FormValue("page"), 1), stringToInt(r.FormValue("pageSize"), 20)
|
||||
rows, err := mysqlConnection.Database.Query("SELECT id, name, update_time, create_time FROM web_tags"+conditions+" ORDER BY id DESC LIMIT ?, ?", (tags.Page-1)*tags.PageSize, tags.PageSize)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
Reference in New Issue
Block a user